On Mon, Aug 06, 2018 at 04:11:58PM -0400, Robert P. J. Day wrote: > On Mon, 6 Aug 2018, Rob Herring wrote: > > > On Mon, Aug 6, 2018 at 10:53 AM Robert P. J. Day <rpjday@xxxxxxxxxxxxxx> wrote: > > > > > > section 2.3.5 of the spec seems contradictory: > > > > > > "The #address-cells and #size-cells properties are not inherited > > > from ancestors in the devicetree. They shall be explicitly defined. > > > > > > "A DTSpec-compliant boot program shall supply #address-cells and > > > #size-cells on all nodes that have children. > > > > That should be amended to "... that have children with 'reg' > > property". > > ah, that makes more sense. Needs to be "reg" or "ranges" properties though. > > > > "If missing, a client program should assume a default value of 2 > > > for #address-cells, and a value of 1 for #size-cells." > > > > > > those first two sentences clearly imply that those properties > > > *must* be explicitly defined, while the immediately following > > > sentence allows a client program to fill them in if they're > > > missing. that seems confusing. > > > > I'd guess the last sentence was put there because there were DT's in > > the wild which didn't have the properties. We can probably remove > > the last sentence. dtc has had a warning for this for ages. > > > > Interestingly, this isn't even the defaults the kernel uses. Both > > are 1 for all but Sparc. > > i can submit a patch for that once i figure out how to word it, > unless someone way more competent than me wants to do it first. i will > defer to the smarter people here. Yeah.. this is exactly why it should be made mandatory. Although IEEE 1275 clearly spelled out defaults, there's a long history of both boot programs and client programs getting this totally, inconsistently wrong. -- 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
Attachment:
signature.asc
Description: PGP signature