linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Grant Likely" <grant.likely@secretlab.ca>
To: "Kumar Gala" <galak@kernel.crashing.org>
Cc: Jon Loeliger <jdl@jdl.com>,
	linuxppc-dev@ozlabs.org, Scott Wood <scottwood@freescale.com>
Subject: Re: [PATCH] [POWERPC] get rid of `model = "UCC"' in the ucc nodes
Date: Fri, 1 Feb 2008 09:23:47 -0700	[thread overview]
Message-ID: <fa686aa40802010823n1b837ffk7110a72e2bd44bf6@mail.gmail.com> (raw)
In-Reply-To: <72B60725-FB4A-42FA-832D-8FD5434B9042@kernel.crashing.org>

On 2/1/08, Kumar Gala <galak@kernel.crashing.org> wrote:
>
> > --- a/Documentation/powerpc/booting-without-of.txt
> > +++ b/Documentation/powerpc/booting-without-of.txt
> > @@ -1675,7 +1675,6 @@ platforms are moved over to use the flattened-
> > device-tree model.
> >       ucc@2000 {
> >               device_type = "network";
> >               compatible = "ucc_geth";
> > -             model = "UCC";
> >               device-id = <1>;
>
> can we change device-id to cell-index?

<aside>
Here's a thought; do we really need a cell-index at all?  (and I'm
talking in general; not just this specific case).  I'm starting to
think we should migrate away from using it.

cell-index has been useful for things like clock controllers to know
what offset into a shared clock control register or something like
that and a driver would pass the cell-index value to the shared reg
driver when requesting service.  However, I think the information
encoded in cell-index is already encoded in the device tree in a
different manor.

Typically, shared registers and the like are all chip specific and the
behaviour of the shared register drivers usually needs to be tweaked
for different SoCs.  Each ip core on an SoC is already uniquely
indexed via the reg property.  True, 'reg' is sparse (0x2000, 0x2200,
0x2300, ...) whereas cell-index is tight (0,1,2,3,...), but I don't
think that introduces any additional difficulty.

So, instead of a driver passing it's cell-index value to the shared
reg driver, it would pass it's reg base instead.  The shared register
driver could then choose an internal representation that makes sense
for it instead of whatever layout was chosen by the device tree.

Dropping cell-index would mean one less property to keep in sync when
tailoring device trees. (== less complexity for board porters).
Besides, the purpose of cell-index is often misunderstood already by
people trying to use it to describe port numbers (ttyS0, ttyS1, etc).

Thoughts?
</aside>

Cheers,
g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

  reply	other threads:[~2008-02-01 16:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-01 15:01 [PATCH] [POWERPC] get rid of `model = "UCC"' in the ucc nodes Anton Vorontsov
2008-02-01 15:32 ` Kumar Gala
2008-02-01 16:23   ` Grant Likely [this message]
2008-02-05 13:20     ` David Gibson
2008-02-05 16:39       ` Grant Likely
2008-02-08  6:14         ` David Gibson
2008-02-01 17:33   ` [PATCH] [POWERPC][NET][SERIAL] UCCs: replace device-id with cell-index (was: Re: [PATCH] [POWERPC] get rid of `model = "UCC"' in the ucc nodes) Anton Vorontsov
2008-02-01 17:52     ` [PATCH] [POWERPC][NET][SERIAL] UCCs: replace device-id with cell-index Jeff Garzik

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=fa686aa40802010823n1b837ffk7110a72e2bd44bf6@mail.gmail.com \
    --to=grant.likely@secretlab.ca \
    --cc=galak@kernel.crashing.org \
    --cc=jdl@jdl.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=scottwood@freescale.com \
    /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).