public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [Patch] Disable/Enable Flat I²C Commands
@ 2009-01-29 11:46 Jens Scharsig
  2009-01-29 18:16 ` Ben Warren
  2009-01-29 18:52 ` Wolfgang Denk
  0 siblings, 2 replies; 13+ messages in thread
From: Jens Scharsig @ 2009-01-29 11:46 UTC (permalink / raw)
  To: u-boot

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
CONFIG_I2C_CMD_TREE is defined.
The new option CONFIG_I2C_CMD_FLAT makes it possible to use the flat
commands in addition of tree commands.

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

diff --git a/README b/README
index 86c1304..3ad6d34 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_FLAT enable 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..5fec13c 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_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] 13+ messages in thread

* [U-Boot] [Patch] Disable/Enable Flat I²C Commands
  2009-01-29 11:46 [U-Boot] [Patch] Disable/Enable Flat I²C Commands Jens Scharsig
@ 2009-01-29 18:16 ` Ben Warren
  2009-01-29 18:23   ` Peter Tyser
  2009-01-29 19:07   ` Wolfgang Denk
  2009-01-29 18:52 ` Wolfgang Denk
  1 sibling, 2 replies; 13+ messages in thread
From: Ben Warren @ 2009-01-29 18:16 UTC (permalink / raw)
  To: u-boot

Jens Scharsig wrote:
> 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
> CONFIG_I2C_CMD_TREE is defined.
> The new option CONFIG_I2C_CMD_FLAT makes it possible to use the flat
> commands in addition of tree commands.
>
>   
Controversial, maybe, but why not just get rid of the flat commands?  
When I introduced the tree probably a couple of years ago, we said it 
would deprecate the flat commands and that they'd go away in a couple of 
releases.
<snip>

regards,
Ben

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

* [U-Boot] [Patch] Disable/Enable Flat I²C  Commands
  2009-01-29 18:16 ` Ben Warren
@ 2009-01-29 18:23   ` Peter Tyser
  2009-01-29 19:07   ` Wolfgang Denk
  1 sibling, 0 replies; 13+ messages in thread
From: Peter Tyser @ 2009-01-29 18:23 UTC (permalink / raw)
  To: u-boot

On Thu, 2009-01-29 at 10:16 -0800, Ben Warren wrote:
> Jens Scharsig wrote:
> > 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
> > CONFIG_I2C_CMD_TREE is defined.
> > The new option CONFIG_I2C_CMD_FLAT makes it possible to use the flat
> > commands in addition of tree commands.
> >
> >   
> Controversial, maybe, but why not just get rid of the flat commands?  
> When I introduced the tree probably a couple of years ago, we said it 
> would deprecate the flat commands and that they'd go away in a couple of 
> releases.
> <snip>

We discussed this a few months ago as well and came to the same
conclusion as Ben.

http://article.gmane.org/gmane.comp.boot-loaders.u-boot/47755
http://article.gmane.org/gmane.comp.boot-loaders.u-boot/48429

Best,
Peter

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

* [U-Boot] [Patch] Disable/Enable Flat I²C Commands
  2009-01-29 11:46 [U-Boot] [Patch] Disable/Enable Flat I²C Commands Jens Scharsig
  2009-01-29 18:16 ` Ben Warren
@ 2009-01-29 18:52 ` Wolfgang Denk
  2009-01-30  7:37   ` Jens Scharsig
  1 sibling, 1 reply; 13+ messages in thread
From: Wolfgang Denk @ 2009-01-29 18:52 UTC (permalink / raw)
  To: u-boot

Dear Jens Scharsig,

In message <gls4tp$bib$1@ger.gmane.org> you wrote:
> 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
> CONFIG_I2C_CMD_TREE is defined.
> The new option CONFIG_I2C_CMD_FLAT makes it possible to use the flat
> commands in addition of tree commands.

I don't like that this changes the behavious of many boards without
having the go form the board maintainers, actually without even
noticing them in advance.

Please either add the needed CONFIG_I2C_CMD_FLAT to all affected
boards so the current behaviour remains the same, or make it such
that it gets activated only for new boards.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"In Christianity neither morality nor religion come into contact with
reality at any point."                          - Friedrich Nietzsche

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

