Skip to content

Commit

Permalink
fec: Enable/disable clk_ptp in suspend/resume
Browse files Browse the repository at this point in the history
clk_ptp should also be enabled in fec_resume() and disabled in fec_suspend().

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Fabio Estevam authored and David S. Miller committed Jul 22, 2013
1 parent d265cf4 commit 79820e7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/ethernet/freescale/fec_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2234,6 +2234,8 @@ fec_suspend(struct device *dev)
fec_stop(ndev);
netif_device_detach(ndev);
}
if (fep->clk_ptp)
clk_disable_unprepare(fep->clk_ptp);
if (fep->clk_enet_out)
clk_disable_unprepare(fep->clk_enet_out);
clk_disable_unprepare(fep->clk_ipg);
Expand Down Expand Up @@ -2262,6 +2264,8 @@ fec_resume(struct device *dev)
clk_prepare_enable(fep->clk_ipg);
if (fep->clk_enet_out)
clk_prepare_enable(fep->clk_enet_out);
if (fep->clk_ptp)
clk_prepare_enable(fep->clk_ptp);
if (netif_running(ndev)) {
fec_restart(ndev, fep->full_duplex);
netif_device_attach(ndev);
Expand Down

0 comments on commit 79820e7

Please sign in to comment.