Skip to content

Commit

Permalink
i2c: sirf: we need to wait I2C_RESET status in resume
Browse files Browse the repository at this point in the history
this fixes the issue that we lost to wait the i2c reset finished.

Signed-off-by: Zhiwu Song <Zhiwu.Song@csr.com>
Signed-off-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
  • Loading branch information
Zhiwu Song authored and Wolfram Sang committed Aug 28, 2013
1 parent c984319 commit ebae7df
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/i2c/busses/i2c-sirf.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,8 @@ static int i2c_sirfsoc_resume(struct device *dev)

clk_enable(siic->clk);
writel(SIRFSOC_I2C_RESET, siic->base + SIRFSOC_I2C_CTRL);
while (readl(siic->base + SIRFSOC_I2C_CTRL) & SIRFSOC_I2C_RESET)
cpu_relax();
writel(SIRFSOC_I2C_CORE_EN | SIRFSOC_I2C_MASTER_MODE,
siic->base + SIRFSOC_I2C_CTRL);
writel(siic->clk_div, siic->base + SIRFSOC_I2C_CLK_CTRL);
Expand Down

0 comments on commit ebae7df

Please sign in to comment.