From: "Grant Likely" <grant.likely@secretlab.ca>
To: "Timur Tabi" <timur@freescale.com>
Cc: Stefan Roese <sr@denx.de>,
linuxppc-dev@ozlabs.org, Sean MacLennan <smaclennan@pikatech.com>,
Scott Wood <scottwood@freescale.com>,
Jean Delvare <khali@linux-fr.org>
Subject: Re: "cell-index" vs. "index" vs. no index in I2C device nodes
Date: Thu, 5 Jun 2008 10:10:15 -0600 [thread overview]
Message-ID: <fa686aa40806050910m2057966csc33b2a671c6265af@mail.gmail.com> (raw)
In-Reply-To: <48480B3C.9080101@freescale.com>
On Thu, Jun 5, 2008 at 9:50 AM, Timur Tabi <timur@freescale.com> wrote:
> Jochen Friedrich wrote:
>> Hi Timur,
>>
>>> In situations where it doesn't matter which I2C bus is #1 and which one is #2,
>>> then I think the code should just initialize idx based on the order the nodes
>>> are found in the tree.
>>>
>>> In situations where it does matter, then we should use cell-index.
>>
>> that's what I did in i2c-cpm, as well. However, here I use the property
>> "linux,i2c-index" instead (see http://patchwork.ozlabs.org/linuxppc/patch?id=18603).
>
> Well, I just don't see the point of having two different properties that say the
> same thing. I'm not an IEE 1275 purist, so I don't think we should be hampered
> by old node definitions. I especially don't like having a property specifically
> for indexing I2C nodes that can't be used to enumerate other nodes.
>
> The DMA and SSI controllers on Freescale parts use cell-index to enumerate them.
> It just seems dumb to invent a new property.
>
> Will there ever be a situation where a node will contain "cell-index" and
> "linux,i2c-index"?
You are trying to describe 2 different things. cell-index is purely
for identifying multiple devices within a silicon block that share
resources. Indexing devices has a very different scope. The whole
scheme breaks the moment you put down 2 identical multifunction
peripherals into the same system. If the chip has multiple devices
that share resources, and those resources are described with cell
index; then you'll get something like this (notice how cell-index
values are duplicated):
multifunction@0 {
#size-cells = <1>;
#address-cells = <1>;
ranges = <0 0xe00000000 0x1000>;
i2c@0 {
cell-index = <0>;
regs = <0 0x100>;
}
i2c@100 {
cell-index = <1>;
regs = <0x100 0x100>;
}
}
multifunction@1 {
#size-cells = <1>;
#address-cells = <1>;
ranges = <0 0xe10000000 0x1000>;
i2c@0 {
cell-index = <0>;
regs = <0 0x100>;
}
i2c@100 {
cell-index = <1>;
regs = <0x100 0x100>;
}
}
cell-index must *not* be repurposed as a system level index.
Cheers,
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
next prev parent reply other threads:[~2008-06-05 16:10 UTC|newest]
Thread overview: 74+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-04 15:06 "cell-index" vs. "index" vs. no index in I2C device nodes Stefan Roese
2008-06-04 15:24 ` Timur Tabi
2008-06-04 15:43 ` Scott Wood
2008-06-05 2:19 ` Josh Boyer
2008-06-05 2:41 ` David Gibson
2008-06-06 2:40 ` Segher Boessenkool
2008-06-06 3:37 ` David Gibson
2008-06-07 0:30 ` Segher Boessenkool
2008-06-06 4:07 ` Grant Likely
2008-06-06 4:29 ` Sean MacLennan
2008-06-05 2:54 ` Sean MacLennan
2008-06-05 3:05 ` Josh Boyer
2008-06-05 3:16 ` Sean MacLennan
2008-06-05 6:22 ` Stefan Roese
2008-06-05 7:48 ` Jean Delvare
2008-06-05 8:45 ` Stefan Roese
2008-06-05 10:57 ` David Gibson
2008-06-05 11:52 ` Josh Boyer
2008-06-05 15:18 ` Timur Tabi
2008-06-05 22:47 ` David Gibson
2008-06-06 4:17 ` Benjamin Herrenschmidt
2008-06-06 4:16 ` Benjamin Herrenschmidt
2008-06-06 6:21 ` Jean Delvare
2008-06-06 7:47 ` Grant Likely
2008-06-06 8:45 ` Benjamin Herrenschmidt
2008-06-05 15:17 ` Timur Tabi
2008-06-05 15:44 ` Jochen Friedrich
2008-06-05 15:50 ` Timur Tabi
2008-06-05 16:10 ` Grant Likely [this message]
2008-06-05 16:18 ` Timur Tabi
2008-06-05 16:22 ` Jochen Friedrich
2008-06-05 16:30 ` Grant Likely
2008-06-05 16:40 ` Timur Tabi
2008-06-05 22:46 ` David Gibson
2008-06-05 16:35 ` Grant Likely
2008-06-05 23:59 ` Josh Boyer
2008-06-07 0:24 ` Segher Boessenkool
2008-06-05 21:37 ` Sean MacLennan
2008-06-05 23:48 ` Josh Boyer
2008-06-05 15:13 ` Timur Tabi
2008-06-05 15:39 ` Grant Likely
2008-06-05 15:43 ` Timur Tabi
2008-06-05 15:52 ` Segher Boessenkool
2008-06-05 16:09 ` Timur Tabi
2008-06-05 16:27 ` Scott Wood
2008-06-05 17:52 ` Timur Tabi
2008-06-05 18:04 ` Scott Wood
2008-06-05 16:00 ` Grant Likely
2008-06-05 16:13 ` Timur Tabi
2008-06-05 16:21 ` Josh Boyer
2008-06-05 16:25 ` Timur Tabi
2008-06-05 16:37 ` Grant Likely
2008-06-05 18:27 ` Josh Boyer
2008-06-05 18:35 ` Timur Tabi
2008-06-05 18:40 ` Josh Boyer
2008-06-05 18:46 ` Grant Likely
2008-06-05 18:56 ` Josh Boyer
2008-06-05 19:14 ` Grant Likely
2008-06-05 19:15 ` Josh Boyer
2008-06-05 19:16 ` Timur Tabi
2008-06-05 21:31 ` Segher Boessenkool
2008-06-05 22:56 ` David Gibson
2008-06-06 13:09 ` Timur Tabi
2008-06-06 13:42 ` Stefan Roese
2008-06-05 22:45 ` Sean MacLennan
2008-06-06 4:20 ` Benjamin Herrenschmidt
2008-06-25 21:46 ` Timur Tabi
2008-06-27 16:48 ` Jochen Friedrich
2008-06-05 15:46 ` Segher Boessenkool
2008-06-05 15:52 ` Jochen Friedrich
2008-06-05 15:53 ` Grant Likely
2008-06-06 4:19 ` Benjamin Herrenschmidt
2008-06-06 4:14 ` Benjamin Herrenschmidt
2008-06-06 4:13 ` 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=fa686aa40806050910m2057966csc33b2a671c6265af@mail.gmail.com \
--to=grant.likely@secretlab.ca \
--cc=khali@linux-fr.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=scottwood@freescale.com \
--cc=smaclennan@pikatech.com \
--cc=sr@denx.de \
--cc=timur@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).