summaryrefslogtreecommitdiff
path: root/drivers/of/fdt.c
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2011-08-03 11:28:14 +0100
committerGrant Likely <grant.likely@secretlab.ca>2011-08-03 13:02:31 +0100
commit750f463a749e28464151ad26938d11b07b1c43cb (patch)
tree6aabb1512a4000615e93b25beccba606b62f7237 /drivers/of/fdt.c
parented8f37370d83e695c0a4fa5d5fc7a83ecb947526 (diff)
downloadlinux-3.10-750f463a749e28464151ad26938d11b07b1c43cb.tar.gz
linux-3.10-750f463a749e28464151ad26938d11b07b1c43cb.tar.bz2
linux-3.10-750f463a749e28464151ad26938d11b07b1c43cb.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. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> [grant.likely: add locking and rework parse loop] Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/of/fdt.c')
-rw-r--r--drivers/of/fdt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 65200af29c5..13d6d3a96b3 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -707,10 +707,12 @@ 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 */
+ /* Get pointer to "/chosen" and "/aliasas" nodes for use everywhere */
of_chosen = of_find_node_by_path("/chosen");
if (of_chosen == NULL)
of_chosen = of_find_node_by_path("/chosen@0");
+ of_aliases = of_find_node_by_path("/aliases");
+ of_alias_scan();
}
#endif /* CONFIG_OF_EARLY_FLATTREE */