[RFC] Device tree for new desktop platform in arch/powerpc

Segher Boessenkool segher at kernel.crashing.org
Fri Jun 22 19:10:42 EST 2007


>>>> The "#address-cells" property should be completely absent,
>>>> even; for interrupt matching, that means "treat as 0, no
>>>> unit address used in interrupt mapping, just the interrupt
>>>> number", and for the "normal" purpose (defining the format
>>>> of devices on the bus rooted at / represented by this node)
>>>> it means "there is no such bus" -- this is different from
>>>> #address-cells = 0.
>>>
>>> I'd rather have it present and explicitely set to 0,
>>
>> It is not the "right thing" to do, but should be harmless
>> in most situations.
>
> It's pretty much the right thing to do in that case imho... based on 
> the
> assumption that a common practice is worth 10 standards :-)

It is of course "defensive programming", in that a device
tree like that also works with badly broken OS code.

So perhaps we should indeed recommend this for Linux flat
device trees.

Which is not to say that the Linux parsing code shouldn't
be fixed (if it is broken at all, who knows).

> (I think I could even quote Linus on that one, let's just say that I
> totally agree with him on those matters, I'd rather have people
> "standardize" around existing common practices that happen to also work
> well with existing code rather than doing differently because that's
> what a 10 yrs old unmaintained piece of pdf says should be done :-)

OTOH, you need a few people doing the "interesting" cases,
so you can find and fix the flaws in your OS code :-)


Segher




More information about the Linuxppc-dev mailing list