Commit 8212c983 authored by Florian Fainelli's avatar Florian Fainelli Committed by David S. Miller

net: bcmgenet: rename bcmgenet_ephy_power_up

In preparation for implementing the power down GPHY sequence, rename
bcmgenet_ephy_power_up to illustrate that it is not EPHY specific but
PHY agnostic, and add an "enable" argument.
Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0d017e21
......@@ -168,7 +168,7 @@ void bcmgenet_mii_reset(struct net_device *dev)
}
}
static void bcmgenet_ephy_power_up(struct net_device *dev)
static void bcmgenet_phy_power_set(struct net_device *dev, bool enable)
{
struct bcmgenet_priv *priv = netdev_priv(dev);
u32 reg = 0;
......@@ -177,6 +177,7 @@ static void bcmgenet_ephy_power_up(struct net_device *dev)
if (!GENET_IS_V4(priv))
return;
if (enable) {
reg = bcmgenet_ext_readl(priv, EXT_GPHY_CTRL);
reg &= ~(EXT_CFG_IDDQ_BIAS | EXT_CFG_PWR_DOWN | EXT_CK25_DIS);
reg |= EXT_GPHY_RESET;
......@@ -186,6 +187,7 @@ static void bcmgenet_ephy_power_up(struct net_device *dev)
reg &= ~EXT_GPHY_RESET;
bcmgenet_ext_writel(priv, reg, EXT_GPHY_CTRL);
udelay(20);
}
}
static void bcmgenet_internal_phy_setup(struct net_device *dev)
......@@ -193,8 +195,8 @@ static void bcmgenet_internal_phy_setup(struct net_device *dev)
struct bcmgenet_priv *priv = netdev_priv(dev);
u32 reg;
/* Power up EPHY */
bcmgenet_ephy_power_up(dev);
/* Power up PHY */
bcmgenet_phy_power_set(dev, true);
/* enable APD */
reg = bcmgenet_ext_readl(priv, EXT_EXT_PWR_MGMT);
reg |= EXT_PWR_DN_EN_LD;
......
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