aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Cartwright <joshc@codeaurora.org>2014-03-13 16:36:36 -0500
committerMark Brown <broonie@linaro.org>2014-07-24 19:57:20 +0100
commitb94c8bedffeabb49f57bed9de17030f2addd21a0 (patch)
tree4fc95116aae683d12b5cd4757bed6aa3f11817c8
parent7c828dcc5ce4d19c7863ec204cac0dea341e347f (diff)
of: only scan for reserved mem when fdt present
When the reserved memory patches hit -next, several legacy (non-DT) boot failures were detected and bisected down to that commit. There needs to be some sanity checking whether a DT is even present before parsing the reserved ranges. Reported-by: Kevin Hilman <khilman@linaro.org> Signed-off-by: Josh Cartwright <joshc@codeaurora.org> Tested-by: Kevin Hilman <khilman@linaro.org> Signed-off-by: Grant Likely <grant.likely@linaro.org> (cherry picked from commit 2040b52768ebab6e7bd73af0dc63703269c62f17) Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r--drivers/of/fdt.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index b6e4d7fcd316..e521121ff71e 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -559,6 +559,9 @@ static int __init __fdt_scan_reserved_mem(unsigned long node, const char *uname,
*/
void __init early_init_fdt_scan_reserved_mem(void)
{
+ if (!initial_boot_params)
+ return;
+
of_scan_flat_dt(__fdt_scan_reserved_mem, NULL);
fdt_init_reserved_mem();
}