
On Nov 2, 2007, at 10:47 AM, Grant Likely wrote:
On 11/2/07, Sergej Stepanov Sergej.Stepanov@ids.de wrote:
Am Freitag, den 02.11.2007, 08:56 -0600 schrieb Grant Likely:
It also an area where device_type might actually be a useful property if it is used to auto enumerate devices of the same type. ie. If the dtb doesn't explicitly specify eth* aliases, then u-boot could enumerate them so that generic fixup routines can be used and so Linux (or other OS) can use the same device numbering as u-boot.
sorry... in chosen-node select defaults, for example?
I don't understand what you mean or are asking, but let me clarify what I mean.
I'm not talking about selected defaults; but about device enumeration (which is similar, but not exactly the same thing). If there is a class of devices which is typically enumerated (like ethernet devices), then the device_type property *might* be useful because it would allow firmware to find all devices of a similar type and assign numbers to them.
Also, OF has an 'aliases' mechanism defined which could be very useful. The '/aliases' node contains a set of properties which assign a set of 'simple' names to the full path of a node. For example, on the efika, /aliases looks like this:
ok cd /aliases ok .properties name "aliases" eth "/builtin/ethernet" ok
Now; for our purposes, using name->full_path mapping is probably sub-optimal and name->phandle might be better. But regardless, the alias can be used as a shortcut to refer to a particular node. For example, on the efika:
ok cd / ok cd eth ok pwd /builtin@F0000000/ethernet@F0003000 ok
So, if the aliases node was populated with common names, or if u-boot could auto-populate the /aliases node with enumerated values for things like 'eth#' and 'serial#', then we could do something like this for fixups:
I dont see how u-boot could auto-populate, that seems to defeat the purpose of aliases.
- k