On Sun, May 10, 2009 at 8:00 PM, Michael Ellerman <mich...@ellerman.id.au> wrote: > On Sat, 2009-05-09 at 14:51 -0600, Grant Likely wrote: >> On Fri, May 8, 2009 at 10:03 AM, David H. Lynch Jr. <dh...@dlasys.net> wrote: >> > Is there an example somewhere that shows building a device tree on >> > the fly ? >> > >> > As our products move forward it becomes increasingly clear that >> > static configurations are not going to work. > >> To use device tree with partial reconfiguration would require rework >> to the device tree infrastructure to prune and graft portions of the >> device tree. I think it is possible, but it is non-trivial to get >> working. > > arch/powerpc/platforms/pseries/reconfig.c > > Not pretty, but it does more or less what you're talking about. Would > need some work to get it going on !pseries obviously.
Heh, I didn't even know this existed. :-) Thinking about this more, it seems to me that the tricky bit would be figuring out how to drop all references to a node before it is pruned from the tree. of_platform_devices would probably be the easiest because the bus could walked before pruning the node, but there are also references on the i2c, spi and mdio busses that must be dealt with appropriately. g. -- Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev