[U-Boot] [PATCH] ARM: orion5x: reduce dependence of including platform file
Lei Wen
adrian.wenl at gmail.com
Wed Oct 26 04:23:24 CEST 2011
Hi Wolfgang,
On Wed, Oct 26, 2011 at 2:50 AM, Wolfgang Denk <wd at denx.de> wrote:
> Dear Lei Wen,
>
> In message <CALZhoSQyCPnYCXgrYQCkvu6A0NYCrmtzveXcQsb3OSCMV_TKcA at mail.gmail.com> you wrote:
>>
>> >> +#include <asm/arch/orion5x.h>
>> >
>> > I don't like this.
>> >
>> >
>> > Board config files MUST NOT do any such includes. Keep in mind that
>> > one day we might want to try something like Kconfig, so board config
>> > files should ONLY contain configuration information in the form of
>> > #define's and the like.
>> >
>> > NAK.
>>
>> I should admit I have some bit of confusing here...
>> What I see there are lots of include in the config file, 742 include
>> usage case in the config files...:
>> $ grep -Rn "#include" include/configs | wc -l
>> 742
>
> There are includes. Some of them are OK, some aren't and should be
> fixed.
>
> More than half of your number are "#include <config_cmd_default.h>"
> which are perfectly fine.
>
>
> For example, it's also perfectly fine if all boards that are similar
> or that provide a similar look & feel (for example, because they come
> from a single vendor) include a common configuration file. Such
> examples are #include "amcc-common.h", #include "mv-common.h",
> #include <configs/bfin_adi_common.h>, #include "manroland/common.h",
> etc. etc. etc.
>
> On the other hand, files from asm/arch/* should never define any
> config settings - if it cannot be avoided they may provide register
> definitions and the like, but any "#define CONFIG_*" has no place
> there.
>
Thanks for your detailed explanation!
I post another patch to address those issues you have mentioned.
Thanks,
Lei
More information about the U-Boot
mailing list