Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ebae7dfa authored by Zhiwu Song's avatar Zhiwu Song Committed by Wolfram Sang
Browse files

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: default avatarZhiwu Song <Zhiwu.Song@csr.com>
Signed-off-by: default avatarBarry Song <Baohua.Song@csr.com>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent c984319a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);