summaryrefslogtreecommitdiff
path: root/drivers/of/fdt.c
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2011-08-15 15:28:14 +0800
committerGrant Likely <grant.likely@secretlab.ca>2011-09-22 11:12:10 -0600
commit611cad720148c899db5a383c1c676fd820df7023 (patch)
tree780adeaa4418b7b1e76d4a3b8fe600f04475c7df /drivers/of/fdt.c
parenta81dd364de50bc1eb1519af0ecfa100753a09351 (diff)
downloadlinux-rpi3-611cad720148c899db5a383c1c676fd820df7023.tar.gz
linux-rpi3-611cad720148c899db5a383c1c676fd820df7023.tar.bz2
linux-rpi3-611cad720148c899db5a383c1c676fd820df7023.zip
dt: add of_alias_scan and of_alias_get_id
The patch adds function of_alias_scan to populate a global lookup table with the properties of 'aliases' node and function of_alias_get_id for drivers to find alias id from the lookup table. v3: Split out automatic addition of aliases on id lookup so that it can be debated separately from the core functionality. v2: - Add of_chosen/of_aliases populating and of_alias_scan() invocation for OF_PROMTREE. - Add locking - rework parse loop Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/of/fdt.c')
-rw-r--r--drivers/of/fdt.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 65200af29c52..aeec35bc3789 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -707,10 +707,8 @@ void __init unflatten_device_tree(void)
__unflatten_device_tree(initial_boot_params, &allnodes,
early_init_dt_alloc_memory_arch);
- /* Get pointer to OF "/chosen" node for use everywhere */
- of_chosen = of_find_node_by_path("/chosen");
- if (of_chosen == NULL)
- of_chosen = of_find_node_by_path("/chosen@0");
+ /* Get pointer to "/chosen" and "/aliasas" nodes for use everywhere */
+ of_alias_scan(early_init_dt_alloc_memory_arch);
}
#endif /* CONFIG_OF_EARLY_FLATTREE */