]> git.sur5r.net Git - u-boot/blobdiff - common/soft_i2c.c
Merge branch 'master' of git://www.denx.de/git/u-boot-ppc4xx
[u-boot] / common / soft_i2c.c
index b3642dafc24564b44b151db1e4f0cffd50b3473e..5ef7f303b8435d52a5ccb8151d316b8e79141ada 100644 (file)
 #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
+#ifdef CONFIG_IXP425                   /* only valid for IXP425 */
+#include <asm/arch/ixp425.h>
+#endif
+#ifdef CONFIG_LPC2292
+#include <asm/arch/hardware.h>
+#endif
 #include <i2c.h>
 
 #if defined(CONFIG_SOFT_I2C)
 
 /* #define     DEBUG_I2C       */
 
+#ifdef DEBUG_I2C
+DECLARE_GLOBAL_DATA_PTR;
+#endif
+
 
 /*-----------------------------------------------------------------------
  * Definitions
@@ -53,7 +63,6 @@
 
 #ifdef DEBUG_I2C
 #define PRINTD(fmt,args...)    do {    \
-       DECLARE_GLOBAL_DATA_PTR;        \
        if (gd->have_console)           \
                printf (fmt ,##args);   \
        } while (0)
@@ -243,6 +252,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);