diff options
author | Zhiwu Song <Zhiwu.Song@csr.com> | 2013-08-13 17:11:28 +0800 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2013-08-28 11:44:03 +0200 |
commit | ebae7dfab001890bc85d473275cc46611501664a (patch) | |
tree | f9f12666b12d649cd96b91cc165ebaad53fdb06d /drivers/i2c/busses | |
parent | c984319ad9c54c269493b6bc0517e8c2dfca4456 (diff) | |
download | blackbird-obmc-linux-ebae7dfab001890bc85d473275cc46611501664a.tar.gz blackbird-obmc-linux-ebae7dfab001890bc85d473275cc46611501664a.zip |
i2c: sirf: we need to wait I2C_RESET status in resume
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>
Diffstat (limited to 'drivers/i2c/busses')
-rw-r--r-- | drivers/i2c/busses/i2c-sirf.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-sirf.c b/drivers/i2c/busses/i2c-sirf.c index ff47a767f756..efb51a1d97ca 100644 --- a/drivers/i2c/busses/i2c-sirf.c +++ b/drivers/i2c/busses/i2c-sirf.c @@ -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); |