* [U-Boot] [Patch] Disable/Enable Flat I²C Commands
  2009-01-29 18:16 ` Ben Warren
  2009-01-29 18:23   ` Peter Tyser
@ 2009-01-29 19:07   ` Wolfgang Denk
  2009-01-29 19:30     ` Ben Warren
  1 sibling, 1 reply; 13+ messages in thread
From: Wolfgang Denk @ 2009-01-29 19:07 UTC (permalink / raw)
  To: u-boot

Dear Ben Warren,

In message <4981F273.2030900@gmail.com> you wrote:
>
> Controversial, maybe, but why not just get rid of the flat commands?  
> When I introduced the tree probably a couple of years ago, we said it 
> would deprecate the flat commands and that they'd go away in a couple of 
> releases.

We should at least announce such a feature removal, and declare a
deadline in public.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"A great many people think they are thinking when they are merely re-
arranging their prejudices."                          - William James

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

* [U-Boot] [Patch] Disable/Enable Flat I²C Commands
  2009-01-29 19:07   ` Wolfgang Denk
@ 2009-01-29 19:30     ` Ben Warren
  2009-01-29 20:37       ` Wolfgang Denk
  0 siblings, 1 reply; 13+ messages in thread
From: Ben Warren @ 2009-01-29 19:30 UTC (permalink / raw)
  To: u-boot

Wolfgang Denk wrote:
> Dear Ben Warren,
>
> In message <4981F273.2030900@gmail.com> you wrote:
>   
>> Controversial, maybe, but why not just get rid of the flat commands?  
>> When I introduced the tree probably a couple of years ago, we said it 
>> would deprecate the flat commands and that they'd go away in a couple of 
>> releases.
>>     
>
> We should at least announce such a feature removal, and declare a
> deadline in public.
>
> Best regards,
>
> Wolfgang Denk
>
>   
 From README:


                CONFIG_I2C_CMD_TREE is a recommended option that places
                all I2C commands under a single 'i2c' root command.  The
                older 'imm', 'imd', 'iprobe' etc. commands are considered
                deprecated and may disappear in the future.

I guess this isn't explicit enough.  Let's say it gets removed in the 
release after v2009.03.

regards,
Ben

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

* [U-Boot] [Patch] Disable/Enable Flat I²C Commands
  2009-01-29 19:30     ` Ben Warren
@ 2009-01-29 20:37       ` Wolfgang Denk
  2009-01-29 20:56         ` Peter Tyser
  2009-01-29 20:59         ` Ben Warren
  0 siblings, 2 replies; 13+ messages in thread
From: Wolfgang Denk @ 2009-01-29 20:37 UTC (permalink / raw)
  To: u-boot

Dear Ben Warren,

In message <498203BD.3000500@gmail.com> you wrote:
>
>  From README:
> 
> 
>                 CONFIG_I2C_CMD_TREE is a recommended option that places
>                 all I2C commands under a single 'i2c' root command.  The
>                 older 'imm', 'imd', 'iprobe' etc. commands are considered
>                 deprecated and may disappear in the future.
> 
> I guess this isn't explicit enough.  Let's say it gets removed in the 
> release after v2009.03.

Indeed. We should add it to doc/feature_removal.txt and the wiki page.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The universe is all a spin-off of the Big Bang.

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

* [U-Boot] [Patch] Disable/Enable Flat I²C  Commands
  2009-01-29 20:37       ` Wolfgang Denk
@ 2009-01-29 20:56         ` Peter Tyser
  2009-01-29 21:04           ` Ben Warren
  2009-01-29 21:15           ` Wolfgang Denk
  2009-01-29 20:59         ` Ben Warren
  1 sibling, 2 replies; 13+ messages in thread
From: Peter Tyser @ 2009-01-29 20:56 UTC (permalink / raw)
  To: u-boot

Hi Wolfgang,

