[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1427148231-18902-6-git-send-email-f.fainelli@gmail.com>
Date: Mon, 23 Mar 2015 15:03:49 -0700
From: Florian Fainelli <f.fainelli@...il.com>
To: netdev@...r.kernel.org
Cc: Florian Fainelli <f.fainelli@...il.com>
Subject: [PATCH net-next 5/7] net: bcmgenet: implement GPHY power down sequence
Implement the GPHY power down sequence by setting all power down bits, putting
the GPHY in reset, and finally cutting the 25Mhz reference clock.
Signed-off-by: Florian Fainelli <f.fainelli@...il.com>
---
drivers/net/ethernet/broadcom/genet/bcmmii.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/broadcom/genet/bcmmii.c b/drivers/net/ethernet/broadcom/genet/bcmmii.c
index c26c0757d755..77d6a18707c3 100644
--- a/drivers/net/ethernet/broadcom/genet/bcmmii.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmmii.c
@@ -177,6 +177,7 @@ static void bcmgenet_phy_power_set(struct net_device *dev, bool enable)
if (!GENET_IS_V4(priv))
return;
+ reg = bcmgenet_ext_readl(priv, EXT_GPHY_CTRL);
if (enable) {
reg = bcmgenet_ext_readl(priv, EXT_GPHY_CTRL);
reg &= ~EXT_CK25_DIS;
@@ -189,9 +190,14 @@ static void bcmgenet_phy_power_set(struct net_device *dev, bool enable)
mdelay(1);
reg &= ~EXT_GPHY_RESET;
+ } else {
+ reg |= EXT_CFG_IDDQ_BIAS | EXT_CFG_PWR_DOWN | EXT_GPHY_RESET;
bcmgenet_ext_writel(priv, reg, EXT_GPHY_CTRL);
- udelay(60);
+ mdelay(1);
+ reg |= EXT_CK25_DIS;
}
+ bcmgenet_ext_writel(priv, reg, EXT_GPHY_CTRL);
+ udelay(60);
}
static void bcmgenet_internal_phy_setup(struct net_device *dev)
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists