summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeiko Schocher <hs@denx.de>2011-09-14 19:37:42 +0000
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2011-09-30 22:00:57 +0200
commit19fdf9a1c338c408b992f3d0a7fd03b4207b8cf9 (patch)
tree09d0e4b77ae3bf51b57712b72b64131dc8a3422d
parentc3b4a475d7887efe1cdc8a3fe9e909df30a353f0 (diff)
downloadu-boot-imx-19fdf9a1c338c408b992f3d0a7fd03b4207b8cf9.zip
u-boot-imx-19fdf9a1c338c408b992f3d0a7fd03b4207b8cf9.tar.gz
u-boot-imx-19fdf9a1c338c408b992f3d0a7fd03b4207b8cf9.tar.bz2
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: Heiko Schocher <hs@denx.de> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
-rw-r--r--drivers/net/davinci_emac.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
index d58c28b..a8905b8 100644
--- a/drivers/net/davinci_emac.c
+++ b/drivers/net/davinci_emac.c
@@ -680,6 +680,9 @@ int davinci_emac_initialize(void)
davinci_eth_mdio_enable();
+ /* let the EMAC detect the PHYs */
+ udelay(5000);
+
for (i = 0; i < 256; i++) {
if (readl(&adap_mdio->ALIVE))
break;