aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/arm/setup.c
diff options
context:
space:
mode:
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>2013-02-15 13:32:18 +0000
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>2013-02-15 13:32:18 +0000
commitea40403e1c493848ed30a433550b564191be46bd (patch)
treef15c5441a81a9c9baa66861cccd277777bf6cc48 /xen/arch/arm/setup.c
parent92b31a9099c3ba4ce7910e5a2ee5f36dbb8b336e (diff)
downloadxen-ea40403e1c493848ed30a433550b564191be46bd.tar.gz
xen-ea40403e1c493848ed30a433550b564191be46bd.tar.bz2
xen-ea40403e1c493848ed30a433550b564191be46bd.zip
xen/device_tree: introduce find_compatible_node
Introduce a find_compatible_node function that can be used by device drivers to find the node corresponding to their device in the device tree. Initialize device_tree_flattened early in start_xen, so that it is available before setup_mm. Get rid of fdt in the process. Also add device_tree_node_compatible to device_tree.h, that is currently missing. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> [ ijc - s/atag_paddr/fdt_paddr ] Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'xen/arch/arm/setup.c')
-rw-r--r--xen/arch/arm/setup.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index fbcde6f9c7..2be5515053 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -332,7 +332,6 @@ void __init start_xen(unsigned long boot_phys_offset,
unsigned long fdt_paddr,
unsigned long cpuid)
{
- void *fdt;
size_t fdt_size;
int cpus, i;
@@ -340,12 +339,12 @@ void __init start_xen(unsigned long boot_phys_offset,
smp_clear_cpu_maps();
- fdt = (void *)BOOT_MISC_VIRT_START
+ device_tree_flattened = (void *)BOOT_MISC_VIRT_START
+ (fdt_paddr & ((1 << SECOND_SHIFT) - 1));
- fdt_size = device_tree_early_init(fdt);
+ fdt_size = device_tree_early_init(device_tree_flattened);
cpus = smp_get_max_cpus();
- cmdline_parse(device_tree_bootargs(fdt));
+ cmdline_parse(device_tree_bootargs(device_tree_flattened));
setup_pagetables(boot_phys_offset, get_xen_paddr());
setup_mm(fdt_paddr, fdt_size);