diff options
author | Vivien Didelot <vivien.didelot@savoirfairelinux.com> | 2016-12-06 01:30:27 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-12-06 19:32:28 +0300 |
commit | 17e708baf7f24192cb1c7c8dd6b32d1941dfb0e8 (patch) | |
tree | c713e9ecc6ddddbb0790078fe379e05371a5fdac /drivers/net/dsa/mv88e6xxx/global1.h | |
parent | 309eca6db96ad69470220fa12c0bdc1ee64da8af (diff) | |
download | linux-17e708baf7f24192cb1c7c8dd6b32d1941dfb0e8.tar.xz |
net: dsa: mv88e6xxx: add a soft reset operation
Marvell chips have different way to issue a software reset.
Old chips (such as 88E6060) have a reset bit in an ATU control register.
Newer chips moved this bit in a Global control register. Chips with
controllable PPU should reset the PPU when resetting the switch.
Add a new reset operation to implement these differences and introduce a
mv88e6xxx_software_reset() helper to wrap it conveniently.
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 | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/global1.h b/drivers/net/dsa/mv88e6xxx/global1.h index cb61378829e6..9fca215b8acb 100644 --- a/drivers/net/dsa/mv88e6xxx/global1.h +++ b/drivers/net/dsa/mv88e6xxx/global1.h @@ -19,6 +19,10 @@ 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 mv88e6185_g1_reset(struct mv88e6xxx_chip *chip); +int mv88e6352_g1_reset(struct mv88e6xxx_chip *chip); + int mv88e6xxx_g1_stats_wait(struct mv88e6xxx_chip *chip); int mv88e6xxx_g1_stats_snapshot(struct mv88e6xxx_chip *chip, int port); int mv88e6320_g1_stats_snapshot(struct mv88e6xxx_chip *chip, int port); |