Merge branch 'testing' into working
[oweals/u-boot.git] / board / trab / trab_fkt.c
index 71be6e03e57c185e216d19dbe4ff37dc5dd47b06..7273ef97b659a7bf55f20fb74d6f6abd2d0ed754 100644 (file)
@@ -148,14 +148,14 @@ static int rs485_receive_chars (char *data, int timeout);
 static unsigned short updcrc(unsigned short icrc, unsigned char *icp,
                             unsigned int icnt);
 
-#if (CONFIG_COMMANDS & CFG_CMD_I2C)
+#if defined(CONFIG_CMD_I2C)
 static int trab_eeprom_read (char **argv);
 static int trab_eeprom_write (char **argv);
 int i2c_write_multiple (uchar chip, uint addr, int alen, uchar *buffer,
                        int len);
 int i2c_read_multiple ( uchar chip, uint addr, int alen, uchar *buffer,
                        int len);
-#endif /* CFG_CMD_I2C */
+#endif
 
 /*
  * TRAB board specific commands. Especially commands for burn-in and function
@@ -959,7 +959,7 @@ static int touch_check_pressed (void)
 
 static int touch_write_clibration_values (int calib_point, int x, int y)
 {
-#if (CONFIG_COMMANDS & CFG_CMD_I2C)
+#if defined(CONFIG_CMD_I2C)
        int x_verify = 0;
        int y_verify = 0;
 
@@ -1019,10 +1019,10 @@ static int touch_write_clibration_values (int calib_point, int x, int y)
        }
        return 1;
 #else
-       printf ("No I2C support enabled (CFG_CMD_I2C), could not write "
+       printf ("No I2C support enabled (CONFIG_CMD_I2C), could not write "
                "to EEPROM\n");
        return (1);
-#endif /* CFG_CMD_I2C */
+#endif
 }
 
 
@@ -1105,7 +1105,7 @@ static int rs485_receive_chars (char *data, int timeout)
 
 int do_serial_number (char **argv)
 {
-#if (CONFIG_COMMANDS & CFG_CMD_I2C)
+#if defined(CONFIG_CMD_I2C)
        unsigned int serial_number;
 
        if (strcmp (argv[2], "read") == 0) {
@@ -1130,16 +1130,16 @@ int do_serial_number (char **argv)
        printf ("%s: unknown command %s\n", __FUNCTION__, argv[2]);
        return (1);             /* unknown command, return error */
 #else
-       printf ("No I2C support enabled (CFG_CMD_I2C), could not write "
+       printf ("No I2C support enabled (CONFIG_CMD_I2C), could not write "
                "to EEPROM\n");
        return (1);
-#endif /* CFG_CMD_I2C */
+#endif
 }
 
 
 int do_crc16 (void)
 {
-#if (CONFIG_COMMANDS & CFG_CMD_I2C)
+#if defined(CONFIG_CMD_I2C)
        int crc;
        unsigned char buf[EEPROM_MAX_CRC_BUF];
 
@@ -1160,10 +1160,10 @@ int do_crc16 (void)
        }
        return (0);
 #else
-       printf ("No I2C support enabled (CFG_CMD_I2C), could not write "
+       printf ("No I2C support enabled (CONFIG_CMD_I2C), could not write "
                "to EEPROM\n");
        return (1);
-#endif /* CFG_CMD_I2C */
+#endif
 }
 
 
@@ -1260,7 +1260,7 @@ int do_gain (char **argv)
 
 int do_eeprom (char **argv)
 {
-#if (CONFIG_COMMANDS & CFG_CMD_I2C)
+#if defined(CONFIG_CMD_I2C)
        if (strcmp (argv[2], "read") == 0) {
                return (trab_eeprom_read (argv));
        }
@@ -1272,13 +1272,13 @@ int do_eeprom (char **argv)
        printf ("%s: invalid parameter %s\n", __FUNCTION__, argv[2]);
        return (1);
 #else
-       printf ("No I2C support enabled (CFG_CMD_I2C), could not write "
+       printf ("No I2C support enabled (CONFIG_CMD_I2C), could not write "
                "to EEPROM\n");
        return (1);
-#endif /* CFG_CMD_I2C */
+#endif
 }
 
-#if (CONFIG_COMMANDS & CFG_CMD_I2C)
+#if defined(CONFIG_CMD_I2C)
 static int trab_eeprom_read (char **argv)
 {
        int i;
@@ -1408,4 +1408,4 @@ int i2c_read_multiple ( uchar chip, uint addr, int alen,
        }
        return (0);
 }
-#endif /* CFG_CMD_I2C */
+#endif