diff options
-rw-r--r-- | common/board_f.c | 8 | ||||
-rw-r--r-- | dts/Kconfig | 6 |
2 files changed, 13 insertions, 1 deletions
diff --git a/common/board_f.c b/common/board_f.c index 212ffb3090b..22c180b2187 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -949,7 +949,7 @@ static const init_fnc_t init_sequence_f[] = { * - board info struct */ setup_dest_addr, -#ifdef CONFIG_OF_BOARD_FIXUP +#if defined(CONFIG_OF_BOARD_FIXUP) && !defined(CONFIG_OF_INITIAL_DTB_READONLY) fix_fdt, #endif #ifdef CFG_PRAM @@ -965,6 +965,10 @@ static const init_fnc_t init_sequence_f[] = { reserve_board, reserve_global_data, reserve_fdt, +#if defined(CONFIG_OF_BOARD_FIXUP) && defined(CONFIG_OF_INITIAL_DTB_READONLY) + reloc_fdt, + fix_fdt, +#endif reserve_bootstage, reserve_bloblist, reserve_arch, @@ -975,7 +979,9 @@ static const init_fnc_t init_sequence_f[] = { setup_bdinfo, display_new_sp, INIT_FUNC_WATCHDOG_RESET +#if !defined(CONFIG_OF_BOARD_FIXUP) || !defined(CONFIG_OF_INITIAL_DTB_READONLY) reloc_fdt, +#endif reloc_bootstage, reloc_bloblist, setup_reloc, diff --git a/dts/Kconfig b/dts/Kconfig index 6883a000a05..569d4be338e 100644 --- a/dts/Kconfig +++ b/dts/Kconfig @@ -145,6 +145,12 @@ config OF_EMBED endchoice +config OF_INITIAL_DTB_READONLY + bool "Initial DTB for DT control is read-only" + help + If initial DTB for DT control is read-only (e.g. points to + memory-mapped flash memory), then set this option. + config OF_BOARD bool "Provided by the board (e.g a previous loader) at runtime" default y if SANDBOX || OF_HAS_PRIOR_STAGE |