projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
76f0edd
)
ethernet: rockchip: add pd_gmac support for rk3399
author
David Wu
<david.wu@rock-chips.com>
Mon, 1 Aug 2016 08:38:28 +0000
(16:38 +0800)
committer
Huang, Tao
<huangtao@rock-chips.com>
Thu, 25 Aug 2016 03:44:20 +0000
(11:44 +0800)
Change-Id: I990e02f585ae9b2ecf99a7e996cd23041ca19a2b
Signed-off-by: David Wu <david.wu@rock-chips.com>
drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
index 4957618c3b80a6ef003b0f2ad91ece77dab7aa42..16416870910d9aa7e9c5cc3cffc9184324b5b092 100644
(file)
--- a/
drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
+++ b/
drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
@@
-30,6
+30,7
@@
#include <linux/delay.h>
#include <linux/mfd/syscon.h>
#include <linux/regmap.h>
+#include <linux/pm_runtime.h>
#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);
}