[U-Boot] [RESEND:PATCH-V4] OMAP3EVM: Added NAND support

Nishanth Menon
2010-05-06T10:54:57Z

On Thu, May 6, 2010 at 5:50 AM, Wolfgang Denk <wd@denx.de> wrote:
> Dear Nishanth Menon,
>
> In message <u2h782515bb1005060340o3b366389mfdb71c240cbc7f90@mail.gmail.com> you wrote:
>> On Thu, May 6, 2010 at 12:36 AM, Hiremath, Vaibhav <hvaibhav@ti.com> wrote:
> ...
>> > I do agree that we don't have to undef here, but agreed to Nishant's comment only because from user point of view, if user would
>> > like to enable ONENAND support then for him it's easy he just have to comment NAND line and make change this #define. He
>> > doesn't have to dig inside code to find out whether ONENAND is supported or not.
>
> Well, of course the user _has_ to dig into the code and check if the
> feature is supported, because there is no information what the
> "#undef" or the comment means - it can mean anything:
>
> - disabled here and left in so you can easily re-add it if you like
> - disabled because known to be unsupported or broken
> - disabled because untested
> - ...
>
>> platforms such as SDP platforms have three flash devices - nand,
>> onenand and nor - these are development platforms and are meant to
>> bootup from any of these devices based on which ever dip switch is
>> set. having a #undef is more elegant than /* */ and easier to use from
>> a developer perspective.
>
> Please provide one working configuration, or several config options,
> but don't try to add kind of configuration menues using "#define" /
> "#undef" lists. These are useless and confusing at best.
>
your points are valid, two options as I see here:
a) build configurations - nand_boot, nor_boot etc..
b) IMHO, the better solution would be to allow the same u-boot to boot
from all devices (nand, nor, onenand, mmc) without needing a rebuild.
but the neccessity for that is to have environment variable which can
be moved around.. TI has an implementation based on an ancient u-boot
which actually does this, it will be interesting to know if there are
others who may be interested in a similar feature in mainline u-boot.

Regards,
Nishanth Menon