Subject: Re: [PATCH 15/16] Add device tree for Ebony

From: Benjamin Herrenschmidt <[email-masked]>
Date: Thu, 15 Feb 2007 13:22:43 +1100

On Thu, 2007-02-15 at 02:00 +0100, Segher Boessenkool wrote:
> >>> Note that the "open-pic" node does not have a "#address-cells"
> >>> property, so that  the number of cells for the parent unit interrupt
> >>> specifiers is 2 (which is the value of its "#interrupt-cells"
> >>> property).
> 
> > Yes, "missing" is equivalent to 0,
> 
> ...and the reason for that is that nodes without physical
> children should not _have_ a "#address-cells" property.
> 
> > but the common practice has always
> > been to specify it explicitely. Check existing Apple and IBM
> > device-trees for example.
> 
> You do realise how many other borderline (or outright
> wrong) things are done in those trees, right?
> 
> It doesn't really hurt to have a "#a = 0" prop, but it's
> better to just not have a #a prop if you shouldn't have one.

Let's have one for now. I think that's how I documented it and it works
fine while I'm not sure the kernel code will cope with not having it (it
may ... or not).

There are various issues with the OF bindings, especially the imap one
(and some pretty bad bugs in it) and that's one of the reason I prefer
not leaving anything to be "implicit" like this case. It want explicit
mention of #address-cells/#size-cells/#interrupt-cells at all levels
where they might enter the parser.

Ben.