drivers: net: davinci_mdio: restore mdio clk divider in mdio resume
authorMugunthan V N <mugunthanvnm@ti.com>
Tue, 11 Jun 2013 10:02:05 +0000 (15:32 +0530)
committerDavid S. Miller <davem@davemloft.net>
Thu, 13 Jun 2013 09:56:54 +0000 (02:56 -0700)
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>
drivers/net/ethernet/ti/davinci_mdio.c

index 74e56b3fba1182df2db3bd75a01f6f7a72b8512e..c47f0dbcebb513d7a33c49c92725350e13d73c6e 100644 (file)
@@ -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);