summaryrefslogtreecommitdiffstats
path: root/commands/oftree.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2014-05-19 14:40:03 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-05-22 08:09:13 +0200
commitd384b5639fc1a3cff60610e375a2096de413b71f (patch)
tree5516633e836d4c9ed89517296c8e1176a8c90072 /commands/oftree.c
parentc72a0504c97490c7fdf704d9552c1a9816a797b7 (diff)
downloadbarebox-d384b5639fc1a3cff60610e375a2096de413b71f.tar.gz
barebox-d384b5639fc1a3cff60610e375a2096de413b71f.tar.xz
of: Drop devicetree merge support
I assume I am the only person knowing that barebox is able to merge devicetrees. This feature seems broken for a while now since trying to merge devicetress results in: unflatten: too many end nodes Remove this feature to save the complexity. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands/oftree.c')
-rw-r--r--commands/oftree.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/commands/oftree.c b/commands/oftree.c
index db31d5901f..2c45b935d2 100644
--- a/commands/oftree.c
+++ b/commands/oftree.c
@@ -51,7 +51,7 @@ static int do_oftree(int argc, char *argv[])
int save = 0;
int free_of = 0;
int ret;
- struct device_node *n, *root;
+ struct device_node *root;
while ((opt = getopt(argc, argv, "pfl:s:")) > 0) {
switch (opt) {
@@ -130,16 +130,13 @@ static int do_oftree(int argc, char *argv[])
goto out;
}
- n = of_get_root_node();
-
- root = of_unflatten_dtb(n, fdt);
+ root = of_unflatten_dtb(fdt);
if (IS_ERR(root))
ret = PTR_ERR(root);
else
ret = 0;
- if (!n)
- ret = of_set_root_node(root);
+ ret = of_set_root_node(root);
if (ret) {
printf("parse oftree: %s\n", strerror(-ret));