Skip to content
Snippets Groups Projects
Commit 19fdf9a1 authored by Heiko Schocher's avatar Heiko Schocher Committed by Albert ARIBAUD
Browse files

net, davinci_emac: let the EMAC detect the PHYs


Once the MDIO state machine has been initialized and enabled, it
starts polling all 32 PHY addresses on the MDIO bus, looking for
an active PHY. Add a 5 ms delay, so all PHYs are for sure detected.

This problem was detected on the cmc board with a KSZ8864 switch.

Signed-off-by: default avatarHeiko Schocher <hs@denx.de>
Signed-off-by: default avatarSandeep Paulraj <s-paulraj@ti.com>
parent c3b4a475
No related branches found
No related tags found
No related merge requests found
...@@ -680,6 +680,9 @@ int davinci_emac_initialize(void) ...@@ -680,6 +680,9 @@ int davinci_emac_initialize(void)
davinci_eth_mdio_enable(); davinci_eth_mdio_enable();
/* let the EMAC detect the PHYs */
udelay(5000);
for (i = 0; i < 256; i++) { for (i = 0; i < 256; i++) {
if (readl(&adap_mdio->ALIVE)) if (readl(&adap_mdio->ALIVE))
break; break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment