X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=common%2Fcmd_i2c.c;h=8f0fc9e1d73a11bea1aa3ae80425dc1c2f51fcf9;hb=168f7cfe562001d5d7c2c724b8232a1dfb2d3463;hp=44acfe4f69a1758dcae56392d183967f22cf1ceb;hpb=0a45a6357b02e5ce5bf899a60db09def6a129fee;p=u-boot diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c index 44acfe4f69..8f0fc9e1d7 100644 --- a/common/cmd_i2c.c +++ b/common/cmd_i2c.c @@ -1282,17 +1282,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; } @@ -1301,10 +1301,10 @@ int do_i2c(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) U_BOOT_CMD( i2c, 6, 1, do_i2c, "I2C sub-system", + "speed [speed] - show or set I2C bus speed\n" #if defined(CONFIG_I2C_MUX) - "bus [muxtype:muxaddr:muxchannel] - add a new bus reached over muxes.\n" + "i2c bus [muxtype:muxaddr:muxchannel] - add a new bus reached over muxes\n" #endif /* CONFIG_I2C_MUX */ - "speed [speed] - show or set I2C bus speed\n" #if defined(CONFIG_I2C_MULTI_BUS) "i2c dev [dev] - show or set current I2C bus\n" #endif /* CONFIG_I2C_MULTI_BUS */ @@ -1315,9 +1315,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 );