From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/3] arm: add CONFIG_MACH_TYPE option and documentation
Date: Thu, 07 Jul 2011 19:46:09 +0200 [thread overview]
Message-ID: <4E15F0E1.3080209@aribaud.net> (raw)
In-Reply-To: <4E15E41E.3090007@compulab.co.il>
Le 07/07/2011 18:51, Igor Grinberg a ?crit :
>>> If we have this option and it is documented, then any new board can use it
>>> instead of thinking (although it is simple) where and how to dereference
>>> the bi_arch_number.
>>
>> Not sure I get you there. Can you elaborate on a more precise example that would show the benefits of it?
>
> For example, if you think of Christopher's patch (ARM: Warn when the machine ID isn't set.),
> If you need Christopher's patch, then there are cases when the machid is not set, right?
> When someone gets this warning, he thinks: "Ah, I forgot the machid!" and then
> goes to fix the code, but again he thinks, where is the best place to put it?
> For us, it is trivial, that it should be in board_init() function, but for newbies, it is not that trivial.
> With this patch, you get the explanation and also a place to put the machid definition.
> With this patch, you just define the configuration "variable" and the whole thing will be done for you.
> Another example would be the board/nvidia/*, the code is shared as much as possible,
> and the mach_type is set in the common code. That is something I would expect to be done
> for all ARM boards, not just for nvidia...
I see your point.
Now the issue I foresee is that this commonalization has benefits only
for boards which currently set their bi_arch_number in board_init_f(),
but has no incentive -- that's a code that will be used only in a few
places and could stay that way for quite long, because boards that will
not adhere to it will still build unchanged.
IOW, there is no benefit for e.g. ED Mini V2, to use CONFIG_MACH_TYPE,
so why would it? Thus instead of simplifying and commonalizing, this
feature will *add* to the code base complexity.
Unless the goal is to add this macro *and* change all related board
codes in the same patchset? I don't see it as feasible either.
Any suggestion for ensuring adoption of the feature wherever it can be used?
>>> Also, it can come in handy, in the configuration system (I think it is called Kbuild?),
>>> so the value can be chosen from the list or something.
>>
>> AFAICT, the Linux build system does fine with the generated mach-type.
>
> Here, I'm not talking about the mach_types, but about the config option.
> It can be set by the build system and no need to do it in board code!
Agreed.
Amicalement,
--
Albert.
next prev parent reply other threads:[~2011-07-07 17:46 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-04 9:00 [U-Boot] [PATCH 1/3] arm: add CONFIG_MACH_TYPE option and documentation Igor Grinberg
2011-07-04 9:00 ` [U-Boot] [PATCH 2/3] arm: nvidia and smdk6400: use common code for machine type Igor Grinberg
2011-07-04 9:00 ` [U-Boot] [PATCH 3/3] arm: omap: innovator: " Igor Grinberg
2011-07-04 21:06 ` [U-Boot] [PATCH 1/3] arm: add CONFIG_MACH_TYPE option and documentation Christopher Harvey
2011-07-04 22:03 ` Albert ARIBAUD
2011-07-04 22:03 ` Albert ARIBAUD
2011-07-04 22:16 ` Wolfgang Denk
2011-07-05 14:08 ` charvey at matrox.com
2011-07-05 15:12 ` Igor Grinberg
2011-07-05 7:10 ` Igor Grinberg
2011-07-06 18:53 ` Albert ARIBAUD
2011-07-06 20:05 ` Igor Grinberg
2011-07-07 16:07 ` Albert ARIBAUD
2011-07-07 16:51 ` Igor Grinberg
2011-07-07 17:46 ` Albert ARIBAUD [this message]
2011-07-07 21:06 ` Igor Grinberg
2011-07-13 5:52 ` Igor Grinberg
2011-07-14 14:10 ` Albert ARIBAUD
2011-07-14 14:20 ` Albert ARIBAUD
2011-07-14 14:57 ` Igor Grinberg
2011-07-14 15:45 ` [U-Boot] [PATCH v2 1/3] arm: add CONFIG_MACH_TYPE setting " Igor Grinberg
2011-07-17 6:56 ` Igor Grinberg
2011-07-17 9:10 ` Albert ARIBAUD
2011-07-17 9:08 ` Albert ARIBAUD
2011-07-27 10:31 ` Chander Kashyap
2011-07-27 13:04 ` Igor Grinberg
2011-07-28 6:41 ` Chander Kashyap
2011-07-28 7:59 ` Igor Grinberg
2011-07-28 8:19 ` Chander Kashyap
2011-07-28 8:58 ` Igor Grinberg
2011-08-04 12:05 ` Albert ARIBAUD
2011-08-11 4:16 ` Chander Kashyap
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E15F0E1.3080209@aribaud.net \
--to=albert.u.boot@aribaud.net \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox