diff options
| author | Pragnesh Patel <[email protected]> | 2020-08-13 10:12:26 +0530 |
|---|---|---|
| committer | Andes <[email protected]> | 2020-08-14 14:39:47 +0800 |
| commit | 313981c2d9437f31b2a0f3838591a5fb0e5d8ebe (patch) | |
| tree | b1e7f289c00fe53b02ee5f11894e4d47a7697f83 | |
| parent | 7c6ca03eaed0035ca6676e9bc7f5f1dfcaae7e8f (diff) | |
common/board_f: make sure to call fix_fdt() before reserve_fdt()
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 <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
Reviewed-by: Rick Chen <[email protected]>
Reviewed-by: Atish Patra <[email protected]>
| -rw-r--r-- | common/board_f.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/common/board_f.c b/common/board_f.c index 79532f43656..3932e0c69dd 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -919,6 +919,9 @@ static const init_fnc_t init_sequence_f[] = { * - board info struct */ setup_dest_addr, +#ifdef CONFIG_OF_BOARD_FIXUP + fix_fdt, +#endif #ifdef CONFIG_PRAM reserve_pram, #endif @@ -941,9 +944,6 @@ static const init_fnc_t init_sequence_f[] = { 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, |
