On Fri, Nov 18, 2011 at 11:00:04AM -0600, Timur Tabi wrote: > Scott Wood wrote: > >> > How do I update the device tree from platform code? > > > prom_update_property() > > I assume this needs to be called after the DT has been unflattened, > since it takes a device_node* as a parameter. Is there any way I can > modify the tree before it's unflattened? I'd like to fixup the tree in > an early_param() function.
What's wrong with doing it in setup_arch()? Modifying a flat device tree is a more complicated task, and the kernel's code is read-only. It's not worth bringing libfdt or similar complexity in for this, when there are other alternatives. If it really needs to be done early, consider doing it from U-Boot. The bootwrapper would be a decent place as well, but we probably shouldn't require its use just for this. -Scott _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev