From: David Wu Date: Mon, 1 Aug 2016 08:38:28 +0000 (+0800) Subject: ethernet: rockchip: add pd_gmac support for rk3399 X-Git-Tag: firefly_0821_release~1680 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a96cdb46d92064c6f1f04f0b0d022cca9ca7e0e9;p=firefly-linux-kernel-4.4.55.git ethernet: rockchip: add pd_gmac support for rk3399 Change-Id: I990e02f585ae9b2ecf99a7e996cd23041ca19a2b Signed-off-by: David Wu --- diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c index 4957618c3b80..16416870910d 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c @@ -30,6 +30,7 @@ #include #include #include +#include #include "stmmac_platform.h" @@ -883,6 +884,9 @@ static int rk_gmac_init(struct platform_device *pdev, void *priv) if (ret) return ret; + pm_runtime_enable(&pdev->dev); + pm_runtime_get_sync(&pdev->dev); + return 0; } @@ -890,6 +894,9 @@ static void rk_gmac_exit(struct platform_device *pdev, void *priv) { struct rk_priv_data *gmac = priv; + pm_runtime_put_sync(&pdev->dev); + pm_runtime_disable(&pdev->dev); + phy_power_on(gmac, false); gmac_clk_enable(gmac, false); }