From: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH][RFC] disable flat i2c commands when CONFIG_I2C_CMD_TREE defined
Date: Fri, 2 Mar 2007 17:59:18 +0100 [thread overview]
Message-ID: <200703021759.18812.matthias.fuchs@esd-electronics.com> (raw)
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
-----------------------------------------------------------------------
next reply other threads:[~2007-03-02 16:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-02 16:59 Matthias Fuchs [this message]
2007-03-02 17:41 ` [U-Boot-Users] [PATCH][RFC] disable flat i2c commands when CONFIG_I2C_CMD_TREE defined Ben Warren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200703021759.18812.matthias.fuchs@esd-electronics.com \
--to=matthias.fuchs@esd-electronics.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox