From: Simon Glass Date: Wed, 28 Mar 2012 13:08:25 -0700 Subject: [U-Boot] [PATCH 2/2] arm: Check for valid FDT after console is up In-Reply-To: <1332965305-21151-1-git-send-email-sjg@chromium.org> References: <1332965305-21151-1-git-send-email-sjg@chromium.org> Message-ID: <1332965305-21151-2-git-send-email-sjg@chromium.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- arch/arm/lib/board.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c index 81293c3..ab88e9c 100644 --- a/arch/arm/lib/board.c +++ b/arch/arm/lib/board.c @@ -291,6 +291,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 !! -- 1.7.7.3