[RFC] making phandle's mandatory for of_platform_device

Segher Boessenkool segher at kernel.crashing.org
Tue Nov 21 21:17:37 EST 2006


>  1 - Stick to my current hairy stuff and plaster on possible new
> problems popping up with it, and live with the uglyness on 64 bits
> platforms
>  2 - Make it mandatory for all nodes to have a phandle (all of them)
>  3 - Make it mandatory for nodes that can be declared as
> of_platform_device to have a phandle
>  4 - Make it mandatory for nodes that can be declared as any child of
> of_device to have a phandle (and use a consistent naming accross all
> childs of of_device, like macio_device, of_platform_device, etc...)
>  5 - Make it mandatory for nodes using the new automatic generation of
> of_platform_devices from the device-tree to have phandles.

I don't see any reason to change the status quo; i.e., Linux only
requires a phandle in the device tree if Linux uses that phandle
in some way.

That would be any of your 2..5, people can choose what to use
depending on how future-proof they want to be.

Another option is for Linux to generate unique phandles for all
nodes that don't have one yet.  To make this simpler, you could
require flat device trees that don't have phandles on all modes,
to not use any phandle > 0x0fffffff (say), so Linux _knows_ there
is a certain range it can use at will.  I haven't seen any flat
device trees that used high numbers for phandles, so this change
should be really easy on people.


Segher




More information about the Linuxppc-dev mailing list