net: dsa: mv88e6xxx: prefix Global 2 Switch MAC macros
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Mon, 19 Jun 2017 14:55:43 +0000 (10:55 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 20 Jun 2017 17:24:43 +0000 (13:24 -0400)
Prefix and document the Global 2 Switch MAC registers macros.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx/global2.c
drivers/net/dsa/mv88e6xxx/global2.h

index 8621f589340688c3e10a426169f5711c5d0a0bd6..0977ba1697a645f975048fd60c12dd01f7fcec58 100644 (file)
@@ -235,7 +235,7 @@ static int mv88e6xxx_g2_switch_mac_write(struct mv88e6xxx_chip *chip,
 {
        u16 val = (pointer << 8) | data;
 
-       return mv88e6xxx_g2_update(chip, GLOBAL2_SWITCH_MAC, val);
+       return mv88e6xxx_g2_update(chip, MV88E6XXX_G2_SWITCH_MAC, val);
 }
 
 int mv88e6xxx_g2_set_switch_mac(struct mv88e6xxx_chip *chip, u8 *addr)
index a0a6cb3cb6fe413077bbe124a87320f94ded3e3d..6b17343e481e9083917e2f689f7c76cd92b75b75 100644 (file)
 #define MV88E6XXX_G2_PVT_DATA          0x0c
 #define MV88E6XXX_G2_PVT_DATA_MASK     0x7f
 
-#define GLOBAL2_SWITCH_MAC     0x0d
+/* Offset 0x0D: Switch MAC/WoL/WoF Register */
+#define MV88E6XXX_G2_SWITCH_MAC                        0x0d
+#define MV88E6XXX_G2_SWITCH_MAC_UPDATE         0x8000
+#define MV88E6XXX_G2_SWITCH_MAC_PTR_MASK       0x1f00
+#define MV88E6XXX_G2_SWITCH_MAC_DATA_MASK      0x00ff
+
 #define GLOBAL2_ATU_STATS      0x0e
 #define GLOBAL2_PRIO_OVERRIDE  0x0f
 #define GLOBAL2_PRIO_OVERRIDE_FORCE_SNOOP      BIT(7)