[U-Boot] [RFC 2/3] ARM: WIP: add flat device tree support

Albert ARIBAUD
2010-08-10T20:23:56Z

Le 10/08/2010 21:44, Grant Likely a ?crit :

>> #if defined(CONFIG_OF_LIBFDT)
>> -#if defined(CONFIG_PPC) || defined(CONFIG_M68K) || defined(CONFIG_SPARC)
>> +#if defined(CONFIG_PPC) || \
>> + defined(CONFIG_M68K) || \
>> + defined(CONFIG_SPARC) || \
>> + defined(CONFIG_ARM)
>
> There's got to be a better way to do this. :-)

Reminds me of an issue I encountered in my orion5x ide support patch
series where I also had modified a rather complex condition in
cmd_ide.c, which determined whether swapping I/O byte reads was needed.

Wolfgang had asked me to replace with a condition on a single new
CONFIG_IDE_SWAP_IO macro, which in turn had to be defined in various
cpu, SoC or board config files.

The patch is there:
<http://article.gmane.org/gmane.comp.boot-loaders.u-boot/82109/match=ide>

Maybe the same principle could apply here?

Amicalement,
--
Albert.