]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/soft_i2c.c
Fix some compile problems introduced by the latest CFG_CMD_xxx cleanup
[karo-tx-uboot.git] / common / soft_i2c.c
index 48e3d3e1c2602766374c080fe68ab80f0d2bda6f..0f6e3a938d270f45eeab76e4752e97ea6bf53578 100644 (file)
 #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)
@@ -164,13 +173,10 @@ static void send_ack(int ack)
        volatile immap_t *immr = (immap_t *)CFG_IMMR;
 #endif
 
-       I2C_ACTIVE;
        I2C_SCL(0);
        I2C_DELAY;
-
-       I2C_SDA(ack);
-
        I2C_ACTIVE;
+       I2C_SDA(ack);
        I2C_DELAY;
        I2C_SCL(1);
        I2C_DELAY;