From: Khasim Syed Mohammed Date: Mon, 11 Dec 2006 21:44:55 +0000 (-0800) Subject: i2c: i2c-omap.c modified for 2430 I2C controller X-Git-Tag: v2.6.19-omap1~14 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=2af7465ce6afa52fc7748e4d5cf105c899b447fc;p=linux-2.6-omap-h63xx.git 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: Syed Mohammed Khasim Signed-off-by: Tony Lindgren --- diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index fa5a4f25e82..cd299d29906 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c @@ -478,9 +478,14 @@ omap_i2c_isr(int this_irq, void *dev_id) if (dev->buf_len) { *dev->buf++ = w; dev->buf_len--; - if (dev->buf_len) { - *dev->buf++ = w >> 8; - dev->buf_len--; + /* + * Data reg in 2430 is 8 bit wide, + */ + if (!cpu_is_omap2430()) { + if (dev->buf_len) { + *dev->buf++ = w >> 8; + dev->buf_len--; + } } } else dev_err(dev->dev, "RRDY IRQ while no data" @@ -493,9 +498,14 @@ omap_i2c_isr(int this_irq, void *dev_id) if (dev->buf_len) { w = *dev->buf++; dev->buf_len--; - if (dev->buf_len) { - w |= *dev->buf++ << 8; - dev->buf_len--; + /* + * Data reg in 2430 is 8 bit wide, + */ + if (!cpu_is_omap2430()) { + if (dev->buf_len) { + w |= *dev->buf++ << 8; + dev->buf_len--; + } } } else dev_err(dev->dev, "XRDY IRQ while no"