net: dsa: mv88e6xxx: prefix Global Monitor Control macros
Prefix and document the Global Monitor Control Register macros (which became the Global Monitor & MGMT Control Register with 88E6390) and give a clear 16-bit registers representation. Use __bf_shf to get the shift value at compile time instead of adding new defined macros for it. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
d77f4321fa
commit
101515c8c5
@@ -156,23 +156,27 @@
|
||||
#define GLOBAL_IP_PRI_7 0x17
|
||||
#define GLOBAL_IEEE_PRI 0x18
|
||||
#define GLOBAL_CORE_TAG_TYPE 0x19
|
||||
#define GLOBAL_MONITOR_CONTROL 0x1a
|
||||
#define GLOBAL_MONITOR_CONTROL_INGRESS_SHIFT 12
|
||||
#define GLOBAL_MONITOR_CONTROL_INGRESS_MASK (0xf << 12)
|
||||
#define GLOBAL_MONITOR_CONTROL_EGRESS_SHIFT 8
|
||||
#define GLOBAL_MONITOR_CONTROL_EGRESS_MASK (0xf << 8)
|
||||
#define GLOBAL_MONITOR_CONTROL_ARP_SHIFT 4
|
||||
#define GLOBAL_MONITOR_CONTROL_ARP_MASK (0xf << 4)
|
||||
#define GLOBAL_MONITOR_CONTROL_MIRROR_SHIFT 0
|
||||
#define GLOBAL_MONITOR_CONTROL_ARP_DISABLED (0xf0)
|
||||
#define GLOBAL_MONITOR_CONTROL_UPDATE BIT(15)
|
||||
#define GLOBAL_MONITOR_CONTROL_0180C280000000XLO (0x00 << 8)
|
||||
#define GLOBAL_MONITOR_CONTROL_0180C280000000XHI (0x01 << 8)
|
||||
#define GLOBAL_MONITOR_CONTROL_0180C280000002XLO (0x02 << 8)
|
||||
#define GLOBAL_MONITOR_CONTROL_0180C280000002XHI (0x03 << 8)
|
||||
#define GLOBAL_MONITOR_CONTROL_INGRESS (0x20 << 8)
|
||||
#define GLOBAL_MONITOR_CONTROL_EGRESS (0x21 << 8)
|
||||
#define GLOBAL_MONITOR_CONTROL_CPU_DEST (0x30 << 8)
|
||||
|
||||
/* Offset 0x1A: Monitor Control */
|
||||
#define MV88E6185_G1_MONITOR_CTL 0x1a
|
||||
#define MV88E6185_G1_MONITOR_CTL_INGRESS_DEST_MASK 0xf000
|
||||
#define MV88E6185_G1_MONITOR_CTL_EGRESS_DEST_MASK 0x0f00
|
||||
#define MV88E6185_G1_MONITOR_CTL_ARP_DEST_MASK 0x00f0
|
||||
#define MV88E6352_G1_MONITOR_CTL_CPU_DEST_MASK 0x00f0
|
||||
#define MV88E6352_G1_MONITOR_CTL_MIRROR_DEST_MASK 0x000f
|
||||
|
||||
/* Offset 0x1A: Monitor & MGMT Control Register */
|
||||
#define MV88E6390_G1_MONITOR_MGMT_CTL 0x1a
|
||||
#define MV88E6390_G1_MONITOR_MGMT_CTL_UPDATE 0x8000
|
||||
#define MV88E6390_G1_MONITOR_MGMT_CTL_PTR_MASK 0x3f00
|
||||
#define MV88E6390_G1_MONITOR_MGMT_CTL_PTR_0180C280000000XLO 0x0000
|
||||
#define MV88E6390_G1_MONITOR_MGMT_CTL_PTR_0180C280000000XHI 0x0100
|
||||
#define MV88E6390_G1_MONITOR_MGMT_CTL_PTR_0180C280000002XLO 0x0200
|
||||
#define MV88E6390_G1_MONITOR_MGMT_CTL_PTR_0180C280000002XHI 0x0300
|
||||
#define MV88E6390_G1_MONITOR_MGMT_CTL_PTR_INGRESS_DEST 0x2000
|
||||
#define MV88E6390_G1_MONITOR_MGMT_CTL_PTR_EGRESS_DEST 0x2100
|
||||
#define MV88E6390_G1_MONITOR_MGMT_CTL_PTR_CPU_DEST 0x3000
|
||||
#define MV88E6390_G1_MONITOR_MGMT_CTL_DATA_MASK 0x00ff
|
||||
|
||||
/* Offset 0x1C: Global Control 2 */
|
||||
#define MV88E6XXX_G1_CTL2 0x1c
|
||||
|
Reference in New Issue
Block a user