[U-Boot-Users] [PATCH][RFC] disable flat i2c commands when CONFIG_I2C_CMD_TREE defined
Matthias Fuchs
matthias.fuchs at esd-electronics.com
Fri Mar 2 17:59:18 CET 2007
Hi,
I noticed that when using CONFIG_I2C_CMD_TREE to enable
the 'i2c' command with its sub commands, I also get the flat
i2c commands (imm, iprobe, ...) compiled into u-boot.
I think this is more than I need and want.
Does anything speak against disabling the flat i2c commands
when CONFIG_I2C_CMD_TREE is defined?
This is how I've done it (please skip the SPD stuff).
Matthias
diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c
index 45cfde2..59a4276 100644
--- a/common/cmd_i2c.c
+++ b/common/cmd_i2c.c
@@ -701,6 +701,7 @@ int do_sdram ( cmd_tbl_t *cmdtp, int fl
switch(data[2]) {
case 2: puts ("EDO\n"); break;
case 4: puts ("SDRAM\n"); break;
+ case 8: puts ("DDR2\n"); break;
default: puts ("unknown\n"); break;
}
puts ("Row address bits ");
@@ -722,6 +723,7 @@ int do_sdram ( cmd_tbl_t *cmdtp, int fl
case 2: puts ("HSTL 1.5\n"); break;
case 3: puts ("SSTL 3.3\n"); break;
case 4: puts ("SSTL 2.5\n"); break;
+ case 5: puts ("SSTL 1.8\n"); break;
default: puts ("unknown\n"); break;
}
printf("SDRAM cycle time %d.%d nS\n",
@@ -948,6 +950,7 @@ int do_i2c(cmd_tbl_t * cmdtp, int flag,
/***************************************************/
+#if !defined(CONFIG_I2C_CMD_TREE)
U_BOOT_CMD(
imd, 4, 1, do_i2c_md, \
"imd - i2c memory display\n", \
@@ -1002,8 +1005,7 @@ U_BOOT_CMD(
" (valid chip values 50..57)\n"
);
#endif
-
-#if defined(CONFIG_I2C_CMD_TREE)
+#else /* CONFIG_I2C_CMD_TREE */
U_BOOT_CMD(
i2c, 6, 1, do_i2c,
"i2c - I2C sub-system\n",
--
-----------------------------------------------------------------------
Dipl.-Ing. Matthias Fuchs esd electronic system design gmbh
http://www.esd-electronics.com Vahrenwalder Str. 207
phone: +49-511-37298-0, fax: -68 30165 Hannover, Germany
-----------------------------------------------------------------------
More information about the U-Boot
mailing list