aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/of/fdt.c
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2011-08-03 06:28:14 -0400
committerGrant Likely <grant.likely@secretlab.ca>2011-08-03 08:02:31 -0400
commit750f463a749e28464151ad26938d11b07b1c43cb (patch)
tree6aabb1512a4000615e93b25beccba606b62f7237 /drivers/of/fdt.c
parented8f37370d83e695c0a4fa5d5fc7a83ecb947526 (diff)
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 65200af29c52..13d6d3a96b31 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -707,10 +707,12 @@ void __init unflatten_device_tree(void)
707 __unflatten_device_tree(initial_boot_params, &allnodes, 707 __unflatten_device_tree(initial_boot_params, &allnodes,
708 early_init_dt_alloc_memory_arch); 708 early_init_dt_alloc_memory_arch);
709 709
710 /* Get pointer to OF "/chosen" node for use everywhere */ 710 /* Get pointer to "/chosen" and "/aliasas" nodes for use everywhere */
711 of_chosen = of_find_node_by_path("/chosen"); 711 of_chosen = of_find_node_by_path("/chosen");
712 if (of_chosen == NULL) 712 if (of_chosen == NULL)
713 of_chosen = of_find_node_by_path("/chosen@0"); 713 of_chosen = of_find_node_by_path("/chosen@0");
714 of_aliases = of_find_node_by_path("/aliases");
715 of_alias_scan();
714} 716}
715 717
716#endif /* CONFIG_OF_EARLY_FLATTREE */ 718#endif /* CONFIG_OF_EARLY_FLATTREE */