On Thu, 2009-01-29 at 21:37 +0100, Wolfgang Denk wrote:
> Dear Ben Warren,
> 
> In message <498203BD.3000500@gmail.com> you wrote:
> >
> >  From README:
> > 
> > 
> >                 CONFIG_I2C_CMD_TREE is a recommended option that places
> >                 all I2C commands under a single 'i2c' root command.  The
> >                 older 'imm', 'imd', 'iprobe' etc. commands are considered
> >                 deprecated and may disappear in the future.
> > 
> > I guess this isn't explicit enough.  Let's say it gets removed in the 
> > release after v2009.03.
> 
> Indeed. We should add it to doc/feature_removal.txt and the wiki page.

Its actually already on the wiki page.

http://www.denx.de/wiki/U-Boot/TaskFeatureRemovalSchedule

I submitted the following patch to add it a new
doc/feature-removal-schedule.txt with a similar timeframe:

http://article.gmane.org/gmane.comp.boot-loaders.u-boot/48429

It seems like it would be a good idea to add the
doc/feature_removal.txt.  Did the above mentioned patch slip through the
cracks or do you prefer to only use the wiki for feature removals?

Best,
Peter

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

* [U-Boot] [Patch] Disable/Enable Flat I²C Commands
  2009-01-29 20:37       ` Wolfgang Denk
  2009-01-29 20:56         ` Peter Tyser
@ 2009-01-29 20:59         ` Ben Warren
  1 sibling, 0 replies; 13+ messages in thread
From: Ben Warren @ 2009-01-29 20:59 UTC (permalink / raw)
  To: u-boot

Wolfgang Denk wrote:
> Dear Ben Warren,
>
> In message <498203BD.3000500@gmail.com> you wrote:
>   
>>  From README:
>>
>>
>>                 CONFIG_I2C_CMD_TREE is a recommended option that places
>>                 all I2C commands under a single 'i2c' root command.  The
>>                 older 'imm', 'imd', 'iprobe' etc. commands are considered
>>                 deprecated and may disappear in the future.
>>
>> I guess this isn't explicit enough.  Let's say it gets removed in the 
>> release after v2009.03.
>>     
>
> Indeed. We should add it to doc/feature_removal.txt and the wiki page.
>
>   
OK.  I'l make it so.
> Best regards,
>
> Wolfgang Denk
>
>   

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

* [U-Boot] [Patch] Disable/Enable Flat I²C Commands
  2009-01-29 20:56         ` Peter Tyser
@ 2009-01-29 21:04           ` Ben Warren
  2009-01-29 21:15           ` Wolfgang Denk
  1 sibling, 0 replies; 13+ messages in thread
From: Ben Warren @ 2009-01-29 21:04 UTC (permalink / raw)
  To: u-boot

Peter Tyser wrote:
> Hi Wolfgang,
>
> On Thu, 2009-01-29 at 21:37 +0100, Wolfgang Denk wrote:
>   
>> Dear Ben Warren,
>>
>> In message <498203BD.3000500@gmail.com> you wrote:
>>     
>>>  From README:
>>>
>>>
>>>                 CONFIG_I2C_CMD_TREE is a recommended option that places
>>>                 all I2C commands under a single 'i2c' root command.  The
>>>                 older 'imm', 'imd', 'iprobe' etc. commands are considered
>>>                 deprecated and may disappear in the future.
>>>
>>> I guess this isn't explicit enough.  Let's say it gets removed in the 
>>> release after v2009.03.
>>>       
>> Indeed. We should add it to doc/feature_removal.txt and the wiki page.
>>     
>
> Its actually already on the wiki page.
>
> http://www.denx.de/wiki/U-Boot/TaskFeatureRemovalSchedule
>
> I submitted the following patch to add it a new
> doc/feature-removal-schedule.txt with a similar timeframe:
>
> http://article.gmane.org/gmane.comp.boot-loaders.u-boot/48429
>
> It seems like it would be a good idea to add the
> doc/feature_removal.txt.  Did the above mentioned patch slip through the
> cracks or do you prefer to only use the wiki for feature removals?
>
>   
This is perfect.  The patches without an obvious custodian sometimes 
take a bit longer to find a home, I guess.  Anway, full ACK from me.
> Best,
> Peter
>
>   
regards,
Ben

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

