]> git.karo-electronics.de Git - linux-beck.git/commit
of/flattree: Refactor unflatten_device_tree and add fdt_unflatten_tree
authorStephen Neuendorffer <stephen.neuendorffer@xilinx.com>
Thu, 18 Nov 2010 23:55:02 +0000 (15:55 -0800)
committerGrant Likely <grant.likely@secretlab.ca>
Thu, 30 Dec 2010 00:02:15 +0000 (17:02 -0700)
commitfe14042358fac0673d4b6362a73796fd64379938
tree7d2db09ee18157468c420909bef1be8e81d47b2f
parent57d00ecf90cc9854973da2960012b734acc26e51
of/flattree: Refactor unflatten_device_tree and add fdt_unflatten_tree

unflatten_device_tree has two dependencies on things that happen
during boot time.  Firstly, it references the initial device tree
directly. Secondly, it allocates memory using the early boot
allocator.  This patch factors out these dependencies and uses
the new __unflatten_device_tree function to implement a driver-visible
fdt_unflatten_tree function, which can be used to unflatten a
blob after boot time.

V2:
- remove extra __va() call
- make dt_alloc functions return void *.  This doesn't fix the general
  strangeness in this code that constantly casts back and forth between
  unsigned long and __be32 *

Signed-off-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
drivers/of/fdt.c
include/linux/of_fdt.h