From: Siva Durga Prasad Paladugu Date: Thu, 3 Dec 2015 11:23:44 +0000 (+0530) Subject: common: board: Update fdt_blob after relocation X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3c141dc06f251815d3521809daac79160e14736c;p=thirdparty%2Fu-boot.git common: board: Update fdt_blob after relocation Update fdt_blob after relocation incase of CONFIG_OF_EMBED as the fdt will be copied during u-boot relocation updating it before relocation may cause issue with some devices if they try to use it before it actually relocated Signed-off-by: Siva Durga Prasad Paladugu Signed-off-by: Michal Simek --- diff --git a/common/board_f.c b/common/board_f.c index 4aac00d7ba8..53661e33cb9 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -673,9 +673,6 @@ static int setup_reloc(void) */ gd->reloc_off = gd->relocaddr - (CONFIG_SYS_TEXT_BASE + 0x400); #endif -#endif -#ifdef CONFIG_OF_EMBED - gd->fdt_blob += gd->reloc_off; #endif memcpy(gd->new_gd, (char *)gd, sizeof(gd_t)); diff --git a/common/board_r.c b/common/board_r.c index bf6c72572d7..5a758b00a6e 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -159,6 +159,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; }