* [U-Boot] [Patch] Disable/Enable Flat I²C Commands
  2009-01-29 20:56         ` Peter Tyser
  2009-01-29 21:04           ` Ben Warren
@ 2009-01-29 21:15           ` Wolfgang Denk
  2009-01-29 21:34             ` Peter Tyser
  1 sibling, 1 reply; 13+ messages in thread
From: Wolfgang Denk @ 2009-01-29 21:15 UTC (permalink / raw)
  To: u-boot

Dear Peter Tyser,

In message <1233262578.19784.19.camel@localhost.localdomain> you wrote:
> 
> Its actually already on the wiki page.

Ah, good. Sometimes I'm better than I think myself ;-)

> I submitted the following patch to add it a new
> doc/feature-removal-schedule.txt with a similar timeframe:
> 
> http://article.gmane.org/gmane.comp.boot-loaders.u-boot/48429

Hm...

> It seems like it would be a good idea to add the
> doc/feature_removal.txt.  Did the above mentioned patch slip through the
> cracks or do you prefer to only use the wiki for feature removals?

Must have slipped through. Can you please repost so have it here in
current context?nks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
If you think the problem is bad now, just wait until we've solved it.
                                                        Epstein's Law

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

* [U-Boot] [Patch] Disable/Enable Flat I²C  Commands
  2009-01-29 21:15           ` Wolfgang Denk
@ 2009-01-29 21:34             ` Peter Tyser
  0 siblings, 0 replies; 13+ messages in thread
From: Peter Tyser @ 2009-01-29 21:34 UTC (permalink / raw)
  To: u-boot

On Thu, 2009-01-29 at 22:15 +0100, Wolfgang Denk wrote:
> Dear Peter Tyser,
> 
> In message <1233262578.19784.19.camel@localhost.localdomain> you wrote:
> > 
> > Its actually already on the wiki page.
> 
> Ah, good. Sometimes I'm better than I think myself ;-)
> 
> > I submitted the following patch to add it a new
> > doc/feature-removal-schedule.txt with a similar timeframe:
> > 
> > http://article.gmane.org/gmane.comp.boot-loaders.u-boot/48429
> 
> Hm...
> 
> > It seems like it would be a good idea to add the
> > doc/feature_removal.txt.  Did the above mentioned patch slip through the
> > cracks or do you prefer to only use the wiki for feature removals?
> 
> Must have slipped through. Can you please repost so have it here in
> current context?nks.

Sure, will do shortly.  I'll add the autoscr and legacy NAND
deprecation/removal while I'm at it.

Best,
Peter

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

* [U-Boot] [Patch] Disable/Enable Flat I²C Commands
  2009-01-29 18:52 ` Wolfgang Denk
@ 2009-01-30  7:37   ` Jens Scharsig
  0 siblings, 0 replies; 13+ messages in thread
From: Jens Scharsig @ 2009-01-30  7:37 UTC (permalink / raw)
  To: u-boot

Dear Wolfgang Denk,

> Please either add the needed CONFIG_I2C_CMD_FLAT to all affected
> boards so the current behaviour remains the same, or make it such
> that it gets activated only for new boards.

i will invert the logic of the patch and post it as version 2.
The new patch disables flat commands if CONFIG_I2C_CMD_NO_FLAT defined.

Best regards,

Jens Scharsig

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

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

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-29 11:46 [U-Boot] [Patch] Disable/Enable Flat I²C Commands Jens Scharsig
2009-01-29 18:16 ` Ben Warren
2009-01-29 18:23   ` Peter Tyser
2009-01-29 19:07   ` Wolfgang Denk
2009-01-29 19:30     ` Ben Warren
2009-01-29 20:37       ` Wolfgang Denk
2009-01-29 20:56         ` Peter Tyser
2009-01-29 21:04           ` Ben Warren
2009-01-29 21:15           ` Wolfgang Denk
2009-01-29 21:34             ` Peter Tyser
2009-01-29 20:59         ` Ben Warren
2009-01-29 18:52 ` Wolfgang Denk
2009-01-30  7:37   ` Jens Scharsig

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