summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMugunthan V N <mugunthanvnm@ti.com>2013-06-11 12:02:05 +0200
committerDavid S. Miller <davem@davemloft.net>2013-06-13 11:56:54 +0200
commitcc60ab0a8b5b62ea6b5cc1c6397adb5b4bd41271 (patch)
treec016cca4d63e8da8d93d76e6e7e214c13deed3cb
parentdrivers: net: davinci_mdio: moving mdio resume earlier than cpsw ethernet driver (diff)
downloadlinux-cc60ab0a8b5b62ea6b5cc1c6397adb5b4bd41271.tar.xz
linux-cc60ab0a8b5b62ea6b5cc1c6397adb5b4bd41271.zip
drivers: net: davinci_mdio: restore mdio clk divider in mdio resume
During suspend resume cycle all the register data is lost, so MDIO clock divier value gets reset. This patch restores the clock divider value. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/ti/davinci_mdio.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/ethernet/ti/davinci_mdio.c b/drivers/net/ethernet/ti/davinci_mdio.c
index 74e56b3fba11..c47f0dbcebb5 100644
--- a/drivers/net/ethernet/ti/davinci_mdio.c
+++ b/drivers/net/ethernet/ti/davinci_mdio.c
@@ -459,15 +459,12 @@ static int davinci_mdio_suspend(struct device *dev)
static int davinci_mdio_resume(struct device *dev)
{
struct davinci_mdio_data *data = dev_get_drvdata(dev);
- u32 ctrl;
pm_runtime_get_sync(data->dev);
spin_lock(&data->lock);
/* restart the scan state machine */
- ctrl = __raw_readl(&data->regs->control);
- ctrl |= CONTROL_ENABLE;
- __raw_writel(ctrl, &data->regs->control);
+ __davinci_mdio_reset(data);
data->suspended = false;
spin_unlock(&data->lock);