diff options
author | Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com> | 2020-12-16 23:49:16 +0300 |
---|---|---|
committer | Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com> | 2021-11-05 10:22:12 +0300 |
commit | 57977b601a7dcc6e6448dc5443c64111585b5df0 (patch) | |
tree | 4278f6700693e85a4343b8e795161ce8490f40be /drivers/i2c | |
parent | b9c5e4a55eb6bdfd4191e7223638bf7990088956 (diff) | |
download | linux-57977b601a7dcc6e6448dc5443c64111585b5df0.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>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-aspeed.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-aspeed.c b/drivers/i2c/busses/i2c-aspeed.c index 5c8ec9525c72..50b28c45e00e 100644 --- a/drivers/i2c/busses/i2c-aspeed.c +++ b/drivers/i2c/busses/i2c-aspeed.c @@ -1617,6 +1617,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); |