From: Zhiwu Song Date: Tue, 13 Aug 2013 09:11:28 +0000 (+0800) Subject: i2c: sirf: we need to wait I2C_RESET status in resume X-Git-Tag: v3.12-rc1~140^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ebae7dfab001890bc85d473275cc46611501664a;p=platform%2Fkernel%2Flinux-exynos.git 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 Signed-off-by: Barry Song Signed-off-by: Wolfram Sang --- diff --git a/drivers/i2c/busses/i2c-sirf.c b/drivers/i2c/busses/i2c-sirf.c index ff47a76..efb51a1 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);