[PATCH] of/fdt: Add unflatten_partial_device_tree

David Gibson david at gibson.dropbear.id.au
Tue Jun 29 11:22:07 EST 2010


On Mon, Jun 28, 2010 at 04:18:27PM -0700, Grant Likely wrote:
> On Mon, Jun 28, 2010 at 10:47 AM, Stephen Neuendorffer
> <stephen.neuendorffer at xilinx.com> wrote:
> > This code allows a user to parse a partial device tree blob, which is
> > structurally independent of any toplevel blob.
> > Previously, this code assumed that the blob comes from initial_boot_params.
> > Now, unflatten_partial_device_tree can take a blob from an arbitrary position,
> > and the location of the blob gets passed around to the various support functions.
> > Some of the functions are still tied to the initial_boot_params blob, although
> > perhaps they should get abstracted as well?
> 
> At the very least, all the references in drivers/of should probably be
> abstracted.  I'm not to worried about the stuff in arch/* unless the
> functions there are also needed for partial tree parsing.
> 
> The code in unflatten_partial_device_tree is also (as you know) a
> blatant copy and paste from unflatten_device_tree.  The two functions
> should be consolidated.
> 
> Another question is what to do with the unflattened tree once it is
> unflattened.  Some of the existing code expects the node to be part of
> the global tree.  Those could either be refactored, or the new partial
> tree could be grafted into the global tree.  Grafting will have the
> least impact, but it probably isn't a good idea in the long term.
> Grafting together unrelated trees seems messy to me.

I think I must have missed an earlier discussion.  What's the use case
for multiple fdt blobs?

-- 
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


More information about the devicetree-discuss mailing list