Skip to content

Commit

Permalink
i2c: i2c-sh_mobile: fix spurious transfer request timed out
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shinya Kuribayashi authored and Wolfram Sang committed Nov 16, 2012
1 parent ebd5ac1 commit 29fb08c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/i2c/busses/i2c-sh_mobile.c
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,9 @@ static irqreturn_t sh_mobile_i2c_isr(int irq, void *dev_id)
wake_up(&pd->wait);
}

/* defeat write posting to avoid spurious WAIT interrupts */
iic_rd(pd, ICSR);

return IRQ_HANDLED;
}

Expand Down

0 comments on commit 29fb08c

Please sign in to comment.