aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/lib
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2012-03-28 10:08:25 +0000
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2012-03-29 08:12:49 +0200
commit2866903b3e32909085ffe486baca1bcb44e2caeb (patch)
treefc7766cd3a1e7b32946af1f1096ec88b63631b8d /arch/arm/lib
parent9a263e55dc00f3277d8e82c906ee5c7a1dca0ba5 (diff)
downloadu-boot-linaro-stable-2866903b3e32909085ffe486baca1bcb44e2caeb.tar.gz
arm: Check for valid FDT after console is up
When using CONFIG_OF_CONTROL, add a check that we have a valid FDT and panic() if not. This must be done after the console is ready. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Warren <twarren@nvidia.com>
Diffstat (limited to 'arch/arm/lib')
-rw-r--r--arch/arm/lib/board.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
index b9b35de61..5270c1126 100644
--- a/arch/arm/lib/board.c
+++ b/arch/arm/lib/board.c
@@ -293,6 +293,14 @@ void board_init_f(ulong bootflag)
}
}
+#ifdef CONFIG_OF_CONTROL
+ /* For now, put this check after the console is ready */
+ if (fdtdec_prepare_fdt()) {
+ panic("** CONFIG_OF_CONTROL defined but no FDT - please see "
+ "doc/README.fdt-control");
+ }
+#endif
+
debug("monitor len: %08lX\n", gd->mon_len);
/*
* Ram is setup, size stored in gd !!