diff options
author | Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com> | 2012-10-24 06:58:31 -0400 |
---|---|---|
committer | Wolfram Sang <w.sang@pengutronix.de> | 2012-11-16 03:09:13 -0500 |
commit | 29fb08c300b5cb626b8a803440aab25d0983cab7 (patch) | |
tree | 334d4d82d2788c22e98f75e53ba9be4aa1416ada | |
parent | ebd5ac165f2aaefb767c53112c2010b0ff3df688 (diff) |
i2c: i2c-sh_mobile: fix spurious transfer request timed out
Ensure that any of preceding register write operations to the I2C
hardware block reached the module, and the write data is reflected
in the registers, before leaving the interrupt handler.
Otherwise, we'll suffer from spurious WAIT interrupts that lead to
'Transfer request timed out' message, and the transaction failed.
Reported-by: Teppei Kamijou <teppei.kamijou.yb@renesas.com>
Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
-rw-r--r-- | drivers/i2c/busses/i2c-sh_mobile.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c index 4c283583bea0..9411c1b892c0 100644 --- a/drivers/i2c/busses/i2c-sh_mobile.c +++ b/drivers/i2c/busses/i2c-sh_mobile.c | |||
@@ -469,6 +469,9 @@ static irqreturn_t sh_mobile_i2c_isr(int irq, void *dev_id) | |||
469 | wake_up(&pd->wait); | 469 | wake_up(&pd->wait); |
470 | } | 470 | } |
471 | 471 | ||
472 | /* defeat write posting to avoid spurious WAIT interrupts */ | ||
473 | iic_rd(pd, ICSR); | ||
474 | |||
472 | return IRQ_HANDLED; | 475 | return IRQ_HANDLED; |
473 | } | 476 | } |
474 | 477 | ||