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

Segher Boessenkool segher at kernel.crashing.org
Fri Jun 15 18:32:36 EST 2007


>>> Guideline 2: The "compatible" property must be present.
>>
>> ...if "name" doesn't perform the same function yet, which
>> of course is almost always.
>
> But the recommended practice doesn't have an "...if".  It says
> "compatible" must always be present.

If you read the r.p. more closely, you'll see this applies
to normal devices only.  Either way, the r.p. says very
clearly that the "old way" of doing things is still supported.

> The reason an OS would need to support "name" as well as
> "compatbile" for device driver matching would be
> for _legacy_ device trees that don't follow the recommended
> practice.

No, the OS has to do this since that is what the OF spec
says has to be done.  The generic names recommended practice
goes into this in some detail, too.

> For newly developed trees "compatible" should specify the programming
> model, if we are following that recommended practice.

Yes.

> So bottom line is that we shouldn't be moving toward using "name"
> to specify the programming model.

And no one suggested that.

>> 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.
>
> As mentioned above, matching on "name" would seem to be
> needed to handle legacy device trees as I read some of
> the reasoning in the generic names recommended practice.
> Not sure if that applies to Linux or not...

Not all Linux systems use a flat device tree, some use a
"real" Open Firmware.  Not doing the matching the way it
is described but differently is asking for problems, needing
unnecessary workarounds.


Segher




More information about the Linuxppc-dev mailing list