summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.m@jp.panasonic.com>2014-09-06 23:39:00 +0900
committerTom Rini <trini@ti.com>2014-09-16 12:23:59 -0400
commitc970dffedb9f7bf76d67157c8ceba64496b0c64a (patch)
treef95c3eaf360886a86276a97b42601c56fa0d74d1 /common
parent8e714432118c24b568c70a66cc9476f2502b4c4d (diff)
downloadblackbird-obmc-uboot-c970dffedb9f7bf76d67157c8ceba64496b0c64a.tar.gz
blackbird-obmc-uboot-c970dffedb9f7bf76d67157c8ceba64496b0c64a.zip
generic_board: do not set gd->fdt_blob unless CONFIG_OF_CONTROL=y
gd->fdt_blob is used for FDT control of U-Boot. If CONFIG_OF_CONTROL is not defined, it is useless. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common')
-rw-r--r--common/board_f.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/common/board_f.c b/common/board_f.c
index 5f33bce4a2..e6aa298d5a 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -341,21 +341,23 @@ static int setup_ram_buf(void)
static int setup_fdt(void)
{
-#ifdef CONFIG_OF_EMBED
+#ifdef CONFIG_OF_CONTROL
+# ifdef CONFIG_OF_EMBED
/* Get a pointer to the FDT */
gd->fdt_blob = __dtb_dt_begin;
-#elif defined CONFIG_OF_SEPARATE
+# elif defined CONFIG_OF_SEPARATE
/* FDT is at end of image */
gd->fdt_blob = (ulong *)&_end;
-#elif defined(CONFIG_OF_HOSTFILE)
+# elif defined(CONFIG_OF_HOSTFILE)
if (read_fdt_from_file()) {
puts("Failed to read control FDT\n");
return -1;
}
-#endif
+# endif
/* Allow the early environment to override the fdt address */
gd->fdt_blob = (void *)getenv_ulong("fdtcontroladdr", 16,
(uintptr_t)gd->fdt_blob);
+#endif
return 0;
}
OpenPOWER on IntegriCloud