On Tue, Jan 6, 2009 at 3:37 PM, Myles Watson mylesgw@gmail.com wrote:
Marc,
Hopefully this makes everything right again. I still think some of the geode functions should be moved, but that's really a separate issue.
You have to specify to make things breadth first, which seems like the correct way.
I guess it's not really breadth first. It's just parents before siblings.
I guess the more correct terminology is preorder. Take care of the root before siblings or children.
I think this should be done for all the phases unless there's some compelling reason not to.
This patch implements preorder traversal for Phase 2 and Phase 6, and prints a warning that Phase 1 is obsolete if anyone implements one.
The only difference between the Phase 2 and Phase 6 implementations is that phase2_fixup is always called if it's defined, but phase6_init is only called if the device is enabled.
Note that any devices not found in the tree will not have their init functions called with this patch. I think that's a good thing, but it will require some dts fixes.
Boot tested on Serengeti and qemu.
Signed-off-by: Myles Watson mylesgw@gmail.com
Thanks, Myles