]> git.sur5r.net Git - u-boot/blobdiff - common/cmd_i2c.c
smc911x: update SMC911X related configuration description
[u-boot] / common / cmd_i2c.c
index b922b966afadd1937b1f01deefea23aa3104aa94..8d6feda27213c3b2b70180395c4740d2cf20f5d4 100644 (file)
@@ -326,14 +326,6 @@ int do_i2c_mw ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 #if !defined(CONFIG_SYS_I2C_FRAM)
                udelay(11000);
 #endif
-
-#if 0
-               for (timeout = 0; timeout < 10; timeout++) {
-                       udelay(2000);
-                       if (i2c_probe(chip) == 0)
-                               break;
-               }
-#endif
        }
 
        return (0);
@@ -1282,17 +1274,17 @@ int do_i2c(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
                return do_i2c_crc(cmdtp, flag, argc, argv);
        if (!strncmp(argv[0], "pr", 2))
                return do_i2c_probe(cmdtp, flag, argc, argv);
-       if (!strncmp(argv[0], "re", 2))
+       if (!strncmp(argv[0], "re", 2)) {
                i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
                return 0;
+       }
        if (!strncmp(argv[0], "lo", 2))
                return do_i2c_loop(cmdtp, flag, argc, argv);
 #if defined(CONFIG_CMD_SDRAM)
        if (!strncmp(argv[0], "sd", 2))
                return do_sdram(cmdtp, flag, argc, argv);
 #endif
-       else
-               cmd_usage(cmdtp);
+       cmd_usage(cmdtp);
        return 0;
 }
 
@@ -1315,9 +1307,10 @@ U_BOOT_CMD(
        "i2c crc32 chip address[.0, .1, .2] count - compute CRC32 checksum\n"
        "i2c probe - show devices on the I2C bus\n"
        "i2c reset - re-init the I2C Controller\n"
-       "i2c loop chip address[.0, .1, .2] [# of objects] - looping read of device\n"
+       "i2c loop chip address[.0, .1, .2] [# of objects] - looping read of device"
 #if defined(CONFIG_CMD_SDRAM)
-       "i2c sdram chip - print SDRAM configuration information\n"
+       "\n"
+       "i2c sdram chip - print SDRAM configuration information"
 #endif
 );