[patch 29/30] PS3: Device tree source.

Benjamin Herrenschmidt benh at kernel.crashing.org
Fri Jun 15 10:16:11 EST 2007


On Thu, 2007-06-14 at 17:36 +0200, Segher Boessenkool wrote:
> 
> "node name" in flat device trees doesn't allow a proper
> "name" property to exist for the root node.  This is a
> bug in the flat device tree tools, and either should be
> fixed, or this should be clearly documented as a divergence
> from "real" OF.
> 
> "name" of the root node is a bit special, since it is
> never displayed as part of a device path or used for
> device selection (instead, "/" at start of a path is
> handled specially, just like on unix filesystems).

This 'special' behaviour, the fact that it's definition is out of sync
with the generic name recommended practice, and finally, the fact that
quite a lot of real OFs out there don't even bother having one, makes me
think that it's a good idea to stick to what I did, which is to say the
root node has no name in a flat device-tree.

Now, what I -may- do to avoid information loss is tweak prom_init.c to
actually extract that name if it exist and stick a "name" property in
the root node in that case when flattening the tree.

But I still beleive as far as flat DTs for embedded are concerned, we
shouldn't use and rely on having a name at the root of the tree.

> Since anything that matches for "compatible" entries
> also first should check the "name" contents, it should
> be okay for flat device trees to have the information
> that could/should be in "name" in "compatible", instead.
>
> Does this answer all questions / clarify my position
> on all this?

Ben.




More information about the Linuxppc-dev mailing list