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 <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
*/
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));
*/
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;
}