summaryrefslogtreecommitdiff
path: root/include/linux/of_fdt.h
diff options
context:
space:
mode:
authorStephen Neuendorffer <stephen.neuendorffer@xilinx.com>2010-11-19 02:55:02 +0300
committerGrant Likely <grant.likely@secretlab.ca>2010-12-30 03:02:15 +0300
commitfe14042358fac0673d4b6362a73796fd64379938 (patch)
tree7d2db09ee18157468c420909bef1be8e81d47b2f /include/linux/of_fdt.h
parent57d00ecf90cc9854973da2960012b734acc26e51 (diff)
downloadlinux-fe14042358fac0673d4b6362a73796fd64379938.tar.xz
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>
Diffstat (limited to 'include/linux/of_fdt.h')
-rw-r--r--include/linux/of_fdt.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
index 70c5b736f0a3..9ce5dfd2186a 100644
--- a/include/linux/of_fdt.h
+++ b/include/linux/of_fdt.h
@@ -68,6 +68,8 @@ extern void *of_fdt_get_property(struct boot_param_header *blob,
extern int of_fdt_is_compatible(struct boot_param_header *blob,
unsigned long node,
const char *compat);
+extern void of_fdt_unflatten_tree(unsigned long *blob,
+ struct device_node **mynodes);
/* TBD: Temporary export of fdt globals - remove when code fully merged */
extern int __initdata dt_root_addr_cells;