diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2013-03-03 14:04:57 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-03-06 11:41:29 +0100 |
commit | 6d6edfcf53be19efa040b3a6fcb7583ce1fca573 (patch) | |
tree | 0a3fc1ea02aec09c2459c5787f0731db06e8d6d9 /arch/arm/lib/bootm.c | |
parent | 0ba9a2347a747ae307e072030fc47fd684971249 (diff) | |
download | barebox-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/arm/lib/bootm.c')
-rw-r--r-- | arch/arm/lib/bootm.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index 2a7d0f58f2..00c49086c6 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -169,16 +169,12 @@ static int do_bootz_linux_fdt(int fd, struct image_data *data) } if (IS_BUILTIN(CONFIG_OFTREE)) { - struct device_node *node; - - node = of_unflatten_dtb(NULL, oftree); - if (!node) { + data->of_root_node = of_unflatten_dtb(NULL, oftree); + if (!data->of_root_node) { pr_err("unable to unflatten devicetree\n"); ret = -EINVAL; goto err_free; } - - data->oftree = of_get_fixed_tree(node); } else { data->oftree = oftree; } |