From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: linuxppc-dev <linuxppc-dev@ozlabs.org>, devicetree-discuss@ozlabs.org
Subject: Re: Board level compatibility matching
Date: Sat, 02 Aug 2008 08:54:43 +1000 [thread overview]
Message-ID: <1217631283.11188.545.camel@pasglop> (raw)
In-Reply-To: <fa686aa40808010727v53fe3580q2813a12cb66f8f68@mail.gmail.com>
On Fri, 2008-08-01 at 08:27 -0600, Grant Likely wrote:
>
> I agree with most of your argument, except I really have problems with
> boards claiming compatibility with an older board. My reason is
> exactly the reason you state; One day you'll figure out that there is
> indeed a difference. The problem is; when the original board (the one
> others are claiming compatibility with) gains additional code to fixup
> quirks or something, then that code will get changed with no
> visibility that it is borking up other boards that are currently
> depending on it.
Then just use your own .c file. It's not like it was a big deal.
I don't know why it's -so- appealing to not have to do one at all.
> I far prefer the solution I'm currently using in 5200-land where there
> is a simple (boring?) board port which *explicitly* states which
> boards it supports (see arch/powerpc/platforms/52xx/mpc5200_simple.c).
> When someone goes to modify that file, it is explicit that it
> currently supports multiple boards. If a board becomes 'non-boring',
> then it is removed from the simple platform; the simple platform is
> *not* extended to accommodate it.
As long as you stick to -never- extend the simple platform to accomodate
for a variant, then I suppose that's ok I suppose, though that does
raise the point of what to put in the compatible property.
> I *fully* agree that it is insane for the code to grow detection logic
> and I've been explicit about not doing anything of the sort in 5200
> land. What I am suggesting is that if nothing else claims the board,
> then allow the simple platform to bind against it based on the fact
> that it uses the same SoC.
See my comment in my reply to Josh about changing the board probe into a
multi-pass probe so that first, we only match on the first entry of the
compatible property, then we match on the second, etc... to go from more
specific to less specific.
> However, if I can't get concensus on this approach, then I do /not/
> want to go to a boards compatible with other boards scheme. It will
> cause breakage and pain that is non-obvious to debug for many users.
As far as I'm concerned, this approach is mostly useful for revisions of
a board. Oh and I'm not going to whack you with a stick if in the end,
you do have a little bit of variation in a single board .c file to deal
with a glitch in rev. C of the board that wired something backward for
example ... it's a matter of perspective. But I would prefer a different
board (from a different vendor for example) to use a different .c file
even if it only differs by the same little glitch.
> BTW, I am also not suggesting that the .dts files themselves try to
> claim some kind of 'generic' compatibility. I'm proposing handling
> any catch-all cases in the Linux code itself, where it is easy to
> change because it is just an implementation detail. Trying to make
> the dt 'generic' doesn't make any sense because doing so is almost
> always wrong (or will become wrong in the future).
The problem is that I don't see a sane way to do the catch all in the
linux code, other than explicitely doing what you already do which is to
list all supported boards in the simple platform. It's either that or
adding some compatible "socname,linux-simple" or so property in
your .dts. I don't believe matching on SoC is of any use. It will
incorrectly try to match things that don't work and that's bad.
Ben.
prev parent reply other threads:[~2008-08-01 22:54 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-31 20:19 Board level compatibility matching Grant Likely
2008-07-31 20:39 ` Chris Friesen
2008-07-31 20:49 ` Jon Smirl
2008-07-31 20:52 ` Grant Likely
2008-07-31 20:58 ` Jon Smirl
2008-08-01 2:47 ` David Gibson
2008-08-01 3:06 ` Jon Smirl
2008-08-01 3:30 ` David Gibson
2008-08-01 4:00 ` Jon Smirl
2008-08-01 4:25 ` David Gibson
2008-08-01 4:37 ` Jon Smirl
2008-08-01 6:22 ` David Gibson
2008-07-31 20:59 ` Scott Wood
2008-07-31 21:09 ` Grant Likely
2008-08-01 2:54 ` David Gibson
2008-08-01 3:25 ` Grant Likely
2008-08-01 3:38 ` David Gibson
2008-08-01 4:25 ` Benjamin Herrenschmidt
2008-08-01 12:06 ` Josh Boyer
2008-08-01 12:28 ` Josh Boyer
2008-08-01 14:30 ` Grant Likely
2008-08-01 22:48 ` Benjamin Herrenschmidt
2008-08-02 0:07 ` Josh Boyer
2008-08-01 14:27 ` Grant Likely
2008-08-01 15:11 ` Josh Boyer
2008-08-01 16:01 ` M. Warner Losh
2008-08-01 16:24 ` Grant Likely
2008-08-01 22:54 ` Benjamin Herrenschmidt [this message]
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=1217631283.11188.545.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=devicetree-discuss@ozlabs.org \
--cc=grant.likely@secretlab.ca \
--cc=linuxppc-dev@ozlabs.org \
/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;
as well as URLs for NNTP newsgroup(s).