Re: device_type = 'memory' deprecation?

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



On Fri, Dec 14, 2018 at 12:15:39PM -0600, Rob Herring wrote:
> On Fri, Dec 14, 2018 at 11:22 AM Kumar Gala <kumar.gala@xxxxxxxxxx> wrote:
> >
> > Guys,
> >
> > In the v0.2 spec with regards to device_type:
> >
> > ‘new use of the property is deprecated, and it should be included
> > only on cpu and memory nodes for compatibility with IEEE
> > 1275–derived devicetrees’.
> >
> > For CPU nodes I know we’ve been using compatible properties for
> > some time, so I can see how we’d phase ‘device_type’ out.  However
> > its unclear if we’ve got any compatible’s we are using for memory.
> > I know some special cases like ‘mmio-sram’, but do we have a
> > compatible that we should be using for general system memory?
> 
> Compatible doesn't really work for the same purposes because there are
> so many generally. I've moved the kernel over to using the node name
> for cpu nodes (and falling back to device_type as even modern IBM
> powerpc doesn't use 'cpu' for node names).
> 
> We could do the same for memory nodes. I don't think there are any
> cases of memory nodes not named 'memory', but I could be wrong.

Note that using node name is in a sense the same as using compatible.
The old, original 1275 model was to match on node name, then
compatible as a fallback (to allow multiple entries).  Essentially the
node name was the first entry in the compatible list.

That practice changed in the later days of 1275 with the generic names
proposal - with that the name was a generic description of the type of
device (ethernet / pci / whatever) instead of the register interface.

For regular RAM, "memory" is pretty much both a suitable generic
description *and* a sufficiently precise description of the register
interface.  So using the name should be just fine.

> The only other case I think is PCI bridge nodes. That too could move
> to (pci|pcie) node names. We've not been as consistent there, but we
> do warn on that now (by conveniently looking at device_type to find
> those nodes).
> 
> Rob
> 

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


[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