net: bcmgenet: fix GPHY power-up sequence
authorFlorian Fainelli <f.fainelli@gmail.com>
Mon, 23 Mar 2015 22:09:54 +0000 (15:09 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 24 Mar 2015 02:10:42 +0000 (22:10 -0400)
We were missing a number of extra steps and delays to power-up the GPHY, update
the sequence to reflect the proper procedure here.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/genet/bcmmii.c

index 3fdbf57208a3a56e5fbf5c1e5a1a122f014913a7..c26c0757d75543f71f6eb86623139aad35eaefdd 100644 (file)
@@ -179,14 +179,18 @@ static void bcmgenet_phy_power_set(struct net_device *dev, bool enable)
 
        if (enable) {
                reg = bcmgenet_ext_readl(priv, EXT_GPHY_CTRL);
-               reg &= ~(EXT_CFG_IDDQ_BIAS | EXT_CFG_PWR_DOWN | EXT_CK25_DIS);
+               reg &= ~EXT_CK25_DIS;
+               bcmgenet_ext_writel(priv, reg, EXT_GPHY_CTRL);
+               mdelay(1);
+
+               reg &= ~(EXT_CFG_IDDQ_BIAS | EXT_CFG_PWR_DOWN);
                reg |= EXT_GPHY_RESET;
                bcmgenet_ext_writel(priv, reg, EXT_GPHY_CTRL);
-               mdelay(2);
+               mdelay(1);
 
                reg &= ~EXT_GPHY_RESET;
                bcmgenet_ext_writel(priv, reg, EXT_GPHY_CTRL);
-               udelay(20);
+               udelay(60);
        }
 }