Commit 2af7465c authored by Khasim Syed Mohammed's avatar Khasim Syed Mohammed Committed by Tony Lindgren

i2c: i2c-omap.c modified for 2430 I2C controller

In OMAP 2430 the I2C DATA Register is 8bit wide, the logic to write
16bit word doesn't apply for OMAP2430 I2C controller.
Signed-off-by: default avatarSyed Mohammed Khasim <x0khasim@ti.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent cff1701b
...@@ -478,9 +478,14 @@ omap_i2c_isr(int this_irq, void *dev_id) ...@@ -478,9 +478,14 @@ omap_i2c_isr(int this_irq, void *dev_id)
if (dev->buf_len) { if (dev->buf_len) {
*dev->buf++ = w; *dev->buf++ = w;
dev->buf_len--; dev->buf_len--;
if (dev->buf_len) { /*
*dev->buf++ = w >> 8; * Data reg in 2430 is 8 bit wide,
dev->buf_len--; */
if (!cpu_is_omap2430()) {
if (dev->buf_len) {
*dev->buf++ = w >> 8;
dev->buf_len--;
}
} }
} else } else
dev_err(dev->dev, "RRDY IRQ while no data" dev_err(dev->dev, "RRDY IRQ while no data"
...@@ -493,9 +498,14 @@ omap_i2c_isr(int this_irq, void *dev_id) ...@@ -493,9 +498,14 @@ omap_i2c_isr(int this_irq, void *dev_id)
if (dev->buf_len) { if (dev->buf_len) {
w = *dev->buf++; w = *dev->buf++;
dev->buf_len--; dev->buf_len--;
if (dev->buf_len) { /*
w |= *dev->buf++ << 8; * Data reg in 2430 is 8 bit wide,
dev->buf_len--; */
if (!cpu_is_omap2430()) {
if (dev->buf_len) {
w |= *dev->buf++ << 8;
dev->buf_len--;
}
} }
} else } else
dev_err(dev->dev, "XRDY IRQ while no" dev_err(dev->dev, "XRDY IRQ while no"
......
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