summaryrefslogtreecommitdiffstats
path: root/arch/ppc/lib
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-03-03 14:04:57 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2013-03-06 11:41:29 +0100
commit6d6edfcf53be19efa040b3a6fcb7583ce1fca573 (patch)
tree0a3fc1ea02aec09c2459c5787f0731db06e8d6d9 /arch/ppc/lib
parent0ba9a2347a747ae307e072030fc47fd684971249 (diff)
downloadbarebox-6d6edfcf53be19efa040b3a6fcb7583ce1fca573.tar.gz
barebox-6d6edfcf53be19efa040b3a6fcb7583ce1fca573.tar.xz
bootm: Pass unflattened devicetree to handlers
This makes it possible to modify the tree in the handlers. This is necessary because the initrd addresses are only known inside the handlers, but not to the generic bootm code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/ppc/lib')
-rw-r--r--arch/ppc/lib/ppclinux.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/ppc/lib/ppclinux.c b/arch/ppc/lib/ppclinux.c
index 95dc83bfe5..ef69eadfb7 100644
--- a/arch/ppc/lib/ppclinux.c
+++ b/arch/ppc/lib/ppclinux.c
@@ -18,6 +18,14 @@ static int do_bootm_linux(struct image_data *data)
if (!data->os_res)
return -EINVAL;
+ data->oftree = of_get_fixed_tree(data->of_root_node);
+ if (!data->oftree) {
+ pr_err("bootm: No devicetree given.\n");
+ return -EINVAL;
+ }
+
+ fdt_add_reserve_map(data->oftree);
+
kernel = (void *)(data->os_address + data->os_entry);
/*