From a96cdb46d92064c6f1f04f0b0d022cca9ca7e0e9 Mon Sep 17 00:00:00 2001 From: David Wu Date: Mon, 1 Aug 2016 16:38:28 +0800 Subject: [PATCH] ethernet: rockchip: add pd_gmac support for rk3399 Change-Id: I990e02f585ae9b2ecf99a7e996cd23041ca19a2b Signed-off-by: David Wu --- drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 7 +++++++ 1 file changed, 7 insertions(+) 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); } -- 2.34.1