aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2018-08-29 17:20:46 -0500
committerRob Herring (Arm) <robh@kernel.org>2024-05-31 08:33:54 -0500
commit554b66233623efd7a029135d355aeb2b7c8eb527 (patch)
treec88af58e56b47dc51c49982d37aed0a7dfae6872
parent1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0 (diff)
of/fdt: Scan the root node properties earlier
Scan the root node properties (#{size,address}-cells) earlier, so that the dt_root_addr_cells and dt_root_size_cells variables are initialized and can be used. Link: https://lore.kernel.org/all/20180830190523.31474-2-robh@kernel.org/ Signed-off-by: Rob Herring <robh@kernel.org>
-rw-r--r--drivers/of/fdt.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index a8a04f27915b..00bb8c9b62fa 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -1170,6 +1170,10 @@ bool __init early_init_dt_verify(void *params)
initial_boot_params = params;
of_fdt_crc32 = crc32_be(~0, initial_boot_params,
fdt_totalsize(initial_boot_params));
+
+ /* Initialize {size,address}-cells info */
+ early_init_dt_scan_root();
+
return true;
}
@@ -1178,9 +1182,6 @@ void __init early_init_dt_scan_nodes(void)
{
int rc;
- /* Initialize {size,address}-cells info */
- early_init_dt_scan_root();
-
/* Retrieve various information from the /chosen node */
rc = early_init_dt_scan_chosen(boot_command_line);
if (rc)