OSDN Git Service

net: dsa: mv88e6xxx: add a soft reset operation
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Mon, 5 Dec 2016 22:30:27 +0000 (17:30 -0500)
committerDavid S. Miller <davem@davemloft.net>
Tue, 6 Dec 2016 16:32:28 +0000 (11:32 -0500)
commit17e708baf7f24192cb1c7c8dd6b32d1941dfb0e8
treec713e9ecc6ddddbb0790078fe379e05371a5fdac
parent309eca6db96ad69470220fa12c0bdc1ee64da8af
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>
drivers/net/dsa/mv88e6xxx/chip.c
drivers/net/dsa/mv88e6xxx/global1.c
drivers/net/dsa/mv88e6xxx/global1.h
drivers/net/dsa/mv88e6xxx/mv88e6xxx.h