i2c: aspeed: Avoid i2c interrupt status clear race condition.
authorryan_chen <ryan_chen@aspeedtech.com>
Wed, 29 Apr 2020 03:37:37 +0000 (11:37 +0800)
committerWolfram Sang <wsa@the-dreams.de>
Thu, 30 Apr 2020 14:12:33 +0000 (16:12 +0200)
commitc926c87b8e36dcc0ea5c2a0a0227ed4f32d0516a
tree47801a236531ba89857e864f0c5241bc718185c7
parentac2b0813fceaf7cb3d8d46c7b33c90bae9fa49db
i2c: aspeed: Avoid i2c interrupt status clear race condition.

In AST2600 there have a slow peripheral bus between CPU and i2c
controller. Therefore GIC i2c interrupt status clear have delay timing,
when CPU issue write clear i2c controller interrupt status. To avoid
this issue, the driver need have read after write clear at i2c ISR.

Fixes: f327c686d3ba ("i2c: aspeed: added driver for Aspeed I2C")
Signed-off-by: ryan_chen <ryan_chen@aspeedtech.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
[wsa: added Fixes tag]
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-aspeed.c