]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
net, davinci_emac: let the EMAC detect the PHYs
authorHeiko Schocher <hs@denx.de>
Wed, 14 Sep 2011 19:37:42 +0000 (19:37 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Fri, 30 Sep 2011 20:00:57 +0000 (22:00 +0200)
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>
drivers/net/davinci_emac.c

index d58c28bca30facf59ebb8d8ffee6a60503724040..a8905b88f19fb958d0d5a18e6c715439c69456e1 100644 (file)
@@ -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;