net: fec: optimize the clock management to save power
authorNimrod Andy <B38611@freescale.com>
Tue, 20 May 2014 05:22:51 +0000 (13:22 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 May 2014 19:03:05 +0000 (15:03 -0400)
commite8fcfcd5684a4165fe3f86dd24baa14f1e3fad7e
tree6118a0cb8f84fbb6571efe8dc99158bf0ff479ba
parentfddb88723c918a4213e4e0f8ab0a1a55811b61d3
net: fec: optimize the clock management to save power

Add below clock management to save fec power:
- After probe, disable all clocks incluing ipg, ahb, enet_out, ptp clock.
- Open ethx interface enable necessary clocks.
  Close ethx interface disable all clocks.

The patch also encapsulates the all enet clocks enable/disable to
.fec_enet_clk_enable(), which can reduce the repetitional code in
driver.

Signed-off-by: Fugang Duan <B38611@freescale.com>
Acked-by: Frank Li <Frank.li@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fec_main.c