Commit b73a9aec authored by Troy Kisky's avatar Troy Kisky Committed by Jean Delvare

i2c-davinci: Fix lost interrupt

DAVINCI_I2C_STR_REG is a write 1 to clear register,
so don't use a read/modify/write cycle.
Signed-off-by: default avatarTroy Kisky <troy.kisky@boundarydevices.com>
Acked-by: default avatarDirk Behme <dirk.behme@gmail.com>
Signed-off-by: default avatarKevin Hilman <khilman@mvista.com>
Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
parent 852fb2ac
...@@ -382,9 +382,8 @@ static irqreturn_t i2c_davinci_isr(int this_irq, void *dev_id) ...@@ -382,9 +382,8 @@ static irqreturn_t i2c_davinci_isr(int this_irq, void *dev_id)
break; break;
case DAVINCI_I2C_IVR_ARDY: case DAVINCI_I2C_IVR_ARDY:
w = davinci_i2c_read_reg(dev, DAVINCI_I2C_STR_REG); davinci_i2c_write_reg(dev,
MOD_REG_BIT(w, DAVINCI_I2C_STR_ARDY, 1); DAVINCI_I2C_STR_REG, DAVINCI_I2C_STR_ARDY);
davinci_i2c_write_reg(dev, DAVINCI_I2C_STR_REG, w);
complete(&dev->cmd_complete); complete(&dev->cmd_complete);
break; break;
...@@ -397,12 +396,9 @@ static irqreturn_t i2c_davinci_isr(int this_irq, void *dev_id) ...@@ -397,12 +396,9 @@ static irqreturn_t i2c_davinci_isr(int this_irq, void *dev_id)
if (dev->buf_len) if (dev->buf_len)
continue; continue;
w = davinci_i2c_read_reg(dev,
DAVINCI_I2C_STR_REG);
MOD_REG_BIT(w, DAVINCI_I2C_IMR_RRDY, 0);
davinci_i2c_write_reg(dev, davinci_i2c_write_reg(dev,
DAVINCI_I2C_STR_REG, DAVINCI_I2C_STR_REG,
w); DAVINCI_I2C_IMR_RRDY);
} else } else
dev_err(dev->dev, "RDR IRQ while no " dev_err(dev->dev, "RDR IRQ while no "
"data requested\n"); "data requested\n");
...@@ -428,9 +424,8 @@ static irqreturn_t i2c_davinci_isr(int this_irq, void *dev_id) ...@@ -428,9 +424,8 @@ static irqreturn_t i2c_davinci_isr(int this_irq, void *dev_id)
break; break;
case DAVINCI_I2C_IVR_SCD: case DAVINCI_I2C_IVR_SCD:
w = davinci_i2c_read_reg(dev, DAVINCI_I2C_STR_REG); davinci_i2c_write_reg(dev,
MOD_REG_BIT(w, DAVINCI_I2C_STR_SCD, 1); DAVINCI_I2C_STR_REG, DAVINCI_I2C_STR_SCD);
davinci_i2c_write_reg(dev, DAVINCI_I2C_STR_REG, w);
complete(&dev->cmd_complete); complete(&dev->cmd_complete);
break; break;
......
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