]> Git Repo - linux.git/commit
net: fec: Ensure clocks are enabled while using mdio bus
authorAndrew Lunn <[email protected]>
Sat, 25 Jul 2015 20:38:02 +0000 (22:38 +0200)
committerDavid S. Miller <[email protected]>
Mon, 27 Jul 2015 08:21:47 +0000 (01:21 -0700)
commit8fff755e9f8d0f70a595e79f248695ce6aef5cc3
treedbaf78056303cdc56757fe65f1714ff70c8a1b30
parent7025e88a79d64aa4ba58fd03d630a78b12cce6ae
net: fec: Ensure clocks are enabled while using mdio bus

When a switch is attached to the mdio bus, the mdio bus can be used
while the interface is not open. If the IPG clock is not enabled, MDIO
reads/writes will simply time out.

Add support for runtime PM to control this clock. Enable/disable this
clock using runtime PM, with open()/close() and mdio read()/write()
function triggering runtime PM operations. Since PM is optional, the
IPG clock is enabled at probe and is no longer modified by
fec_enet_clk_enable(), thus if PM is not enabled in the kernel, it is
guaranteed the clock is running when MDIO operations are performed.

Signed-off-by: Andrew Lunn <[email protected]>
Signed-off-by: Lucas Stach <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Tested-by: Fabio Estevam <[email protected]>
Tested-by: Tyler Baker <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
drivers/net/ethernet/freescale/fec_main.c
This page took 0.054009 seconds and 4 git commands to generate.