Discussion on SOC device tree bindings

Grant Likely grant.likely at secretlab.ca
Wed Jan 17 19:40:05 EST 2007


(Added ML to the CC list)

On 1/15/07, Benjamin Herrenschmidt <benh at kernel.crashing.org> wrote:
> On Mon, 2007-01-15 at 16:37 +0100, Segher Boessenkool wrote:
> > > Same logic with interrupts.
> >
> > Interrupts go from a device to the interrupt controller, here
> > it is the other way around.

> That doesn't matter. The actual direction of the signal doesn't matter.
---snip---
> and at the end of the day it doesn't matter, It's up to Sylvain and Grant do decide
> what they want to do.

Well, I suppose I should stop sitting on the fence on this and
actually give my opinion.  I have to agree with Ben here, I don't
think the direction of the link matters.  One binding can be trivially
generated from the other no matter which way it is done.

I don't think the argument that the data should not be scattered about
in various device nodes holds a whole lot of water.  There is already
precedence for this with the interrupt binding.  I've already stated
that I don't think the signal direction matters, so I don't agree with
the argument that interrupts are different because that are connected
the other way around.

Putting the linkage in the device nodes does not bloat the tree, and
it does not duplicate information.  The device tree is just as
expressive either way around, so typical usage becomes the tie
breaker.  Typical usage is for the device driver to "call" the system
node; therefore put the linkage information in the device node where
it's most easily retrieved when needed.

Looking at the larger scope; we're talking about an SoC here.  While
most of the SoC device drivers don't need to know anything about the
SoC as a whole, the platform code should really know what SoC part it
is on.  SoC designers love to toss in special cases which don't really
slide nicely into our pretty device tree, and the OS almost always
needs chip specific support code to handle it.  I'm inclined to say
that the bindings from device node to shared soc registers may be
*recommended*, but not *required*.  As long as there is some form of
linkage between the soc and device nodes, and as long as the SoC node
describes exactly which SoC it is, then the OS has all the information
it needs to figure out which devices are connected to which bits of
which shared registers (based on register address).  Now, this might
be a bad precedence, but I'm hesitant to go down the path of trying to
describe something in the device tree which is inherent to the SoC
design.

Cheers,
g.

-- 
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
grant.likely at secretlab.ca
(403) 399-0195



More information about the Linuxppc-dev mailing list