summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Panov <rockford@yandex.ru>2017-05-10 20:51:17 +0300
committerSascha Hauer <s.hauer@pengutronix.de>2017-05-11 10:39:34 +0200
commit2e756eefae13ecf2c5c0a2c3ebcca1a6151ac476 (patch)
tree81c4c3da126098a91bcac63f654c1623ca12ca65
parentcf4c8c921e13d6d08c7869048186d6ac0996d58b (diff)
downloadbarebox-2e756eefae13ecf2c5c0a2c3ebcca1a6151ac476.tar.gz
of: Search for /memory node by type, if it is not found by name
Update of Rockchip dts featured changes of simple "/memory" node to "/memory@6000000". Support this change. Signed-off-by: Andrey Panov <rockford@yandex.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--drivers/of/base.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/of/base.c b/drivers/of/base.c
index c9bdd91..33f6162 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -1910,6 +1910,8 @@ int of_probe(void)
barebox_set_model(of_model);
memory = of_find_node_by_path("/memory");
+ if (!memory)
+ memory = of_find_node_by_type(root_node, "memory");
if (memory)
of_add_memory(memory, false);