linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Grant Likely" <grant.likely@secretlab.ca>
To: "M. Warner Losh" <imp@bsdimp.com>
Cc: devicetree-discuss@ozlabs.org, linuxppc-dev@ozlabs.org
Subject: Re: Board level compatibility matching
Date: Fri, 1 Aug 2008 10:24:58 -0600	[thread overview]
Message-ID: <fa686aa40808010924p48191472gdf51eab11f4e4d30@mail.gmail.com> (raw)
In-Reply-To: <20080801.100107.-1666252871.imp@bsdimp.com>

On Fri, Aug 1, 2008 at 10:01 AM, M. Warner Losh <imp@bsdimp.com> wrote:
> I'd float a radical definition of 'compatible' here.
>
> If the generic code can handle it with just changes to the device
> tree, then it is compatible.  And by generic code, I wouldn't suggest
> a twisty maze of ifdefs or special case hacks.  I'm talking truly
> generic code that is table driven entirely from the dtc.  If you need
> special C code to initialize the board, then it isn't compatible.

When doing the initial board port, you don't *know* if you're going to
need special cases.  Or, you don't know if the special case code
belongs in the platform code, or belongs somewhere else
(implementation detail).  Or, the special code could get refactored in
the future and be moved into or out of the platform code.

Claiming one board is compatible with another tends to just encode a
Linux implementation detail into the device tree.

> This is exactly analogous to the pc-net driver supporting dozens of
> different cards that differ only in their ID.  Are all these cards
> 100% the same: no.  There's plenty of differences between them.
> However, the pc-net driver copes with the small differences so that
> one driver can handle most of the ne2000 class of network cards.

Yes, and we use lists of compatible values for devices.  However, the
board level has much higher complexity.  The likelyhood of getting it
wrong is much greater.

g.

  reply	other threads:[~2008-08-01 16:25 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 [this message]
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=fa686aa40808010924p48191472gdf51eab11f4e4d30@mail.gmail.com \
    --to=grant.likely@secretlab.ca \
    --cc=devicetree-discuss@ozlabs.org \
    --cc=imp@bsdimp.com \
    --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).