summaryrefslogtreecommitdiff
path: root/common/cmd_i2c.c
diff options
context:
space:
mode:
authorMatthias Fuchs <matthias.fuchs@esd-electronics.com>2007-03-08 16:25:47 +0100
committerStefan Roese <sr@denx.de>2007-03-08 22:17:49 +0100
commitd9fc703246840c4b268debf48c334ba55c597dc0 (patch)
tree4abe74c7976ae41fe2f69325a1285df9c1610d0b /common/cmd_i2c.c
parentced5b9029043397348cdc88e0cfcd6b1f629250b (diff)
[PATCH] I2C: disable flat i2c commands when CONFIG_I2C_CMD_TREE is defined
Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
Diffstat (limited to 'common/cmd_i2c.c')
-rw-r--r--common/cmd_i2c.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c
index 45cfde2eb8..888969bc62 100644
--- a/common/cmd_i2c.c
+++ b/common/cmd_i2c.c
@@ -948,6 +948,26 @@ int do_i2c(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
/***************************************************/
+#if defined(CONFIG_I2C_CMD_TREE)
+U_BOOT_CMD(
+ i2c, 6, 1, do_i2c,
+ "i2c - I2C sub-system\n",
+#if defined(CONFIG_I2C_MULTI_BUS)
+ "dev [dev] - show or set current I2C bus\n"
+#endif /* CONFIG_I2C_MULTI_BUS */
+ "i2c speed [speed] - show or set I2C bus speed\n"
+ "i2c md chip address[.0, .1, .2] [# of objects] - read from I2C device\n"
+ "i2c mm chip address[.0, .1, .2] - write to I2C device (auto-incrementing)\n"
+ "i2c mw chip address[.0, .1, .2] value [count] - write to I2C device (fill)\n"
+ "i2c nm chip address[.0, .1, .2] - write to I2C device (constant address)\n"
+ "i2c crc32 chip address[.0, .1, .2] count - compute CRC32 checksum\n"
+ "i2c probe - show devices on the I2C bus\n"
+ "i2c loop chip address[.0, .1, .2] [# of objects] - looping read of device\n"
+#if (CONFIG_COMMANDS & CFG_CMD_SDRAM)
+ "i2c sdram chip - print SDRAM configuration information\n"
+#endif /* CFG_CMD_SDRAM */
+);
+#else /* CONFIG_I2C_CMD_TREE */
U_BOOT_CMD(
imd, 4, 1, do_i2c_md, \
"imd - i2c memory display\n", \
@@ -1002,26 +1022,6 @@ U_BOOT_CMD(
" (valid chip values 50..57)\n"
);
#endif
-
-#if defined(CONFIG_I2C_CMD_TREE)
-U_BOOT_CMD(
- i2c, 6, 1, do_i2c,
- "i2c - I2C sub-system\n",
-#if defined(CONFIG_I2C_MULTI_BUS)
- "dev [dev] - show or set current I2C bus\n"
-#endif /* CONFIG_I2C_MULTI_BUS */
- "i2c speed [speed] - show or set I2C bus speed\n"
- "i2c md chip address[.0, .1, .2] [# of objects] - read from I2C device\n"
- "i2c mm chip address[.0, .1, .2] - write to I2C device (auto-incrementing)\n"
- "i2c mw chip address[.0, .1, .2] value [count] - write to I2C device (fill)\n"
- "i2c nm chip address[.0, .1, .2] - write to I2C device (constant address)\n"
- "i2c crc32 chip address[.0, .1, .2] count - compute CRC32 checksum\n"
- "i2c probe - show devices on the I2C bus\n"
- "i2c loop chip address[.0, .1, .2] [# of objects] - looping read of device\n"
-#if (CONFIG_COMMANDS & CFG_CMD_SDRAM)
- "i2c sdram chip - print SDRAM configuration information\n"
-#endif /* CFG_CMD_SDRAM */
-);
#endif /* CONFIG_I2C_CMD_TREE */
#endif /* CFG_CMD_I2C */