On Wed, Jun 26, 2013 at 7:17 PM, David Gibson <da...@gibson.dropbear.id.au> wrote: > On Wed, Jun 26, 2013 at 02:44:17PM +0200, Alexander Graf wrote: >> I've had a lengthy discussion about that with Anthony a while ago. >> His take was that this is perfectly reasonable, as long as the >> device tree generation code stays within the machine model. The >> machine would just traverse the QOM hierachy and generate device >> tree nodes for everything it knows. > > I also talked with Anthony about this. Although he's insistent on the > fdt generation staying within the machine, I think it would make sense > to have some shared helpers for this between the fdt platforms.
FDT generation should stay in the machine but having helpers for platforms to share makes all the sense in the world. What I don't think makes sense is to move FDT generation logic to qdev*.c or anything like that. But if 99% of ARM/PPC just call fdt_build_generic_table() and then customize from there, that's fine by me. Regards, Anthony Liguori > Note that spapr already contains a half-arsed implementation of this. > > -- > David Gibson | I'll have my music baroque, and my code > david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ > | _way_ _around_! > http://www.ozlabs.org/~dgibson