"Early" devices and the DT

glikely@secretlab.ca grant.likely at secretlab.ca
Sun Jun 26 17:24:43 EDT 2011

Mitch Bradley <wmb at firmworks.com> wrote:

>Some solutions to the early device problem
>a) Most complex:  Use new properties to create a dependency graph. 
>is probably the most general solution, but also probably the hardest
>people to think about and maintain.
>b) Define a set of init phases 0,1,2,...  and mark each early device 
>node with a phase number property.  Scan the tree for each phase and 
>handle only the devices with that phase number.  Unmarked nodes are 
>handled last.
>c) Similar to b, but instead of properties in nodes, have properties 
>like "linux-phase0", "linux-phase1", etc in /chosen, whose values are 
>lists of phandles.

d) don't try to encode init order at all in the DT, and let device drivers request probe to be deferred.  If this works out, it will be by far the least complex and won't require anybody to sit and work out the init order for each machine.  I've even already posted a draft patch to do this.

e) work out probe order dynamically by looking at known phandle types at device registration time. This is potentially more 'efficient' than option d, but it requires a lot of knowledge to be built into the registration code which will get really complex in a hurry.

Right now I'm strongly leaning in the direction of option d.


Sent from my Android phone with K-9 Mail. Please excuse my brevity.

More information about the linux-arm-kernel mailing list