Re: must #address-cells and #size-cells be explicitly defined or not?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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.

> > "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.

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                  http://crashcourse.ca/dokuwiki

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================

[Index of Archives]     [Device Tree]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Photos]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]

  Powered by Linux