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 <x0khasim@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
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"
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"