diff options
author | Vivien Didelot <vivien.didelot@savoirfairelinux.com> | 2017-06-15 18:14:00 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-15 20:07:48 +0200 |
commit | 4b0c481717b9896fa7a778dfd0b197ce8325bd1a (patch) | |
tree | 7478dc41115b6d58b8bbfed55414330b07f2f268 /drivers/net/dsa/mv88e6xxx/global1.h | |
parent | net: dsa: mv88e6xxx: prefix Global Status macros (diff) | |
download | linux-4b0c481717b9896fa7a778dfd0b197ce8325bd1a.tar.xz linux-4b0c481717b9896fa7a778dfd0b197ce8325bd1a.zip |
net: dsa: mv88e6xxx: prefix Global Switch MAC macros
Prefix and document the Global Switch MAC Address Register macros and
give clear 16-bit register representation.
At the same time, move mv88e6xxx_g1_set_switch_mac in global1.c, where
it belongs.
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/mv88e6xxx/global1.h')
-rw-r--r-- | drivers/net/dsa/mv88e6xxx/global1.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/global1.h b/drivers/net/dsa/mv88e6xxx/global1.h index 7ad63a049249..267233d40cb3 100644 --- a/drivers/net/dsa/mv88e6xxx/global1.h +++ b/drivers/net/dsa/mv88e6xxx/global1.h @@ -36,9 +36,14 @@ #define MV88E6XXX_G1_STS_IRQ_TCAM_DONE 1 #define MV88E6XXX_G1_STS_IRQ_EEPROM_DONE 0 -#define GLOBAL_MAC_01 0x01 -#define GLOBAL_MAC_23 0x02 -#define GLOBAL_MAC_45 0x03 +/* Offset 0x01: Switch MAC Address Register Bytes 0 & 1 + * Offset 0x02: Switch MAC Address Register Bytes 2 & 3 + * Offset 0x03: Switch MAC Address Register Bytes 4 & 5 + */ +#define MV88E6XXX_G1_MAC_01 0x01 +#define MV88E6XXX_G1_MAC_23 0x02 +#define MV88E6XXX_G1_MAC_45 0x03 + #define GLOBAL_ATU_FID 0x01 #define GLOBAL_VTU_FID 0x02 #define GLOBAL_VTU_FID_MASK 0xfff @@ -164,6 +169,8 @@ int mv88e6xxx_g1_read(struct mv88e6xxx_chip *chip, int reg, u16 *val); int mv88e6xxx_g1_write(struct mv88e6xxx_chip *chip, int reg, u16 val); int mv88e6xxx_g1_wait(struct mv88e6xxx_chip *chip, int reg, u16 mask); +int mv88e6xxx_g1_set_switch_mac(struct mv88e6xxx_chip *chip, u8 *addr); + int mv88e6185_g1_reset(struct mv88e6xxx_chip *chip); int mv88e6352_g1_reset(struct mv88e6xxx_chip *chip); |