From: Simon Glass Date: Wed, 28 Mar 2012 10:08:25 +0000 (+0000) Subject: arm: Check for valid FDT after console is up X-Git-Tag: v2012.04-rc1~19^2~24 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2866903b3e32909085ffe486baca1bcb44e2caeb;p=u-boot 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 Signed-off-by: Tom Warren --- diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c index b9b35de61a..5270c11262 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 !!