Commit 4cdbf7d3 authored by Taras Kondratiuk's avatar Taras Kondratiuk Committed by Wolfram Sang

i2c: omap: Clear ARDY bit twice

Initially commit cb527ede
"i2c-omap: Double clear of ARDY status in IRQ handler"
added a workaround for undocumented errata ProDB0017052.
But then commit 1d7afc95
"i2c: omap: ack IRQ in parts" refactored code and missed
one of ARDY clearings. So current code violates errata.
It causes often i2c bus timeouts on my Pandaboard.

This patch adds a second clearing in place.
Signed-off-by: default avatarGrygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: default avatarTaras Kondratiuk <taras.kondratiuk@linaro.org>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
Cc: stable@kernel.org
parent 47b6e477
...@@ -939,6 +939,9 @@ omap_i2c_isr_thread(int this_irq, void *dev_id) ...@@ -939,6 +939,9 @@ omap_i2c_isr_thread(int this_irq, void *dev_id)
/* /*
* ProDB0017052: Clear ARDY bit twice * ProDB0017052: Clear ARDY bit twice
*/ */
if (stat & OMAP_I2C_STAT_ARDY)
omap_i2c_ack_stat(dev, OMAP_I2C_STAT_ARDY);
if (stat & (OMAP_I2C_STAT_ARDY | OMAP_I2C_STAT_NACK | if (stat & (OMAP_I2C_STAT_ARDY | OMAP_I2C_STAT_NACK |
OMAP_I2C_STAT_AL)) { OMAP_I2C_STAT_AL)) {
omap_i2c_ack_stat(dev, (OMAP_I2C_STAT_RRDY | omap_i2c_ack_stat(dev, (OMAP_I2C_STAT_RRDY |
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment