mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-08-09 06:14:34 +02:00
Each user port of the NETC switch supports 802.3 basic and mandatory managed objects statistic counters and IETF Management Information Database (MIB) package (RFC2665) and Remote Network Monitoring (RMON) counters. And all of these counters are 64-bit registers. In addition, some user ports support preemption, so these ports have two MACs, MAC 0 is the express MAC (eMAC), MAC 1 is the preemptible MAC (pMAC). So for ports that support preemption, the statistics are the sum of the pMAC and eMAC statistics. Note that the current switch driver does not support preemption, all frames are sent and received via the eMAC by default. The statistics read from the pMAC should be zero. Signed-off-by: Wei Fang <wei.fang@nxp.com> Link: https://patch.msgid.link/20260518082506.1318236-15-wei.fang@nxp.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
26 lines
441 B
C
26 lines
441 B
C
/* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */
|
|
/* Copyright 2024 NXP
|
|
*/
|
|
#ifndef __NETC_GLOBAL_H
|
|
#define __NETC_GLOBAL_H
|
|
|
|
#include <linux/io.h>
|
|
#include <linux/io-64-nonatomic-lo-hi.h>
|
|
|
|
static inline u32 netc_read(void __iomem *reg)
|
|
{
|
|
return ioread32(reg);
|
|
}
|
|
|
|
static inline void netc_write(void __iomem *reg, u32 val)
|
|
{
|
|
iowrite32(val, reg);
|
|
}
|
|
|
|
static inline u64 netc_read64(void __iomem *reg)
|
|
{
|
|
return ioread64(reg);
|
|
}
|
|
|
|
#endif
|