summaryrefslogtreecommitdiff
path: root/arch/arm/kernel/devtree.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/kernel/devtree.c')
-rw-r--r--arch/arm/kernel/devtree.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/arm/kernel/devtree.c b/arch/arm/kernel/devtree.c
index 65addcbf5b30..e94422d0405c 100644
--- a/arch/arm/kernel/devtree.c
+++ b/arch/arm/kernel/devtree.c
@@ -88,6 +88,7 @@ void __init arm_dt_init_cpu_maps(void)
for_each_child_of_node(cpus, cpu) {
u32 hwid;
+ const __be32 *cell;
if (of_node_cmp(cpu->type, "cpu"))
continue;
@@ -98,13 +99,13 @@ void __init arm_dt_init_cpu_maps(void)
* properties is considered invalid to build the
* cpu_logical_map.
*/
- if (of_property_read_u32(cpu, "reg", &hwid)) {
- pr_debug(" * %s missing reg property\n",
- cpu->full_name);
+ cell = of_get_property(cpu, "reg", NULL);
+ if (!cell) {
+ pr_err("%s: missing reg property\n", cpu->full_name);
of_node_put(cpu);
return;
}
-
+ hwid = of_read_number(cell, of_n_addr_cells(cpu));
/*
* 8 MSBs must be set to 0 in the DT since the reg property
* defines the MPIDR[23:0].