net: dsa: mv88e6xxx: Wait for EEPROM done after HW reset
authorAndrew Lunn <andrew@lunn.ch>
Mon, 16 Nov 2020 16:43:01 +0000 (08:43 -0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 18 Nov 2020 19:24:44 +0000 (11:24 -0800)
commita3dcb3e7e70c72a68a79b30fc3a3adad5612731c
tree140bb8b5445fdb32c135012e182d2891f7bb0ec9
parentfc2635bff24c6b75291ead011c16da7a053fb4f5
net: dsa: mv88e6xxx: Wait for EEPROM done after HW reset

When the switch is hardware reset, it reads the contents of the
EEPROM. This can contain instructions for programming values into
registers and to perform waits between such programming. Reading the
EEPROM can take longer than the 100ms mv88e6xxx_hardware_reset() waits
after deasserting the reset GPIO. So poll the EEPROM done bit to
ensure it is complete.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Ruslan Sushko <rus@sushko.dev>
Link: https://lore.kernel.org/r/20201116164301.977661-1-rus@sushko.dev
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/mv88e6xxx/chip.c
drivers/net/dsa/mv88e6xxx/global1.c
drivers/net/dsa/mv88e6xxx/global1.h