i2c: rcar: always clear ICSAR to avoid side effects
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Sat, 4 Jul 2020 13:38:29 +0000 (15:38 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Jul 2020 08:19:47 +0000 (10:19 +0200)
commit59feaa9f9bccf4681acf9d0322360128cdbfe416
tree0a8f61c195ed3d3d063fdfe7540f9fcf335afa2c
parentf0654ffe11889137ff857026e0d0e12e90953c61
i2c: rcar: always clear ICSAR to avoid side effects

[ Upstream commit eb01597158ffb1853a7a7fc2c57d4c844640f75e ]

On R-Car Gen2, we get a timeout when reading from the address set in
ICSAR, even though the slave interface is disabled. Clearing it fixes
this situation. Note that Gen3 is not affected.

To reproduce: bind and undbind an I2C slave on some bus, run
'i2cdetect' on that bus.

Fixes: de20d1857dd6 ("i2c: rcar: add slave support")
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/i2c/busses/i2c-rcar.c