]> 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)
commit24414243571637340b1722a0a271c96074f8c6da
tree140bb8b5445fdb32c135012e182d2891f7bb0ec9
parente03195c1b8eab2ba004fea3e2ac3a3fb8196249b
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