summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
diff options
context:
space:
mode:
authorVince Bridgers <vbridgers2013@gmail.com>2014-07-28 14:07:58 -0500
committerDavid S. Miller <davem@davemloft.net>2014-07-30 15:11:54 -0700
commit2d871aa07136fe6e576bde63072cf33e2c664e95 (patch)
tree2121873a04bd15b229a71672f7a8f05932fef2d5 /drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
parent7aa06bf57bb633681e11c06c85604ad014910d55 (diff)
downloadblackbird-op-linux-2d871aa07136fe6e576bde63072cf33e2c664e95.tar.gz
blackbird-op-linux-2d871aa07136fe6e576bde63072cf33e2c664e95.zip
net: stmmac: add platform init/exit for Altera's ARM socfpga
This patch adds platform init/exit functions and modifications to support suspend/resume for the Altera Cyclone 5 SOC Ethernet controller. The platform exit function puts the controller into reset using the socfpga reset controller driver. The platform init function sets up the Synopsys mac by first making sure the Ethernet controller is held in reset, programming the phy mode through external support logic, then deasserts reset through the socfpga reset manager driver. Signed-off-by: Vince Bridgers <vbridgers2013@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/stmmac_main.c')
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 057a1208e594..18315f34938b 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -2878,6 +2878,10 @@ int stmmac_suspend(struct net_device *ndev)
clk_disable_unprepare(priv->stmmac_clk);
}
spin_unlock_irqrestore(&priv->lock, flags);
+
+ priv->oldlink = 0;
+ priv->speed = 0;
+ priv->oldduplex = -1;
return 0;
}
OpenPOWER on IntegriCloud