Merge branch 'master' of git://git.denx.de/u-boot-nand-flash
[platform/kernel/u-boot.git] / common / soft_i2c.c
index 0f6e3a9..23db2ee 100644 (file)
@@ -29,7 +29,7 @@
 #ifdef CONFIG_MPC8260                  /* only valid for MPC8260 */
 #include <ioports.h>
 #endif
-#ifdef CONFIG_AT91RM9200DK             /* need this for the at91rm9200dk */
+#ifdef CONFIG_AT91RM9200               /* need this for the at91rm9200 */
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #endif
@@ -41,8 +41,6 @@
 #endif
 #include <i2c.h>
 
-#if defined(CONFIG_SOFT_I2C)
-
 /* #define     DEBUG_I2C       */
 
 #ifdef DEBUG_I2C
@@ -252,6 +250,7 @@ static uchar read_byte(int ack)
         * Read 8 bits, MSB first.
         */
        I2C_TRISTATE;
+       I2C_SDA(1);
        data = 0;
        for(j = 0; j < 8; j++) {
                I2C_SCL(0);
@@ -422,6 +421,3 @@ void i2c_reg_write(uchar i2c_addr, uchar reg, uchar val)
 {
        i2c_write(i2c_addr, reg, 1, &val, 1);
 }
-
-
-#endif /* CONFIG_SOFT_I2C */