Commit 0c81a8ee authored by Florian Fainelli's avatar Florian Fainelli Committed by David S. Miller

net: bcmgenet: fix GPHY power-up sequence

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: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8212c983
...@@ -179,14 +179,18 @@ static void bcmgenet_phy_power_set(struct net_device *dev, bool enable) ...@@ -179,14 +179,18 @@ static void bcmgenet_phy_power_set(struct net_device *dev, bool enable)
if (enable) { if (enable) {
reg = bcmgenet_ext_readl(priv, EXT_GPHY_CTRL); 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; reg |= EXT_GPHY_RESET;
bcmgenet_ext_writel(priv, reg, EXT_GPHY_CTRL); bcmgenet_ext_writel(priv, reg, EXT_GPHY_CTRL);
mdelay(2); mdelay(1);
reg &= ~EXT_GPHY_RESET; reg &= ~EXT_GPHY_RESET;
bcmgenet_ext_writel(priv, reg, EXT_GPHY_CTRL); bcmgenet_ext_writel(priv, reg, EXT_GPHY_CTRL);
udelay(20); udelay(60);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment