From: Josh Boyer <jwboyer@linux.vnet.ibm.com>
To: benh@kernel.crashing.org
Cc: linuxppc-dev <linuxppc-dev@ozlabs.org>, devicetree-discuss@ozlabs.org
Subject: Re: Board level compatibility matching
Date: Fri, 1 Aug 2008 20:07:07 -0400 [thread overview]
Message-ID: <20080801200707.7235d1ea@zod.rchland.ibm.com> (raw)
In-Reply-To: <1217630903.11188.537.camel@pasglop>
On Sat, 02 Aug 2008 08:48:23 +1000
Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
> > This is sort of the part that sucks. Look at 44x. There are 10
> > board.c files there. There really only needs to be 3 or 4 (sam440ep,
> > warp, virtex, and "generic") because the board files are identical in
> > everything except name. By doing the library code approach, one still
> > has to create a board.c file for a new board and plug in the library
> > functions to ppc_md.
>
> And ? How is that a big deal ? Real products (ie not eval boards, and
> even those ...) will probably end up needing that due to subtle
> differences anyway.
I didn't say it was a big deal. But I also think it's pretty pointless
to carry around a bunch of C files that have to get the same set of
fixes across the board when updated because they really only differ by
the function names. Particularly when you could just have one C file
with a list of supported boards.
As I said, to me this is about cleanup and maintenance. I totally
agree that truly custom boards (e.g. actual products) will likely
require different board.c files and that's just fine with me. I'm just
looking for the best approach to cleanup the ones that don't need to
be, and the explicit list seems to be that way.
> > Alternatively, you could do the:
> >
> > compatible = "specific-board", "similar-board"
> >
> > approach that has been done for e.g. Bamboo and Yosemite. Again, the
> > issue is that is that OK? Is it OK for a board to claim compatibility
> > with another board when it might not have all the devices of that
> > board, or might have additional devices, etc. I was of the opinion
> > it is, and the device tree handles this just fine, as does the platform
> > code. But it can be confusing, hence the discussion here.
>
> Well, as I said. If it stops being ok, just create your own board
> and it will take over provided you put it before the other one in
> the link order.
>
> If we generalize that approach, we might want to change the board
> probing code a bit to first do a full pass based on the first
> entry in compatible, then another full pass based on the second, etc...
I don't care much either way. I guess I'd rather avoid relying on
strict link order to do the probing right, if only because a simple
mistake can break things.
There might not be a "one true way", but Grant and I thought it
pertinent to bring up a discussion in case there was a "very wrong
way", that's all.
josh
next prev parent reply other threads:[~2008-08-02 0:07 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 [this message]
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
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=20080801200707.7235d1ea@zod.rchland.ibm.com \
--to=jwboyer@linux.vnet.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=devicetree-discuss@ozlabs.org \
--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).