summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJae Hyun Yoo <jae.hyun.yoo@linux.intel.com>2020-12-16 23:49:16 +0300
committerYoo, Jae Hyun <jae.hyun.yoo@intel.com>2020-12-18 20:03:46 +0300
commit27c6f30e6e4317b43661fabcf4839613f3d9ef62 (patch)
tree5f436f6810d29a6eca6d01060bce73ef09d30656
parent9a05ca0a3d97473bf39d28818bd9a1ca2b3e78fe (diff)
downloadlinux-27c6f30e6e4317b43661fabcf4839613f3d9ef62.tar.xz
i2c: aspeed: clear slave addresses in probe
Initial value of I2CD18 is undefined according to the datasheet so this commit adds the I2CD18 register clearing code into bus initialization function to prevent any unexpected slave match events. Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com> Change-Id: I6c6cadeaf6fefcf74eba0d96c49986a810ccbb51
-rw-r--r--drivers/i2c/busses/i2c-aspeed.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-aspeed.c b/drivers/i2c/busses/i2c-aspeed.c
index d622ca14eb2a..d48489c803a8 100644
--- a/drivers/i2c/busses/i2c-aspeed.c
+++ b/drivers/i2c/busses/i2c-aspeed.c
@@ -1610,6 +1610,9 @@ static int aspeed_i2c_probe_bus(struct platform_device *pdev)
writel(0, bus->base + ASPEED_I2C_INTR_CTRL_REG);
writel(0xffffffff, bus->base + ASPEED_I2C_INTR_STS_REG);
+ /* Clear slave addresses. */
+ writel(0, bus->base + ASPEED_I2C_DEV_ADDR_REG);
+
parent_clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(parent_clk))
return PTR_ERR(parent_clk);