aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-omap.c
diff options
context:
space:
mode:
authorJan Weitzel <j.weitzel@phytec.de>2011-12-07 14:50:16 -0500
committerBen Dooks <ben-linux@fluff.org>2012-01-17 17:44:54 -0500
commit78e1cf42ee3efd2c3e8af0b97cf0a0a570cc0c1f (patch)
tree789fb9325b72a6ee86c474b7f98dc3767661cd45 /drivers/i2c/busses/i2c-omap.c
parent2727b1753934e154931d6b3bdf20c9b2398457a2 (diff)
I2C: OMAP: NACK without STP
On OMAP4 OMAP_I2C_STAT_NACK is causing a timeout on the next access. The isr cleans all flags in OMAP_I2C_CON_REG by setting OMAP_I2C_CON_STP OMAP_I2C_CON_STP is also set in omap_i2c_xfer_msg on the last message. According to the TI TSR the sequence for OMAP_I2C_STAT_NACK and OMAP_I2C_STAT_AL are nearly the same. Removing the OMAP_I2C_CON_STP part in the isr fix the problem. Tested on OMAP4430 and OMAP3530 (here NACK was not a problem) Fixes also booting on 2430sdp. Signed-off-by: Jan Weitzel <j.weitzel@phytec.de> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'drivers/i2c/busses/i2c-omap.c')
-rw-r--r--drivers/i2c/busses/i2c-omap.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 257c1a52c8c..e0733b77607 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -830,11 +830,9 @@ complete:
830 ~(OMAP_I2C_STAT_RRDY | OMAP_I2C_STAT_RDR | 830 ~(OMAP_I2C_STAT_RRDY | OMAP_I2C_STAT_RDR |
831 OMAP_I2C_STAT_XRDY | OMAP_I2C_STAT_XDR)); 831 OMAP_I2C_STAT_XRDY | OMAP_I2C_STAT_XDR));
832 832
833 if (stat & OMAP_I2C_STAT_NACK) { 833 if (stat & OMAP_I2C_STAT_NACK)
834 err |= OMAP_I2C_STAT_NACK; 834 err |= OMAP_I2C_STAT_NACK;
835 omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, 835
836 OMAP_I2C_CON_STP);
837 }
838 if (stat & OMAP_I2C_STAT_AL) { 836 if (stat & OMAP_I2C_STAT_AL) {
839 dev_err(dev->dev, "Arbitration lost\n"); 837 dev_err(dev->dev, "Arbitration lost\n");
840 err |= OMAP_I2C_STAT_AL; 838 err |= OMAP_I2C_STAT_AL;