RFC: new device types in the device tree (RE: [PATCH] powerpc: Add EDAC platform devices for 85xx)

Yoder Stuart-B08248 stuart.yoder at freescale.com
Sat May 5 01:16:25 EST 2007


 

> -----Original Message-----
> From: Segher Boessenkool [mailto:segher at kernel.crashing.org] 
> Sent: Wednesday, May 02, 2007 7:48 PM
> To: Yoder Stuart-B08248
> Cc: Dave Jiang; linuxppc-dev at ozlabs.org; 
> david at gibson.dropbear.id.au; bluesmoke-devel at lists.sourceforge.net
> Subject: Re: RFC: new device types in the device tree (RE: 
> [PATCH] powerpc: Add EDAC platform devices for 85xx)
> 
> >>> The 1275 spec is 'Open Firmware centric' in that it says
> >>> you don't need a device_type if the node is not used
> >>> by Open Firmware.
> >>
> >> It is "Open firmware centric" in every way; it is
> >> the Open firmware definition after all.
> >>
> >> "device_type" specifies what firmware interfaces a
> >> node implements.  "name" and "compatible" are for
> >> the client (i.e., OS, bootloader, etc.) to use for
> >> matching drivers to device nodes.
> >
> > The flat device tree standard (i.e. booting-without-of.txt)
> > certainly inherited stuff from IEEE-1275, but can diverge
> > if need be.
> 
> It shares the kernel interface.  You cannot go diverge
> on fundamental things.
> 
> > name is always optional (as defined by b-w-of.txt)
> 
> Where does it say that?  "name" is always required!  In
> the newer flat tree format, it's even impossible to
> create a node without "name".

I'm specifically referring to the "name" property.  Here is
what booting-without-of.txt says:

   While earlier users of Open Firmware like OldWorld
   macintoshes tended to use the actual device name for
   the "name" property, it's nowadays considered a good
   practice to use a name that is closer to the device
   class (often equal to device_type)...[snip]... However,
   the kernel doesn't generally put any restriction on the
   "name" property; it is simply considered good practice
   to follow the standard and its evolutions as closely as
   possible.

   Note also that the new format version 16 makes the
   "name" property optional. If it's absent for a node, then
   the node's unit name is then used to reconstruct the name.
   That is, the part of the unit name before the "@" sign
   is used (or the entire unit name if no "@" sign is present).

If the name property is missing the kernel contructs it from
the unit name.  I guess my point is the name property implies
nothing and the kernel doesn't seem to care what name is used.
It certainly doesn't imply a required set of properties.

Stuart



More information about the Linuxppc-dev mailing list