summaryrefslogtreecommitdiffstats
path: root/common/board_r.c
diff options
context:
space:
mode:
authorSiva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>2015-12-03 15:46:03 +0100
committerTom Rini <trini@konsulko.com>2015-12-05 18:22:34 -0500
commite9acb9ea430e3638f1306993b10a10385092b20a (patch)
treecbed5bc953f7749a91645feca1cfdb14b7e37f00 /common/board_r.c
parentb4857aa90105ea85bf029f8eb99e72fbadc0e2d0 (diff)
downloadtalos-obmc-uboot-e9acb9ea430e3638f1306993b10a10385092b20a.tar.gz
talos-obmc-uboot-e9acb9ea430e3638f1306993b10a10385092b20a.zip
common: board: Dont relocate FDT incase of CONFIG_OF_EMBED
Don't relocate fdt in case of CONFIG_OF EMBED as the fdt is already embedded with u-boot image. Update fdt_blob after relocation as the fdt will be copied during u-boot relocation. Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Alexey Brodkin <abrodkin@synopsys.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com> (QEMU x86) Tested-by: Thomas Chou <thomas@wytron.com.tw> (Nios2) Acked-by: Thomas Chou <thomas@wytron.com.tw> Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/board_r.c')
-rw-r--r--common/board_r.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/common/board_r.c b/common/board_r.c
index 3bf49fdfb3..5af32dd65b 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -168,6 +168,14 @@ static int initr_reloc_global_data(void)
*/
gd->env_addr += gd->relocaddr - CONFIG_SYS_MONITOR_BASE;
#endif
+#ifdef CONFIG_OF_EMBED
+ /*
+ * The fdt_blob needs to be moved to new relocation address
+ * incase of FDT blob is embedded with in image
+ */
+ gd->fdt_blob += gd->reloc_off;
+#endif
+
return 0;
}
OpenPOWER on IntegriCloud