From: David Gibson <david@gibson.dropbear.id.au>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: Scott Wood <scottwood@freescale.com>,
linuxppc-dev@ozlabs.org, Jon Loeliger <jdl@jdl.com>
Subject: Re: [PATCH] [POWERPC] get rid of `model = "UCC"' in the ucc nodes
Date: Fri, 8 Feb 2008 17:14:51 +1100 [thread overview]
Message-ID: <20080208061451.GC26868@localhost.localdomain> (raw)
In-Reply-To: <fa686aa40802050839k652aeb4ga0e6b304d91ee9dd@mail.gmail.com>
On Tue, Feb 05, 2008 at 09:39:02AM -0700, Grant Likely wrote:
> On 2/5/08, David Gibson <david@gibson.dropbear.id.au> wrote:
> > On Fri, Feb 01, 2008 at 09:23:47AM -0700, Grant Likely wrote:
> > > 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.
> >
> > Right. Except that if the shared resource is just a single register,
> > calling the routines to access it a "shared reg driver" gives a
> > misleading impression. Depending on how the shared reg is used, even
> > a lock may not be necessary, so potentially the drivers for the
> > individual device instances using the shared resource can (safely)
> > directly access it.
>
> Fair enough. In the case of a single shared, or a homogeneous set of
> shared registers (all of them use the same index) I can see the
> argument for cell index.
Yes, that's the situation it was created for.
> However, there are places where cell-index is being used where the
> value of cell-index has no relation to the offset into a register.
> But what about the case where the device uses multiple shared
> registers, each one using a *different* offset. cell-index doesn't
> describe this situation well (or at least no better than just using
> the value of reg instead, a translation is still required)
Absolutely. This is not a suitable situation in which to use
cell-index.
[snip]
> >From booting-without-of (in the EMAC description):
> - cell-index : 1 cell, hardware index of the EMAC cell on a
> given ASIC (typically 0x0 and 0x1 for EMAC0 and EMAC1 on each Axon
> chip.
>
> So, even if the intent was for cell-index to specify offsets into
> shared regs, the description does not reflect that purpose. And
> reading thorough the rest of the document, cell-index is described
> purely in terms of enumerating ip blocks, so that is clearly the
> assumption that people are making when using it.
>
> In other words, my point is this: *If* cell-index is just a way to
> encode the manufacturing assigned ip-block number (EMAC0, EMAC1, etc)
> then there is probably little or no value in it. The two arguments I
> see for using cell-index in that mode are:
>
> 1) to offset into shared registers (but this doesn't hold because ip
> block numbers often don't match register offsets and the reg property
> would be just as suitable)
>
> 2) to logically identify ip blocks to the user (but cell-index was
> never intended for this and /aliases is a better solution anyway)
Right. The confusion arises because cell-index was invented on 4xx,
where it's common practice to index global registers by the ip block
number.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
next prev parent reply other threads:[~2008-02-08 6:14 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
2008-02-05 13:20 ` David Gibson
2008-02-05 16:39 ` Grant Likely
2008-02-08 6:14 ` David Gibson [this message]
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=20080208061451.GC26868@localhost.localdomain \
--to=david@gibson.dropbear.id.au \
--cc=grant.likely@secretlab.ca \
--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).