]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/i2c/omap24xx_i2c.c
Merge branch 'u-boot-ti/master' into 'u-boot-arm/master'
[karo-tx-uboot.git] / drivers / i2c / omap24xx_i2c.c
index 1bbb2ca54c1f7a0606567f94f01c25e64065a8b6..54e9b1586fb8ad17baec72d1910bb6ceca511a48 100644 (file)
@@ -180,7 +180,8 @@ static int i2c_read_byte(u8 devaddr, u16 regoffset, u8 alen, u8 *value)
                if (status & I2C_STAT_XRDY) {
                        w = tmpbuf[i++];
 #if !(defined(CONFIG_OMAP243X) || defined(CONFIG_OMAP34XX) || \
-       defined(CONFIG_OMAP44XX) || defined(CONFIG_AM33XX))
+       defined(CONFIG_OMAP44XX) || defined(CONFIG_AM33XX) || \
+       defined(CONFIG_OMAP54XX))
                        w |= tmpbuf[i++] << 8;
 #endif
                        writew(w, &i2c_base->data);
@@ -210,7 +211,8 @@ static int i2c_read_byte(u8 devaddr, u16 regoffset, u8 alen, u8 *value)
                }
                if (status & I2C_STAT_RRDY) {
 #if defined(CONFIG_OMAP243X) || defined(CONFIG_OMAP34XX) || \
-       defined(CONFIG_OMAP44XX) || defined(CONFIG_AM33XX)
+       defined(CONFIG_OMAP44XX) || defined(CONFIG_AM33XX) || \
+       defined(CONFIG_OMAP54XX)
                        *value = readb(&i2c_base->data);
 #else
                        *value = readw(&i2c_base->data);
@@ -240,7 +242,8 @@ static void flush_fifo(void)
                stat = readw(&i2c_base->stat);
                if (stat == I2C_STAT_RRDY) {
 #if defined(CONFIG_OMAP243X) || defined(CONFIG_OMAP34XX) || \
-       defined(CONFIG_OMAP44XX) || defined(CONFIG_AM33XX)
+       defined(CONFIG_OMAP44XX) || defined(CONFIG_AM33XX) || \
+       defined(CONFIG_OMAP54XX)
                        readb(&i2c_base->data);
 #else
                        readw(&i2c_base->data);
@@ -294,7 +297,8 @@ int i2c_probe(uchar chip)
                if (status & I2C_STAT_RRDY) {
                        res = 0;
 #if defined(CONFIG_OMAP243X) || defined(CONFIG_OMAP34XX) || \
-    defined(CONFIG_OMAP44XX) || defined(CONFIG_AM33XX)
+       defined(CONFIG_OMAP44XX) || defined(CONFIG_AM33XX) || \
+       defined(CONFIG_OMAP54XX)
                        readb(&i2c_base->data);
 #else
                        readw(&i2c_base->data);
@@ -382,7 +386,8 @@ int i2c_write(uchar chip, uint addr, int alen, uchar *buffer, int len)
                if (status & I2C_STAT_XRDY) {
                        w = (i < 0) ? tmpbuf[2+i] : buffer[i];
 #if !(defined(CONFIG_OMAP243X) || defined(CONFIG_OMAP34XX) || \
-       defined(CONFIG_OMAP44XX) || defined(CONFIG_AM33XX))
+       defined(CONFIG_OMAP44XX) || defined(CONFIG_AM33XX) || \
+       defined(CONFIG_OMAP54XX))
                        w |= ((++i < 0) ? tmpbuf[2+i] : buffer[i]) << 8;
 #endif
                        writew(w, &i2c_base->data);