Merge with git://git.kernel.org/pub/scm/boot/u-boot/u-boot.git#ft_infr
[oweals/u-boot.git] / cpu / arm920t / at91rm9200 / i2c.c
index 569274082f2afbe3e5ef86daefed4abac8b3116a..826cea8e2641a7a6dc832bc955943cc403b3558f 100644 (file)
@@ -65,9 +65,8 @@ at91_xfer(unsigned char chip, unsigned int addr, int alen,
                | ((rw == 1) ? AT91C_TWI_MREAD : 0);
 
        /* Set TWI Internal Address Register with first messages data field */
-       /* only one address byte is supported  */
        if (alen > 0)
-               twi->TWI_IADR = addr & 0xff;
+               twi->TWI_IADR = addr;
 
        length = len;
        buf = buffer;
@@ -112,7 +111,7 @@ at91_xfer(unsigned char chip, unsigned int addr, int alen,
 int
 i2c_probe(unsigned char chip)
 {
-       char buffer[1];
+       unsigned char buffer[1];
 
        return at91_xfer(chip, 0, 0, buffer, 1, 1);
 }
@@ -192,7 +191,7 @@ i2c_init(int speed, int slaveaddr)
 
 uchar i2c_reg_read(uchar i2c_addr, uchar reg)
 {
-       char buf;
+       unsigned char buf;
 
        i2c_read(i2c_addr, reg, 1, &buf, 1);