Skip to content

Commit

Permalink
drivers: net: davinci_mdio: restore mdio clk divider in mdio resume
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mugunthan V N authored and David S. Miller committed Jun 13, 2013
1 parent 5033ec3 commit cc60ab0
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/net/ethernet/ti/davinci_mdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit cc60ab0

Please sign in to comment.