There may be a chance that board specific fix_fdt() will change the
size of FDT blob so it's safe to call reserve_fdt() after fix_fdt()
otherwise global data (gd) will overwrite with FDT blob values.
Fixes: a8492e25ac71 ("riscv: Expand the DT size before copy reserved memory node")
Signed-off-by: Pragnesh Patel <pragnesh.patel@sifive.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Rick Chen <rick@andestech.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
* - board info struct
*/
setup_dest_addr,
+#ifdef CONFIG_OF_BOARD_FIXUP
+ fix_fdt,
+#endif
#ifdef CONFIG_PRAM
reserve_pram,
#endif
INIT_FUNC_WATCHDOG_RESET
setup_bdinfo,
display_new_sp,
-#ifdef CONFIG_OF_BOARD_FIXUP
- fix_fdt,
-#endif
INIT_FUNC_WATCHDOG_RESET
reloc_fdt,
reloc_bootstage,