]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit2ea414493e56fe687b130b1afc6f52485f7a9be2
tree140bb8b5445fdb32c135012e182d2891f7bb0ec9
parent2a65de7fd225192b5a0d091cb9cf493562ef1ab6
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