public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [Patch] [Version 2] Disable/Enable Flat I²C Commands
@ 2009-01-30  7:37 Jens Scharsig
  2009-01-30 15:13 ` Ben Warren
  0 siblings, 1 reply; 3+ messages in thread
From: Jens Scharsig @ 2009-01-30  7:37 UTC (permalink / raw)
  To: u-boot

This is the seconded version of "Disable/Enable Flat I?C Commands"
Patch. It has invert logic, that means a new define disables the flat
command instaed of reenable.


Since CONFIG_I2C_CMD_TREE are defined, the old flat i2c commands are
still present.
This patch disables the old flat command by default, if
both CONFIG_I2C_CMD_TREE and CONFIG_I2C_CMD_FLAT are defined.
The new option CONFIG_I2C_CMD_NO_FLAT makes it possible to dissable the
flat, when tree commands are used.

Signed-off-by: Jens Scharsig <esw@bus-elektronik.de>
---

diff --git a/README b/README
index 86c1304..0568352 100644
--- a/README
+++ b/README
@@ -1306,6 +1306,9 @@ The following options need to be configured:
 		older 'imm', 'imd', 'iprobe' etc. commands are considered
 		deprecated and may disappear in the future.

+		CONFIG_I2C_CMD_NO_FLAT enables the old flat i2c commands like
+		'imm', 'imd', 'iprobe' etc. if CONFIG_I2C_CMD_TREE is defined.
+
 		CONFIG_HARD_I2C selects a hardware I2C controller.

 		CONFIG_SOFT_I2C configures u-boot to use a software (aka
diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c
index 16439ac..cf99428 100644
--- a/common/cmd_i2c.c
+++ b/common/cmd_i2c.c
@@ -1324,6 +1324,7 @@ U_BOOT_CMD(
 #endif
 );
 #endif /* CONFIG_I2C_CMD_TREE */
+#if (!defined(CONFIG_I2C_CMD_NO_FLAT) || !defined(CONFIG_I2C_CMD_TREE))
 U_BOOT_CMD(
 	imd,	4,	1,	do_i2c_md,		\
 	"i2c memory display",				\
@@ -1369,6 +1370,7 @@ U_BOOT_CMD(
 	"chip address[.0, .1, .2] [# of objects]\n"
 	"    - loop, reading a set of addresses\n"
 );
+#endif /* CONFIG_I2C_CMD_FLAT/TREE */

 #if defined(CONFIG_CMD_SDRAM)
 U_BOOT_CMD(

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot] [Patch] [Version 2] Disable/Enable Flat I²C Commands
  2009-01-30  7:37 [U-Boot] [Patch] [Version 2] Disable/Enable Flat I²C Commands Jens Scharsig
@ 2009-01-30 15:13 ` Ben Warren
  2009-01-30 15:30   ` Jens Scharsig
  0 siblings, 1 reply; 3+ messages in thread
From: Ben Warren @ 2009-01-30 15:13 UTC (permalink / raw)
  To: u-boot

Hi Jens,

On Thu, Jan 29, 2009 at 11:37 PM, Jens Scharsig <esw@bus-elektronik.de>wrote:

> This is the seconded version of "Disable/Enable Flat I?C Commands"
> Patch. It has invert logic, that means a new define disables the flat
> command instaed of reenable.
>
>
> Since CONFIG_I2C_CMD_TREE are defined, the old flat i2c commands are
> still present.
> This patch disables the old flat command by default, if
> both CONFIG_I2C_CMD_TREE and CONFIG_I2C_CMD_FLAT are defined.
> The new option CONFIG_I2C_CMD_NO_FLAT makes it possible to dissable the
> flat, when tree commands are used.
>
As we discussed in the other thread, the flat commands are going away after
the next release, so why bother with this?

regards,
Ben

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] [Patch] [Version 2] Disable/Enable Flat I²C Commands
  2009-01-30 15:13 ` Ben Warren
@ 2009-01-30 15:30   ` Jens Scharsig
  0 siblings, 0 replies; 3+ messages in thread
From: Jens Scharsig @ 2009-01-30 15:30 UTC (permalink / raw)
  To: u-boot

Hi Ben,
> As we discussed in the other thread, the flat commands are going away after
> the next release, so why bother with this?

Thats right. It was only a timing problem by myself.

Best regard,

Jens Scharsig

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-01-30 15:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-30  7:37 [U-Boot] [Patch] [Version 2] Disable/Enable Flat I²C Commands Jens Scharsig
2009-01-30 15:13 ` Ben Warren
2009-01-30 15:30   ` Jens Scharsig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox