[PATCH 6/9] Convert CONFIG_SPL_INIT_MINIMAL et al to Kconfig

Tom Rini trini at konsulko.com
Thu May 19 01:47:49 CEST 2022


This converts the following to Kconfig:
   CONFIG_SPL_INIT_MINIMAL
   CONFIG_SPL_FLUSH_IMAGE
   CONFIG_SPL_SKIP_RELOCATE

Signed-off-by: Tom Rini <trini at konsulko.com>
---
 README                                       |  6 ------
 arch/powerpc/cpu/mpc83xx/Makefile            |  2 ++
 arch/powerpc/cpu/mpc83xx/start.S             |  2 +-
 arch/powerpc/cpu/mpc85xx/Makefile            |  2 ++
 arch/powerpc/cpu/mpc85xx/cpu_init_early.c    |  2 +-
 arch/powerpc/cpu/mpc85xx/start.S             |  2 +-
 arch/powerpc/cpu/mpc85xx/tlb.c               |  2 +-
 arch/powerpc/cpu/mpc8xxx/Makefile            |  2 ++
 arch/powerpc/cpu/mpc8xxx/law.c               |  4 ++--
 arch/powerpc/lib/Makefile                    |  2 ++
 board/congatec/common/Makefile               |  2 ++
 board/freescale/common/Makefile              |  2 ++
 board/freescale/p1010rdb/Makefile            |  2 ++
 board/freescale/p1_p2_rdb_pc/Makefile        |  2 ++
 common/spl/Kconfig                           | 14 ++++++++++++++
 configs/P1010RDB-PA_36BIT_NAND_defconfig     |  2 ++
 configs/P1010RDB-PA_36BIT_NOR_defconfig      |  1 +
 configs/P1010RDB-PA_36BIT_SDCARD_defconfig   |  1 +
 configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig |  1 +
 configs/P1010RDB-PA_NAND_defconfig           |  2 ++
 configs/P1010RDB-PA_NOR_defconfig            |  1 +
 configs/P1010RDB-PA_SDCARD_defconfig         |  1 +
 configs/P1010RDB-PA_SPIFLASH_defconfig       |  1 +
 configs/P1010RDB-PB_36BIT_NAND_defconfig     |  2 ++
 configs/P1010RDB-PB_36BIT_NOR_defconfig      |  1 +
 configs/P1010RDB-PB_36BIT_SDCARD_defconfig   |  1 +
 configs/P1010RDB-PB_36BIT_SPIFLASH_defconfig |  1 +
 configs/P1010RDB-PB_NAND_defconfig           |  2 ++
 configs/P1010RDB-PB_NOR_defconfig            |  1 +
 configs/P1010RDB-PB_SDCARD_defconfig         |  1 +
 configs/P1010RDB-PB_SPIFLASH_defconfig       |  1 +
 configs/P1020RDB-PC_36BIT_NAND_defconfig     |  2 ++
 configs/P1020RDB-PC_36BIT_SDCARD_defconfig   |  1 +
 configs/P1020RDB-PC_36BIT_SPIFLASH_defconfig |  1 +
 configs/P1020RDB-PC_36BIT_defconfig          |  1 +
 configs/P1020RDB-PC_NAND_defconfig           |  2 ++
 configs/P1020RDB-PC_SDCARD_defconfig         |  1 +
 configs/P1020RDB-PC_SPIFLASH_defconfig       |  1 +
 configs/P1020RDB-PC_defconfig                |  1 +
 configs/P1020RDB-PD_NAND_defconfig           |  2 ++
 configs/P1020RDB-PD_SDCARD_defconfig         |  1 +
 configs/P1020RDB-PD_SPIFLASH_defconfig       |  1 +
 configs/P1020RDB-PD_defconfig                |  1 +
 configs/P2020RDB-PC_36BIT_NAND_defconfig     |  2 ++
 configs/P2020RDB-PC_36BIT_SDCARD_defconfig   |  1 +
 configs/P2020RDB-PC_36BIT_SPIFLASH_defconfig |  1 +
 configs/P2020RDB-PC_36BIT_defconfig          |  1 +
 configs/P2020RDB-PC_NAND_defconfig           |  2 ++
 configs/P2020RDB-PC_SDCARD_defconfig         |  1 +
 configs/P2020RDB-PC_SPIFLASH_defconfig       |  1 +
 configs/P2020RDB-PC_defconfig                |  1 +
 configs/T1024RDB_NAND_defconfig              |  2 ++
 configs/T1024RDB_SDCARD_defconfig            |  2 ++
 configs/T1024RDB_SPIFLASH_defconfig          |  2 ++
 configs/T1042D4RDB_NAND_defconfig            |  2 ++
 configs/T1042D4RDB_SDCARD_defconfig          |  2 ++
 configs/T1042D4RDB_SPIFLASH_defconfig        |  2 ++
 configs/T2080QDS_NAND_defconfig              |  2 ++
 configs/T2080QDS_SDCARD_defconfig            |  2 ++
 configs/T2080QDS_SPIFLASH_defconfig          |  2 ++
 configs/T2080RDB_NAND_defconfig              |  2 ++
 configs/T2080RDB_SDCARD_defconfig            |  2 ++
 configs/T2080RDB_SPIFLASH_defconfig          |  2 ++
 configs/T2080RDB_revD_NAND_defconfig         |  2 ++
 configs/T2080RDB_revD_SDCARD_defconfig       |  2 ++
 configs/T2080RDB_revD_SPIFLASH_defconfig     |  2 ++
 configs/T4240RDB_SDCARD_defconfig            |  2 ++
 include/configs/P1010RDB.h                   |  9 +--------
 include/configs/T102xRDB.h                   |  2 --
 include/configs/T104xRDB.h                   |  2 --
 include/configs/T208xQDS.h                   |  2 --
 include/configs/T208xRDB.h                   |  2 --
 include/configs/T4240RDB.h                   |  2 --
 include/configs/p1_p2_rdb_pc.h               |  7 +------
 scripts/config_whitelist.txt                 |  3 ---
 75 files changed, 115 insertions(+), 39 deletions(-)

diff --git a/README b/README
index e686839637f7..484a2c500ccf 100644
--- a/README
+++ b/README
@@ -1716,9 +1716,6 @@ The following options need to be configured:
 		For ARM, enable an optional function to print more information
 		about the running system.
 
-		CONFIG_SPL_INIT_MINIMAL
-		Arch init code should be built for a very small image
-
 		CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR,
 		CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS
 		Sector and number of sectors to load kernel argument
@@ -1742,9 +1739,6 @@ The following options need to be configured:
 		continuing (the hardware starts execution after just
 		loading the first page rather than the full 4K).
 
-		CONFIG_SPL_SKIP_RELOCATE
-		Avoid SPL relocation
-
 		CONFIG_SPL_UBI
 		Support for a lightweight UBI (fastmap) scanner and
 		loader
diff --git a/arch/powerpc/cpu/mpc83xx/Makefile b/arch/powerpc/cpu/mpc83xx/Makefile
index 7c4ef7657e5b..1255f533e343 100644
--- a/arch/powerpc/cpu/mpc83xx/Makefile
+++ b/arch/powerpc/cpu/mpc83xx/Makefile
@@ -8,10 +8,12 @@
 MINIMAL=
 
 ifdef CONFIG_SPL_BUILD
+ifndef CONFIG_TPL_BUILD
 ifdef CONFIG_SPL_INIT_MINIMAL
 MINIMAL=y
 endif
 endif
+endif
 
 extra-y	= start.o
 
diff --git a/arch/powerpc/cpu/mpc83xx/start.S b/arch/powerpc/cpu/mpc83xx/start.S
index 0944d1910573..7a01b16b75eb 100644
--- a/arch/powerpc/cpu/mpc83xx/start.S
+++ b/arch/powerpc/cpu/mpc83xx/start.S
@@ -39,7 +39,7 @@
 #endif
 
 #if defined(CONFIG_NAND_SPL) || \
-	(defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_INIT_MINIMAL))
+	(defined(CONFIG_SPL_BUILD) && CONFIG_IS_ENABLED(INIT_MINIMAL))
 #define MINIMAL_SPL
 #endif
 
diff --git a/arch/powerpc/cpu/mpc85xx/Makefile b/arch/powerpc/cpu/mpc85xx/Makefile
index c32cde04e16a..f3ee7d34949c 100644
--- a/arch/powerpc/cpu/mpc85xx/Makefile
+++ b/arch/powerpc/cpu/mpc85xx/Makefile
@@ -9,10 +9,12 @@
 MINIMAL=
 
 ifdef CONFIG_SPL_BUILD
+ifndef CONFIG_TPL_BUILD
 ifdef CONFIG_SPL_INIT_MINIMAL
 MINIMAL=y
 endif
 endif
+endif
 
 extra-y = start.o resetvec.o
 
diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
index 5a0d33b1b3dd..584454e01fee 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
@@ -177,7 +177,7 @@ void cpu_init_early_f(void *fdt)
 	invalidate_tlb(1);
 
 #if defined(CONFIG_SYS_PPC_E500_DEBUG_TLB) && \
-	!(defined(CONFIG_SPL_INIT_MINIMAL) && defined(CONFIG_SPL_BUILD)) && \
+	!(CONFIG_IS_ENABLED(INIT_MINIMAL) && defined(CONFIG_SPL_BUILD)) && \
 	!defined(CONFIG_NAND_SPL)
 	disable_tlb(CONFIG_SYS_PPC_E500_DEBUG_TLB);
 #endif
diff --git a/arch/powerpc/cpu/mpc85xx/start.S b/arch/powerpc/cpu/mpc85xx/start.S
index 2b2ad9735995..7a079edb691e 100644
--- a/arch/powerpc/cpu/mpc85xx/start.S
+++ b/arch/powerpc/cpu/mpc85xx/start.S
@@ -27,7 +27,7 @@
 #define LAW_EN		0x80000000
 
 #if defined(CONFIG_NAND_SPL) || \
-	(defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_INIT_MINIMAL))
+	(defined(CONFIG_SPL_BUILD) && CONFIG_IS_ENABLED(INIT_MINIMAL))
 #define MINIMAL_SPL
 #endif
 
diff --git a/arch/powerpc/cpu/mpc85xx/tlb.c b/arch/powerpc/cpu/mpc85xx/tlb.c
index 550d45da0efa..4f6778c720db 100644
--- a/arch/powerpc/cpu/mpc85xx/tlb.c
+++ b/arch/powerpc/cpu/mpc85xx/tlb.c
@@ -44,7 +44,7 @@ __weak void init_tlbs(void)
 }
 
 #if !defined(CONFIG_NAND_SPL) && \
-	(!defined(CONFIG_SPL_BUILD) || !defined(CONFIG_SPL_INIT_MINIMAL))
+	(!defined(CONFIG_SPL_BUILD) || !CONFIG_IS_ENABLED(INIT_MINIMAL))
 void read_tlbcam_entry(int idx, u32 *valid, u32 *tsize, unsigned long *epn,
 		       phys_addr_t *rpn)
 {
diff --git a/arch/powerpc/cpu/mpc8xxx/Makefile b/arch/powerpc/cpu/mpc8xxx/Makefile
index bec891d5401c..e3a536d4f8c7 100644
--- a/arch/powerpc/cpu/mpc8xxx/Makefile
+++ b/arch/powerpc/cpu/mpc8xxx/Makefile
@@ -5,10 +5,12 @@
 MINIMAL=
 
 ifdef CONFIG_SPL_BUILD
+ifndef CONFIG_TPL_BUILD
 ifdef CONFIG_SPL_INIT_MINIMAL
 MINIMAL=y
 endif
 endif
+endif
 
 ifdef MINIMAL
 
diff --git a/arch/powerpc/cpu/mpc8xxx/law.c b/arch/powerpc/cpu/mpc8xxx/law.c
index cf03f4101906..713ff172bcee 100644
--- a/arch/powerpc/cpu/mpc8xxx/law.c
+++ b/arch/powerpc/cpu/mpc8xxx/law.c
@@ -79,7 +79,7 @@ void disable_law(u8 idx)
 }
 
 #if !defined(CONFIG_NAND_SPL) && \
-	(!defined(CONFIG_SPL_BUILD) || !defined(CONFIG_SPL_INIT_MINIMAL))
+	(!defined(CONFIG_SPL_BUILD) || !CONFIG_IS_ENABLED(INIT_MINIMAL))
 static int get_law_entry(u8 i, struct law_entry *e)
 {
 	u32 lawar;
@@ -110,7 +110,7 @@ int set_next_law(phys_addr_t addr, enum law_size sz, enum law_trgt_if id)
 }
 
 #if !defined(CONFIG_NAND_SPL) && \
-	(!defined(CONFIG_SPL_BUILD) || !defined(CONFIG_SPL_INIT_MINIMAL))
+	(!defined(CONFIG_SPL_BUILD) || !CONFIG_IS_ENABLED(INIT_MINIMAL))
 int set_last_law(phys_addr_t addr, enum law_size sz, enum law_trgt_if id)
 {
 	u32 idx;
diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile
index 2782740bf5b3..066d7f408e08 100644
--- a/arch/powerpc/lib/Makefile
+++ b/arch/powerpc/lib/Makefile
@@ -10,10 +10,12 @@ lib-$(CONFIG_USE_PRIVATE_LIBGCC) += _ashldi3.o _ashrdi3.o _lshrdi3.o
 MINIMAL=
 
 ifdef CONFIG_SPL_BUILD
+ifndef CONFIG_TPL_BUILD
 ifdef CONFIG_SPL_INIT_MINIMAL
 MINIMAL=y
 endif
 endif
+endif
 
 obj-y	+= bdinfo.o
 
diff --git a/board/congatec/common/Makefile b/board/congatec/common/Makefile
index d4ddfbf97162..2db0fc1ae5c3 100644
--- a/board/congatec/common/Makefile
+++ b/board/congatec/common/Makefile
@@ -8,10 +8,12 @@
 MINIMAL=
 
 ifdef CONFIG_SPL_BUILD
+ifndef CONFIG_TPL_BUILD
 ifdef CONFIG_SPL_INIT_MINIMAL
 MINIMAL=y
 endif
 endif
+endif
 
 ifdef MINIMAL
 # necessary to create built-in.o
diff --git a/board/freescale/common/Makefile b/board/freescale/common/Makefile
index 4df484935f4c..4214c6e46e48 100644
--- a/board/freescale/common/Makefile
+++ b/board/freescale/common/Makefile
@@ -6,10 +6,12 @@
 MINIMAL=
 
 ifdef CONFIG_SPL_BUILD
+ifndef CONFIG_TPL_BUILD
 ifdef CONFIG_SPL_INIT_MINIMAL
 MINIMAL=y
 endif
 endif
+endif
 
 ifdef MINIMAL
 # necessary to create built-in.o
diff --git a/board/freescale/p1010rdb/Makefile b/board/freescale/p1010rdb/Makefile
index 36b34c70aa87..a00806e6aaed 100644
--- a/board/freescale/p1010rdb/Makefile
+++ b/board/freescale/p1010rdb/Makefile
@@ -5,10 +5,12 @@
 MINIMAL=
 
 ifdef CONFIG_SPL_BUILD
+ifndef CONFIG_TPL_BUILD
 ifdef CONFIG_SPL_INIT_MINIMAL
 MINIMAL=y
 endif
 endif
+endif
 
 ifdef MINIMAL
 obj-y	+= spl_minimal.o
diff --git a/board/freescale/p1_p2_rdb_pc/Makefile b/board/freescale/p1_p2_rdb_pc/Makefile
index a7736d8332d4..cbdb2507e838 100644
--- a/board/freescale/p1_p2_rdb_pc/Makefile
+++ b/board/freescale/p1_p2_rdb_pc/Makefile
@@ -5,10 +5,12 @@
 MINIMAL=
 
 ifdef CONFIG_SPL_BUILD
+ifndef CONFIG_TPL_BUILD
 ifdef CONFIG_SPL_INIT_MINIMAL
 MINIMAL=y
 endif
 endif
+endif
 
 ifdef MINIMAL
 obj-y	+= spl_minimal.o
diff --git a/common/spl/Kconfig b/common/spl/Kconfig
index 50ff113cab21..42681211d0df 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -140,6 +140,20 @@ config SPL_FSL_PBL
 
 endmenu
 
+menu "PowerPC SPL specific options"
+	depends on PPC && (SUPPORT_SPL && !SPL_FRAMEWORK)
+
+config SPL_INIT_MINIMAL
+	bool "Arch init code will be built for a very small image"
+
+config SPL_FLUSH_IMAGE
+	bool "Clean dcache and invalidate icache after loading the image"
+
+config SPL_SKIP_RELOCATE
+	bool "Skip relocating SPL"
+
+endmenu
+
 config HANDOFF
 	bool "Pass hand-off information from SPL to U-Boot proper"
 	depends on SPL && BLOBLIST
diff --git a/configs/P1010RDB-PA_36BIT_NAND_defconfig b/configs/P1010RDB-PA_36BIT_NAND_defconfig
index dc4d1c8bb9b6..79de9b41dcc0 100644
--- a/configs/P1010RDB-PA_36BIT_NAND_defconfig
+++ b/configs/P1010RDB-PA_36BIT_NAND_defconfig
@@ -29,6 +29,8 @@ CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_BOARD_EARLY_INIT_R=y
 # CONFIG_SPL_FRAMEWORK is not set
 CONFIG_SPL_NAND_BOOT=y
+CONFIG_SPL_INIT_MINIMAL=y
+CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_SPL_NAND_SUPPORT=y
 CONFIG_TPL=y
 CONFIG_TPL_DRIVERS_MISC=y
diff --git a/configs/P1010RDB-PA_36BIT_NOR_defconfig b/configs/P1010RDB-PA_36BIT_NOR_defconfig
index 6ded15625c5c..0c1cd2f19692 100644
--- a/configs/P1010RDB-PA_36BIT_NOR_defconfig
+++ b/configs/P1010RDB-PA_36BIT_NOR_defconfig
@@ -20,6 +20,7 @@ CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/ram rw console=$consoledev,$baudra
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_BOARD_EARLY_INIT_R=y
+CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PBSIZE=276
 CONFIG_CMD_IMLS=y
diff --git a/configs/P1010RDB-PA_36BIT_SDCARD_defconfig b/configs/P1010RDB-PA_36BIT_SDCARD_defconfig
index da9690688c4b..6f6d6445dd74 100644
--- a/configs/P1010RDB-PA_36BIT_SDCARD_defconfig
+++ b/configs/P1010RDB-PA_36BIT_SDCARD_defconfig
@@ -27,6 +27,7 @@ CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_BOARD_EARLY_INIT_R=y
 # CONFIG_SPL_FRAMEWORK is not set
 CONFIG_SPL_MMC_BOOT=y
+CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_I2C=y
 CONFIG_SPL_MPC8XXX_INIT_DDR=y
diff --git a/configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig b/configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig
index 84ebcd53b35d..bef258411633 100644
--- a/configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig
+++ b/configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig
@@ -30,6 +30,7 @@ CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_BOARD_EARLY_INIT_R=y
 # CONFIG_SPL_FRAMEWORK is not set
 CONFIG_SPL_SPI_BOOT=y
+CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_I2C=y
 CONFIG_SPL_MPC8XXX_INIT_DDR=y
diff --git a/configs/P1010RDB-PA_NAND_defconfig b/configs/P1010RDB-PA_NAND_defconfig
index d103ed599b6d..a3e6120b948e 100644
--- a/configs/P1010RDB-PA_NAND_defconfig
+++ b/configs/P1010RDB-PA_NAND_defconfig
@@ -28,6 +28,8 @@ CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_BOARD_EARLY_INIT_R=y
 # CONFIG_SPL_FRAMEWORK is not set
 CONFIG_SPL_NAND_BOOT=y
+CONFIG_SPL_INIT_MINIMAL=y
+CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_SPL_NAND_SUPPORT=y
 CONFIG_TPL=y
 CONFIG_TPL_DRIVERS_MISC=y
diff --git a/configs/P1010RDB-PA_NOR_defconfig b/configs/P1010RDB-PA_NOR_defconfig
index 8a416bc4d93f..349c6477a40c 100644
--- a/configs/P1010RDB-PA_NOR_defconfig
+++ b/configs/P1010RDB-PA_NOR_defconfig
@@ -19,6 +19,7 @@ CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/ram rw console=$consoledev,$baudra
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_BOARD_EARLY_INIT_R=y
+CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PBSIZE=276
 CONFIG_CMD_IMLS=y
diff --git a/configs/P1010RDB-PA_SDCARD_defconfig b/configs/P1010RDB-PA_SDCARD_defconfig
index e0a9c2df2ec7..bb34c0499ed2 100644
--- a/configs/P1010RDB-PA_SDCARD_defconfig
+++ b/configs/P1010RDB-PA_SDCARD_defconfig
@@ -26,6 +26,7 @@ CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_BOARD_EARLY_INIT_R=y
 # CONFIG_SPL_FRAMEWORK is not set
 CONFIG_SPL_MMC_BOOT=y
+CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_I2C=y
 CONFIG_SPL_MPC8XXX_INIT_DDR=y
diff --git a/configs/P1010RDB-PA_SPIFLASH_defconfig b/configs/P1010RDB-PA_SPIFLASH_defconfig
index 215671b4e7f1..f42ba10be9ae 100644
--- a/configs/P1010RDB-PA_SPIFLASH_defconfig
+++ b/configs/P1010RDB-PA_SPIFLASH_defconfig
@@ -29,6 +29,7 @@ CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_BOARD_EARLY_INIT_R=y
 # CONFIG_SPL_FRAMEWORK is not set
 CONFIG_SPL_SPI_BOOT=y
+CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_I2C=y
 CONFIG_SPL_MPC8XXX_INIT_DDR=y
diff --git a/configs/P1010RDB-PB_36BIT_NAND_defconfig b/configs/P1010RDB-PB_36BIT_NAND_defconfig
index 4bda8f2068f4..b807eb1ee358 100644
--- a/configs/P1010RDB-PB_36BIT_NAND_defconfig
+++ b/configs/P1010RDB-PB_36BIT_NAND_defconfig
@@ -30,6 +30,8 @@ CONFIG_BOARD_EARLY_INIT_R=y
 CONFIG_ID_EEPROM=y
 # CONFIG_SPL_FRAMEWORK is not set
 CONFIG_SPL_NAND_BOOT=y
+CONFIG_SPL_INIT_MINIMAL=y
+CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_SPL_NAND_SUPPORT=y
 CONFIG_TPL=y
 CONFIG_TPL_DRIVERS_MISC=y
diff --git a/configs/P1010RDB-PB_36BIT_NOR_defconfig b/configs/P1010RDB-PB_36BIT_NOR_defconfig
index dc2e40d530d0..9186e6fafe8a 100644
--- a/configs/P1010RDB-PB_36BIT_NOR_defconfig
+++ b/configs/P1010RDB-PB_36BIT_NOR_defconfig
@@ -21,6 +21,7 @@ CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_BOARD_EARLY_INIT_R=y
 CONFIG_ID_EEPROM=y
+CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PBSIZE=276
 CONFIG_CMD_IMLS=y
diff --git a/configs/P1010RDB-PB_36BIT_SDCARD_defconfig b/configs/P1010RDB-PB_36BIT_SDCARD_defconfig
index f7cf815433a3..3b1912d282fb 100644
--- a/configs/P1010RDB-PB_36BIT_SDCARD_defconfig
+++ b/configs/P1010RDB-PB_36BIT_SDCARD_defconfig
@@ -28,6 +28,7 @@ CONFIG_BOARD_EARLY_INIT_R=y
 CONFIG_ID_EEPROM=y
 # CONFIG_SPL_FRAMEWORK is not set
 CONFIG_SPL_MMC_BOOT=y
+CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_I2C=y
 CONFIG_SPL_MPC8XXX_INIT_DDR=y
diff --git a/configs/P1010RDB-PB_36BIT_SPIFLASH_defconfig b/configs/P1010RDB-PB_36BIT_SPIFLASH_defconfig
index ab378da0aad6..8ec1e93426e5 100644
--- a/configs/P1010RDB-PB_36BIT_SPIFLASH_defconfig
+++ b/configs/P1010RDB-PB_36BIT_SPIFLASH_defconfig
@@ -31,6 +31,7 @@ CONFIG_BOARD_EARLY_INIT_R=y
 CONFIG_ID_EEPROM=y
 # CONFIG_SPL_FRAMEWORK is not set
 CONFIG_SPL_SPI_BOOT=y
+CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_I2C=y
 CONFIG_SPL_MPC8XXX_INIT_DDR=y
diff --git a/configs/P1010RDB-PB_NAND_defconfig b/configs/P1010RDB-PB_NAND_defconfig
index 9f839f55fbe4..eb0e48289d79 100644
--- a/configs/P1010RDB-PB_NAND_defconfig
+++ b/configs/P1010RDB-PB_NAND_defconfig
@@ -29,6 +29,8 @@ CONFIG_BOARD_EARLY_INIT_R=y
 CONFIG_ID_EEPROM=y
 # CONFIG_SPL_FRAMEWORK is not set
 CONFIG_SPL_NAND_BOOT=y
+CONFIG_SPL_INIT_MINIMAL=y
+CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_SPL_NAND_SUPPORT=y
 CONFIG_TPL=y
 CONFIG_TPL_DRIVERS_MISC=y
diff --git a/configs/P1010RDB-PB_NOR_defconfig b/configs/P1010RDB-PB_NOR_defconfig
index 4824169b4811..b2a3587171d6 100644
--- a/configs/P1010RDB-PB_NOR_defconfig
+++ b/configs/P1010RDB-PB_NOR_defconfig
@@ -20,6 +20,7 @@ CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_BOARD_EARLY_INIT_R=y
 CONFIG_ID_EEPROM=y
+CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PBSIZE=276
 CONFIG_CMD_IMLS=y
diff --git a/configs/P1010RDB-PB_SDCARD_defconfig b/configs/P1010RDB-PB_SDCARD_defconfig
index f40cc9fcbec9..0b547456a1a7 100644
--- a/configs/P1010RDB-PB_SDCARD_defconfig
+++ b/configs/P1010RDB-PB_SDCARD_defconfig
@@ -27,6 +27,7 @@ CONFIG_BOARD_EARLY_INIT_R=y
 CONFIG_ID_EEPROM=y
 # CONFIG_SPL_FRAMEWORK is not set
 CONFIG_SPL_MMC_BOOT=y
+CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_I2C=y
 CONFIG_SPL_MPC8XXX_INIT_DDR=y
diff --git a/configs/P1010RDB-PB_SPIFLASH_defconfig b/configs/P1010RDB-PB_SPIFLASH_defconfig
index f371661e5538..c92036e9d952 100644
--- a/configs/P1010RDB-PB_SPIFLASH_defconfig
+++ b/configs/P1010RDB-PB_SPIFLASH_defconfig
@@ -30,6 +30,7 @@ CONFIG_BOARD_EARLY_INIT_R=y
 CONFIG_ID_EEPROM=y
 # CONFIG_SPL_FRAMEWORK is not set
 CONFIG_SPL_SPI_BOOT=y
+CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_I2C=y
 CONFIG_SPL_MPC8XXX_INIT_DDR=y
diff --git a/configs/P1020RDB-PC_36BIT_NAND_defconfig b/configs/P1020RDB-PC_36BIT_NAND_defconfig
index fd68dc70bab4..f5892e98bf72 100644
--- a/configs/P1020RDB-PC_36BIT_NAND_defconfig
+++ b/configs/P1020RDB-PC_36BIT_NAND_defconfig
@@ -30,6 +30,8 @@ CONFIG_BOARD_EARLY_INIT_R=y
 # CONFIG_MISC_INIT_R is not set
 # CONFIG_SPL_FRAMEWORK is not set
 CONFIG_SPL_NAND_BOOT=y
+CONFIG_SPL_INIT_MINIMAL=y
+CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_SPL_NAND_SUPPORT=y
 CONFIG_TPL=y
 CONFIG_TPL_ENV_SUPPORT=y
diff --git a/configs/P1020RDB-PC_36BIT_SDCARD_defconfig b/configs/P1020RDB-PC_36BIT_SDCARD_defconfig
index fb0855527597..deaeb0a4e1b9 100644
--- a/configs/P1020RDB-PC_36BIT_SDCARD_defconfig
+++ b/configs/P1020RDB-PC_36BIT_SDCARD_defconfig
@@ -29,6 +29,7 @@ CONFIG_BOARD_EARLY_INIT_R=y
 # CONFIG_MISC_INIT_R is not set
 # CONFIG_SPL_FRAMEWORK is not set
 CONFIG_SPL_MMC_BOOT=y
+CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_I2C=y
 CONFIG_SPL_MPC8XXX_INIT_DDR=y
diff --git a/configs/P1020RDB-PC_36BIT_SPIFLASH_defconfig b/configs/P1020RDB-PC_36BIT_SPIFLASH_defconfig
index 62ea0fe32897..4dffe7e5b34c 100644
--- a/configs/P1020RDB-PC_36BIT_SPIFLASH_defconfig
+++ b/configs/P1020RDB-PC_36BIT_SPIFLASH_defconfig
@@ -32,6 +32,7 @@ CONFIG_BOARD_EARLY_INIT_R=y
 # CONFIG_MISC_INIT_R is not set
 # CONFIG_SPL_FRAMEWORK is not set
 CONFIG_SPL_SPI_BOOT=y
+CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_I2C=y
 CONFIG_SPL_MPC8XXX_INIT_DDR=y
diff --git a/configs/P1020RDB-PC_36BIT_defconfig b/configs/P1020RDB-PC_36BIT_defconfig
index 80108f3d210a..f127d8c92dce 100644
--- a/configs/P1020RDB-PC_36BIT_defconfig
+++ b/configs/P1020RDB-PC_36BIT_defconfig
@@ -22,6 +22,7 @@ CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/$bdev rw rootdelay=30 console=$con
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_BOARD_EARLY_INIT_R=y
 # CONFIG_MISC_INIT_R is not set
+CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_HUSH_PARSER=y
 # CONFIG_AUTO_COMPLETE is not set
 CONFIG_SYS_PBSIZE=276
diff --git a/configs/P1020RDB-PC_NAND_defconfig b/configs/P1020RDB-PC_NAND_defconfig
index 87d12d8fb004..ff27fd2a7bfb 100644
--- a/configs/P1020RDB-PC_NAND_defconfig
+++ b/configs/P1020RDB-PC_NAND_defconfig
@@ -29,6 +29,8 @@ CONFIG_BOARD_EARLY_INIT_R=y
 # CONFIG_MISC_INIT_R is not set
 # CONFIG_SPL_FRAMEWORK is not set
 CONFIG_SPL_NAND_BOOT=y
+CONFIG_SPL_INIT_MINIMAL=y
+CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_SPL_NAND_SUPPORT=y
 CONFIG_TPL=y
 CONFIG_TPL_ENV_SUPPORT=y
diff --git a/configs/P1020RDB-PC_SDCARD_defconfig b/configs/P1020RDB-PC_SDCARD_defconfig
index 7b03e9a30065..a2d16e31a7a5 100644
--- a/configs/P1020RDB-PC_SDCARD_defconfig
+++ b/configs/P1020RDB-PC_SDCARD_defconfig
@@ -28,6 +28,7 @@ CONFIG_BOARD_EARLY_INIT_R=y
 # CONFIG_MISC_INIT_R is not set
 # CONFIG_SPL_FRAMEWORK is not set
 CONFIG_SPL_MMC_BOOT=y
+CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_I2C=y
 CONFIG_SPL_MPC8XXX_INIT_DDR=y
diff --git a/configs/P1020RDB-PC_SPIFLASH_defconfig b/configs/P1020RDB-PC_SPIFLASH_defconfig
index 600691517c20..7cd087e01ce5 100644
--- a/configs/P1020RDB-PC_SPIFLASH_defconfig
+++ b/configs/P1020RDB-PC_SPIFLASH_defconfig
@@ -31,6 +31,7 @@ CONFIG_BOARD_EARLY_INIT_R=y
 # CONFIG_MISC_INIT_R is not set
 # CONFIG_SPL_FRAMEWORK is not set
 CONFIG_SPL_SPI_BOOT=y
+CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_I2C=y
 CONFIG_SPL_MPC8XXX_INIT_DDR=y
diff --git a/configs/P1020RDB-PC_defconfig b/configs/P1020RDB-PC_defconfig
index 2cde204313fb..069a35f3df81 100644
--- a/configs/P1020RDB-PC_defconfig
+++ b/configs/P1020RDB-PC_defconfig
@@ -21,6 +21,7 @@ CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/$bdev rw rootdelay=30 console=$con
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_BOARD_EARLY_INIT_R=y
 # CONFIG_MISC_INIT_R is not set
+CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_HUSH_PARSER=y
 # CONFIG_AUTO_COMPLETE is not set
 CONFIG_SYS_PBSIZE=276
diff --git a/configs/P1020RDB-PD_NAND_defconfig b/configs/P1020RDB-PD_NAND_defconfig
index 3898e20d188c..9b8793298edd 100644
--- a/configs/P1020RDB-PD_NAND_defconfig
+++ b/configs/P1020RDB-PD_NAND_defconfig
@@ -29,6 +29,8 @@ CONFIG_BOARD_EARLY_INIT_R=y
 # CONFIG_MISC_INIT_R is not set
 # CONFIG_SPL_FRAMEWORK is not set
 CONFIG_SPL_NAND_BOOT=y
+CONFIG_SPL_INIT_MINIMAL=y
+CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_SPL_NAND_SUPPORT=y
 CONFIG_TPL=y
 CONFIG_TPL_ENV_SUPPORT=y
diff --git a/configs/P1020RDB-PD_SDCARD_defconfig b/configs/P1020RDB-PD_SDCARD_defconfig
index 345a85521cd4..f7acd3996ce0 100644
--- a/configs/P1020RDB-PD_SDCARD_defconfig
+++ b/configs/P1020RDB-PD_SDCARD_defconfig
@@ -28,6 +28,7 @@ CONFIG_BOARD_EARLY_INIT_R=y
 # CONFIG_MISC_INIT_R is not set
 # CONFIG_SPL_FRAMEWORK is not set
 CONFIG_SPL_MMC_BOOT=y
+CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_I2C=y
 CONFIG_SPL_MPC8XXX_INIT_DDR=y
diff --git a/configs/P1020RDB-PD_SPIFLASH_defconfig b/configs/P1020RDB-PD_SPIFLASH_defconfig
index ac7ee81d6d5d..daed834c0fc0 100644
--- a/configs/P1020RDB-PD_SPIFLASH_defconfig
+++ b/configs/P1020RDB-PD_SPIFLASH_defconfig
@@ -31,6 +31,7 @@ CONFIG_BOARD_EARLY_INIT_R=y
 # CONFIG_MISC_INIT_R is not set
 # CONFIG_SPL_FRAMEWORK is not set
 CONFIG_SPL_SPI_BOOT=y
+CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_I2C=y
 CONFIG_SPL_MPC8XXX_INIT_DDR=y
diff --git a/configs/P1020RDB-PD_defconfig b/configs/P1020RDB-PD_defconfig
index f1c8c7179cc3..ccb1e30b4ec1 100644
--- a/configs/P1020RDB-PD_defconfig
+++ b/configs/P1020RDB-PD_defconfig
@@ -21,6 +21,7 @@ CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/$bdev rw rootdelay=30 console=$con
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_BOARD_EARLY_INIT_R=y
 # CONFIG_MISC_INIT_R is not set
+CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_HUSH_PARSER=y
 # CONFIG_AUTO_COMPLETE is not set
 CONFIG_SYS_PBSIZE=276
diff --git a/configs/P2020RDB-PC_36BIT_NAND_defconfig b/configs/P2020RDB-PC_36BIT_NAND_defconfig
index a2e0e9f7de8b..d6f3fb242223 100644
--- a/configs/P2020RDB-PC_36BIT_NAND_defconfig
+++ b/configs/P2020RDB-PC_36BIT_NAND_defconfig
@@ -30,6 +30,8 @@ CONFIG_BOARD_EARLY_INIT_R=y
 # CONFIG_MISC_INIT_R is not set
 # CONFIG_SPL_FRAMEWORK is not set
 CONFIG_SPL_NAND_BOOT=y
+CONFIG_SPL_INIT_MINIMAL=y
+CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_SPL_NAND_SUPPORT=y
 CONFIG_TPL=y
 CONFIG_TPL_ENV_SUPPORT=y
diff --git a/configs/P2020RDB-PC_36BIT_SDCARD_defconfig b/configs/P2020RDB-PC_36BIT_SDCARD_defconfig
index 092681c1d83c..50bf852203c1 100644
--- a/configs/P2020RDB-PC_36BIT_SDCARD_defconfig
+++ b/configs/P2020RDB-PC_36BIT_SDCARD_defconfig
@@ -29,6 +29,7 @@ CONFIG_BOARD_EARLY_INIT_R=y
 # CONFIG_MISC_INIT_R is not set
 # CONFIG_SPL_FRAMEWORK is not set
 CONFIG_SPL_MMC_BOOT=y
+CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_I2C=y
 CONFIG_SPL_MPC8XXX_INIT_DDR=y
diff --git a/configs/P2020RDB-PC_36BIT_SPIFLASH_defconfig b/configs/P2020RDB-PC_36BIT_SPIFLASH_defconfig
index f505a7a50872..a99f46a88011 100644
--- a/configs/P2020RDB-PC_36BIT_SPIFLASH_defconfig
+++ b/configs/P2020RDB-PC_36BIT_SPIFLASH_defconfig
@@ -32,6 +32,7 @@ CONFIG_BOARD_EARLY_INIT_R=y
 # CONFIG_MISC_INIT_R is not set
 # CONFIG_SPL_FRAMEWORK is not set
 CONFIG_SPL_SPI_BOOT=y
+CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_I2C=y
 CONFIG_SPL_MPC8XXX_INIT_DDR=y
diff --git a/configs/P2020RDB-PC_36BIT_defconfig b/configs/P2020RDB-PC_36BIT_defconfig
index bf998dacf99a..cbae767fceb6 100644
--- a/configs/P2020RDB-PC_36BIT_defconfig
+++ b/configs/P2020RDB-PC_36BIT_defconfig
@@ -22,6 +22,7 @@ CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/$bdev rw rootdelay=30 console=$con
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_BOARD_EARLY_INIT_R=y
 # CONFIG_MISC_INIT_R is not set
+CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_HUSH_PARSER=y
 # CONFIG_AUTO_COMPLETE is not set
 CONFIG_SYS_PBSIZE=276
diff --git a/configs/P2020RDB-PC_NAND_defconfig b/configs/P2020RDB-PC_NAND_defconfig
index b45e23f32c17..1031ebe4628f 100644
--- a/configs/P2020RDB-PC_NAND_defconfig
+++ b/configs/P2020RDB-PC_NAND_defconfig
@@ -29,6 +29,8 @@ CONFIG_BOARD_EARLY_INIT_R=y
 # CONFIG_MISC_INIT_R is not set
 # CONFIG_SPL_FRAMEWORK is not set
 CONFIG_SPL_NAND_BOOT=y
+CONFIG_SPL_INIT_MINIMAL=y
+CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_SPL_NAND_SUPPORT=y
 CONFIG_TPL=y
 CONFIG_TPL_ENV_SUPPORT=y
diff --git a/configs/P2020RDB-PC_SDCARD_defconfig b/configs/P2020RDB-PC_SDCARD_defconfig
index 5e152d6b36b2..6c757c2a69e4 100644
--- a/configs/P2020RDB-PC_SDCARD_defconfig
+++ b/configs/P2020RDB-PC_SDCARD_defconfig
@@ -28,6 +28,7 @@ CONFIG_BOARD_EARLY_INIT_R=y
 # CONFIG_MISC_INIT_R is not set
 # CONFIG_SPL_FRAMEWORK is not set
 CONFIG_SPL_MMC_BOOT=y
+CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_I2C=y
 CONFIG_SPL_MPC8XXX_INIT_DDR=y
diff --git a/configs/P2020RDB-PC_SPIFLASH_defconfig b/configs/P2020RDB-PC_SPIFLASH_defconfig
index 75f16593fb7c..91ca330b119f 100644
--- a/configs/P2020RDB-PC_SPIFLASH_defconfig
+++ b/configs/P2020RDB-PC_SPIFLASH_defconfig
@@ -31,6 +31,7 @@ CONFIG_BOARD_EARLY_INIT_R=y
 # CONFIG_MISC_INIT_R is not set
 # CONFIG_SPL_FRAMEWORK is not set
 CONFIG_SPL_SPI_BOOT=y
+CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_I2C=y
 CONFIG_SPL_MPC8XXX_INIT_DDR=y
diff --git a/configs/P2020RDB-PC_defconfig b/configs/P2020RDB-PC_defconfig
index b68777dfa4cd..f33b69d97d7e 100644
--- a/configs/P2020RDB-PC_defconfig
+++ b/configs/P2020RDB-PC_defconfig
@@ -21,6 +21,7 @@ CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/$bdev rw rootdelay=30 console=$con
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_BOARD_EARLY_INIT_R=y
 # CONFIG_MISC_INIT_R is not set
+CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_HUSH_PARSER=y
 # CONFIG_AUTO_COMPLETE is not set
 CONFIG_SYS_PBSIZE=276
diff --git a/configs/T1024RDB_NAND_defconfig b/configs/T1024RDB_NAND_defconfig
index dc2b7b3f61bb..218985606d1d 100644
--- a/configs/T1024RDB_NAND_defconfig
+++ b/configs/T1024RDB_NAND_defconfig
@@ -34,6 +34,8 @@ CONFIG_ID_EEPROM=y
 # CONFIG_SPL_FRAMEWORK is not set
 CONFIG_SPL_NAND_BOOT=y
 CONFIG_SPL_FSL_PBL=y
+CONFIG_SPL_FLUSH_IMAGE=y
+CONFIG_SPL_SKIP_RELOCATE=y
 CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_I2C=y
 CONFIG_SPL_MPC8XXX_INIT_DDR=y
diff --git a/configs/T1024RDB_SDCARD_defconfig b/configs/T1024RDB_SDCARD_defconfig
index 9a3e19a98f89..d0b7f7174e02 100644
--- a/configs/T1024RDB_SDCARD_defconfig
+++ b/configs/T1024RDB_SDCARD_defconfig
@@ -35,6 +35,8 @@ CONFIG_ID_EEPROM=y
 # CONFIG_SPL_FRAMEWORK is not set
 CONFIG_SPL_MMC_BOOT=y
 CONFIG_SPL_FSL_PBL=y
+CONFIG_SPL_FLUSH_IMAGE=y
+CONFIG_SPL_SKIP_RELOCATE=y
 CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_I2C=y
 CONFIG_SPL_MPC8XXX_INIT_DDR=y
diff --git a/configs/T1024RDB_SPIFLASH_defconfig b/configs/T1024RDB_SPIFLASH_defconfig
index 2381a0d30e95..fce2aac36b2c 100644
--- a/configs/T1024RDB_SPIFLASH_defconfig
+++ b/configs/T1024RDB_SPIFLASH_defconfig
@@ -38,6 +38,8 @@ CONFIG_ID_EEPROM=y
 # CONFIG_SPL_FRAMEWORK is not set
 CONFIG_SPL_SPI_BOOT=y
 CONFIG_SPL_FSL_PBL=y
+CONFIG_SPL_FLUSH_IMAGE=y
+CONFIG_SPL_SKIP_RELOCATE=y
 CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_I2C=y
 CONFIG_SPL_MPC8XXX_INIT_DDR=y
diff --git a/configs/T1042D4RDB_NAND_defconfig b/configs/T1042D4RDB_NAND_defconfig
index e221dd059222..7c0e35b67b49 100644
--- a/configs/T1042D4RDB_NAND_defconfig
+++ b/configs/T1042D4RDB_NAND_defconfig
@@ -30,6 +30,8 @@ CONFIG_BOARD_EARLY_INIT_R=y
 # CONFIG_SPL_FRAMEWORK is not set
 CONFIG_SPL_NAND_BOOT=y
 CONFIG_SPL_FSL_PBL=y
+CONFIG_SPL_FLUSH_IMAGE=y
+CONFIG_SPL_SKIP_RELOCATE=y
 CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_I2C=y
 CONFIG_SPL_MPC8XXX_INIT_DDR=y
diff --git a/configs/T1042D4RDB_SDCARD_defconfig b/configs/T1042D4RDB_SDCARD_defconfig
index 7a6c96c4ffd7..bd9d1aefc607 100644
--- a/configs/T1042D4RDB_SDCARD_defconfig
+++ b/configs/T1042D4RDB_SDCARD_defconfig
@@ -31,6 +31,8 @@ CONFIG_BOARD_EARLY_INIT_R=y
 # CONFIG_SPL_FRAMEWORK is not set
 CONFIG_SPL_MMC_BOOT=y
 CONFIG_SPL_FSL_PBL=y
+CONFIG_SPL_FLUSH_IMAGE=y
+CONFIG_SPL_SKIP_RELOCATE=y
 CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_I2C=y
 CONFIG_SPL_MPC8XXX_INIT_DDR=y
diff --git a/configs/T1042D4RDB_SPIFLASH_defconfig b/configs/T1042D4RDB_SPIFLASH_defconfig
index d39b9e07e201..21a7c18a29bf 100644
--- a/configs/T1042D4RDB_SPIFLASH_defconfig
+++ b/configs/T1042D4RDB_SPIFLASH_defconfig
@@ -34,6 +34,8 @@ CONFIG_BOARD_EARLY_INIT_R=y
 # CONFIG_SPL_FRAMEWORK is not set
 CONFIG_SPL_SPI_BOOT=y
 CONFIG_SPL_FSL_PBL=y
+CONFIG_SPL_FLUSH_IMAGE=y
+CONFIG_SPL_SKIP_RELOCATE=y
 CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_I2C=y
 CONFIG_SPL_MPC8XXX_INIT_DDR=y
diff --git a/configs/T2080QDS_NAND_defconfig b/configs/T2080QDS_NAND_defconfig
index ec54a71b016d..5b17526766aa 100644
--- a/configs/T2080QDS_NAND_defconfig
+++ b/configs/T2080QDS_NAND_defconfig
@@ -35,6 +35,8 @@ CONFIG_BOARD_EARLY_INIT_R=y
 # CONFIG_SPL_FRAMEWORK is not set
 CONFIG_SPL_NAND_BOOT=y
 CONFIG_SPL_FSL_PBL=y
+CONFIG_SPL_FLUSH_IMAGE=y
+CONFIG_SPL_SKIP_RELOCATE=y
 CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_I2C=y
 CONFIG_SPL_MPC8XXX_INIT_DDR=y
diff --git a/configs/T2080QDS_SDCARD_defconfig b/configs/T2080QDS_SDCARD_defconfig
index 0d57dade82d6..a3ec6bc5bc90 100644
--- a/configs/T2080QDS_SDCARD_defconfig
+++ b/configs/T2080QDS_SDCARD_defconfig
@@ -36,6 +36,8 @@ CONFIG_BOARD_EARLY_INIT_R=y
 # CONFIG_SPL_FRAMEWORK is not set
 CONFIG_SPL_MMC_BOOT=y
 CONFIG_SPL_FSL_PBL=y
+CONFIG_SPL_FLUSH_IMAGE=y
+CONFIG_SPL_SKIP_RELOCATE=y
 CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_I2C=y
 CONFIG_SPL_MPC8XXX_INIT_DDR=y
diff --git a/configs/T2080QDS_SPIFLASH_defconfig b/configs/T2080QDS_SPIFLASH_defconfig
index 3838e28f415d..956835167bd4 100644
--- a/configs/T2080QDS_SPIFLASH_defconfig
+++ b/configs/T2080QDS_SPIFLASH_defconfig
@@ -39,6 +39,8 @@ CONFIG_BOARD_EARLY_INIT_R=y
 # CONFIG_SPL_FRAMEWORK is not set
 CONFIG_SPL_SPI_BOOT=y
 CONFIG_SPL_FSL_PBL=y
+CONFIG_SPL_FLUSH_IMAGE=y
+CONFIG_SPL_SKIP_RELOCATE=y
 CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_I2C=y
 CONFIG_SPL_MPC8XXX_INIT_DDR=y
diff --git a/configs/T2080RDB_NAND_defconfig b/configs/T2080RDB_NAND_defconfig
index c6df1fc65732..8a6e6899c80f 100644
--- a/configs/T2080RDB_NAND_defconfig
+++ b/configs/T2080RDB_NAND_defconfig
@@ -33,6 +33,8 @@ CONFIG_BOARD_EARLY_INIT_R=y
 # CONFIG_SPL_FRAMEWORK is not set
 CONFIG_SPL_NAND_BOOT=y
 CONFIG_SPL_FSL_PBL=y
+CONFIG_SPL_FLUSH_IMAGE=y
+CONFIG_SPL_SKIP_RELOCATE=y
 CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_I2C=y
 CONFIG_SPL_MPC8XXX_INIT_DDR=y
diff --git a/configs/T2080RDB_SDCARD_defconfig b/configs/T2080RDB_SDCARD_defconfig
index 7fc6ec429ccc..beb714a7027d 100644
--- a/configs/T2080RDB_SDCARD_defconfig
+++ b/configs/T2080RDB_SDCARD_defconfig
@@ -34,6 +34,8 @@ CONFIG_BOARD_EARLY_INIT_R=y
 # CONFIG_SPL_FRAMEWORK is not set
 CONFIG_SPL_MMC_BOOT=y
 CONFIG_SPL_FSL_PBL=y
+CONFIG_SPL_FLUSH_IMAGE=y
+CONFIG_SPL_SKIP_RELOCATE=y
 CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_I2C=y
 CONFIG_SPL_MPC8XXX_INIT_DDR=y
diff --git a/configs/T2080RDB_SPIFLASH_defconfig b/configs/T2080RDB_SPIFLASH_defconfig
index ebc948c18a07..14fa9f6efde0 100644
--- a/configs/T2080RDB_SPIFLASH_defconfig
+++ b/configs/T2080RDB_SPIFLASH_defconfig
@@ -37,6 +37,8 @@ CONFIG_BOARD_EARLY_INIT_R=y
 # CONFIG_SPL_FRAMEWORK is not set
 CONFIG_SPL_SPI_BOOT=y
 CONFIG_SPL_FSL_PBL=y
+CONFIG_SPL_FLUSH_IMAGE=y
+CONFIG_SPL_SKIP_RELOCATE=y
 CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_I2C=y
 CONFIG_SPL_MPC8XXX_INIT_DDR=y
diff --git a/configs/T2080RDB_revD_NAND_defconfig b/configs/T2080RDB_revD_NAND_defconfig
index 03529ff0d8b2..3ba54841f2af 100644
--- a/configs/T2080RDB_revD_NAND_defconfig
+++ b/configs/T2080RDB_revD_NAND_defconfig
@@ -34,6 +34,8 @@ CONFIG_BOARD_EARLY_INIT_R=y
 # CONFIG_SPL_FRAMEWORK is not set
 CONFIG_SPL_NAND_BOOT=y
 CONFIG_SPL_FSL_PBL=y
+CONFIG_SPL_FLUSH_IMAGE=y
+CONFIG_SPL_SKIP_RELOCATE=y
 CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_I2C=y
 CONFIG_SPL_MPC8XXX_INIT_DDR=y
diff --git a/configs/T2080RDB_revD_SDCARD_defconfig b/configs/T2080RDB_revD_SDCARD_defconfig
index 35ce1edd6896..9afa79b0f714 100644
--- a/configs/T2080RDB_revD_SDCARD_defconfig
+++ b/configs/T2080RDB_revD_SDCARD_defconfig
@@ -35,6 +35,8 @@ CONFIG_BOARD_EARLY_INIT_R=y
 # CONFIG_SPL_FRAMEWORK is not set
 CONFIG_SPL_MMC_BOOT=y
 CONFIG_SPL_FSL_PBL=y
+CONFIG_SPL_FLUSH_IMAGE=y
+CONFIG_SPL_SKIP_RELOCATE=y
 CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_I2C=y
 CONFIG_SPL_MPC8XXX_INIT_DDR=y
diff --git a/configs/T2080RDB_revD_SPIFLASH_defconfig b/configs/T2080RDB_revD_SPIFLASH_defconfig
index 14ae4f0e961b..f86de3a6852c 100644
--- a/configs/T2080RDB_revD_SPIFLASH_defconfig
+++ b/configs/T2080RDB_revD_SPIFLASH_defconfig
@@ -38,6 +38,8 @@ CONFIG_BOARD_EARLY_INIT_R=y
 # CONFIG_SPL_FRAMEWORK is not set
 CONFIG_SPL_SPI_BOOT=y
 CONFIG_SPL_FSL_PBL=y
+CONFIG_SPL_FLUSH_IMAGE=y
+CONFIG_SPL_SKIP_RELOCATE=y
 CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_I2C=y
 CONFIG_SPL_MPC8XXX_INIT_DDR=y
diff --git a/configs/T4240RDB_SDCARD_defconfig b/configs/T4240RDB_SDCARD_defconfig
index 6d2708135851..fe5481ec7fc0 100644
--- a/configs/T4240RDB_SDCARD_defconfig
+++ b/configs/T4240RDB_SDCARD_defconfig
@@ -32,6 +32,8 @@ CONFIG_BOARD_EARLY_INIT_R=y
 # CONFIG_SPL_FRAMEWORK is not set
 CONFIG_SPL_MMC_BOOT=y
 CONFIG_SPL_FSL_PBL=y
+CONFIG_SPL_FLUSH_IMAGE=y
+CONFIG_SPL_SKIP_RELOCATE=y
 CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_I2C=y
 CONFIG_SPL_MPC8XXX_INIT_DDR=y
diff --git a/include/configs/P1010RDB.h b/include/configs/P1010RDB.h
index 0c4a2f01ad4a..8667941a0ab3 100644
--- a/include/configs/P1010RDB.h
+++ b/include/configs/P1010RDB.h
@@ -16,7 +16,6 @@
 #include <asm/config_mpc85xx.h>
 
 #ifdef CONFIG_SDCARD
-#define CONFIG_SPL_FLUSH_IMAGE
 #define CONFIG_SPL_TARGET		"u-boot-with-spl.bin"
 #define CONFIG_SPL_PAD_TO		0x18000
 #define CONFIG_SPL_MAX_SIZE		(96 * 1024)
@@ -36,7 +35,6 @@
 #define CONFIG_RESET_VECTOR_ADDRESS	0x110bfffc
 #else
 #define CONFIG_SPL_SPI_FLASH_MINIMAL
-#define CONFIG_SPL_FLUSH_IMAGE
 #define CONFIG_SPL_TARGET		"u-boot-with-spl.bin"
 #define CONFIG_SPL_PAD_TO			0x18000
 #define CONFIG_SPL_MAX_SIZE			(96 * 1024)
@@ -53,8 +51,6 @@
 
 #ifdef CONFIG_MTD_RAW_NAND
 #ifdef CONFIG_NXP_ESBC
-#define CONFIG_SPL_INIT_MINIMAL
-#define CONFIG_SPL_FLUSH_IMAGE
 #define CONFIG_SPL_TARGET		"u-boot-with-spl.bin"
 
 #define CONFIG_SPL_MAX_SIZE		8192
@@ -65,7 +61,6 @@
 #define CONFIG_SYS_NAND_U_BOOT_START	0x00200000
 #else
 #ifdef CONFIG_TPL_BUILD
-#define CONFIG_SPL_FLUSH_IMAGE
 #define CONFIG_SPL_NAND_INIT
 #define CONFIG_SPL_COMMON_INIT_DDR
 #define CONFIG_SPL_MAX_SIZE		(128 << 10)
@@ -74,8 +69,6 @@
 #define CONFIG_SYS_NAND_U_BOOT_DST	(0x11000000)
 #define CONFIG_SYS_NAND_U_BOOT_START	(0x11000000)
 #elif defined(CONFIG_SPL_BUILD)
-#define CONFIG_SPL_INIT_MINIMAL
-#define CONFIG_SPL_FLUSH_IMAGE
 #define CONFIG_SPL_MAX_SIZE		8192
 #define CONFIG_SYS_NAND_U_BOOT_SIZE	(128 << 10)
 #define CONFIG_SYS_NAND_U_BOOT_DST	0xD0000000
@@ -455,7 +448,7 @@ extern unsigned long get_sdram_size(void);
 #define CONFIG_SYS_NS16550_SERIAL
 #define CONFIG_SYS_NS16550_REG_SIZE	1
 #define CONFIG_SYS_NS16550_CLK		get_bus_freq(0)
-#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_INIT_MINIMAL)
+#if defined(CONFIG_SPL_BUILD) && CONFIG_IS_ENABLED(INIT_MINIMAL)
 #define CONFIG_NS16550_MIN_FUNCTIONS
 #endif
 
diff --git a/include/configs/T102xRDB.h b/include/configs/T102xRDB.h
index e7cc39e78a92..30570ad51198 100644
--- a/include/configs/T102xRDB.h
+++ b/include/configs/T102xRDB.h
@@ -21,13 +21,11 @@
 #define CONFIG_SYS_NUM_CPC		CONFIG_SYS_NUM_DDR_CTLRS
 
 #ifdef CONFIG_RAMBOOT_PBL
-#define CONFIG_SPL_FLUSH_IMAGE
 #define CONFIG_SPL_PAD_TO		0x40000
 #define CONFIG_SPL_MAX_SIZE		0x28000
 #define RESET_VECTOR_OFFSET		0x27FFC
 #define BOOT_PAGE_OFFSET		0x27000
 #ifdef CONFIG_SPL_BUILD
-#define CONFIG_SPL_SKIP_RELOCATE
 #define CONFIG_SPL_COMMON_INIT_DDR
 #define CONFIG_SYS_CCSR_DO_NOT_RELOCATE
 #endif
diff --git a/include/configs/T104xRDB.h b/include/configs/T104xRDB.h
index de31f695c601..2d9c8fcd175e 100644
--- a/include/configs/T104xRDB.h
+++ b/include/configs/T104xRDB.h
@@ -15,11 +15,9 @@
 #include <asm/config_mpc85xx.h>
 
 #ifdef CONFIG_RAMBOOT_PBL
-#define CONFIG_SPL_FLUSH_IMAGE
 #define CONFIG_SPL_PAD_TO		0x40000
 #define CONFIG_SPL_MAX_SIZE		0x28000
 #ifdef CONFIG_SPL_BUILD
-#define CONFIG_SPL_SKIP_RELOCATE
 #define CONFIG_SPL_COMMON_INIT_DDR
 #define CONFIG_SYS_CCSR_DO_NOT_RELOCATE
 #endif
diff --git a/include/configs/T208xQDS.h b/include/configs/T208xQDS.h
index 82e0fc46c7b6..1f546f4407c8 100644
--- a/include/configs/T208xQDS.h
+++ b/include/configs/T208xQDS.h
@@ -29,13 +29,11 @@
 #define CONFIG_SYS_NUM_CPC	CONFIG_SYS_NUM_DDR_CTLRS
 
 #ifdef CONFIG_RAMBOOT_PBL
-#define CONFIG_SPL_FLUSH_IMAGE
 #define CONFIG_SPL_PAD_TO		0x40000
 #define CONFIG_SPL_MAX_SIZE		0x28000
 #define RESET_VECTOR_OFFSET		0x27FFC
 #define BOOT_PAGE_OFFSET		0x27000
 #ifdef CONFIG_SPL_BUILD
-#define CONFIG_SPL_SKIP_RELOCATE
 #define CONFIG_SPL_COMMON_INIT_DDR
 #define CONFIG_SYS_CCSR_DO_NOT_RELOCATE
 #endif
diff --git a/include/configs/T208xRDB.h b/include/configs/T208xRDB.h
index 943854432535..1bd4b36eb8bf 100644
--- a/include/configs/T208xRDB.h
+++ b/include/configs/T208xRDB.h
@@ -24,13 +24,11 @@
 #define CONFIG_SYS_NUM_CPC	CONFIG_SYS_NUM_DDR_CTLRS
 
 #ifdef CONFIG_RAMBOOT_PBL
-#define CONFIG_SPL_FLUSH_IMAGE
 #define CONFIG_SPL_PAD_TO		0x40000
 #define CONFIG_SPL_MAX_SIZE		0x28000
 #define RESET_VECTOR_OFFSET		0x27FFC
 #define BOOT_PAGE_OFFSET		0x27000
 #ifdef CONFIG_SPL_BUILD
-#define CONFIG_SPL_SKIP_RELOCATE
 #define CONFIG_SPL_COMMON_INIT_DDR
 #define CONFIG_SYS_CCSR_DO_NOT_RELOCATE
 #endif
diff --git a/include/configs/T4240RDB.h b/include/configs/T4240RDB.h
index 834855c336c9..934f98ca3730 100644
--- a/include/configs/T4240RDB.h
+++ b/include/configs/T4240RDB.h
@@ -22,7 +22,6 @@
 #define CONFIG_RAMBOOT_TEXT_BASE        CONFIG_SYS_TEXT_BASE
 #define CONFIG_RESET_VECTOR_ADDRESS     0xfffffffc
 #else
-#define CONFIG_SPL_FLUSH_IMAGE
 #define CONFIG_SPL_PAD_TO		0x40000
 #define CONFIG_SPL_MAX_SIZE		0x28000
 #define RESET_VECTOR_OFFSET		0x27FFC
@@ -40,7 +39,6 @@
 #endif
 
 #ifdef CONFIG_SPL_BUILD
-#define CONFIG_SPL_SKIP_RELOCATE
 #define CONFIG_SPL_COMMON_INIT_DDR
 #define CONFIG_SYS_CCSR_DO_NOT_RELOCATE
 #endif
diff --git a/include/configs/p1_p2_rdb_pc.h b/include/configs/p1_p2_rdb_pc.h
index f6ecf2a7a8b8..d2c8d23c31c0 100644
--- a/include/configs/p1_p2_rdb_pc.h
+++ b/include/configs/p1_p2_rdb_pc.h
@@ -77,7 +77,6 @@
 #endif
 
 #ifdef CONFIG_SDCARD
-#define CONFIG_SPL_FLUSH_IMAGE
 #define CONFIG_SPL_TARGET		"u-boot-with-spl.bin"
 #define CONFIG_SPL_PAD_TO		0x20000
 #define CONFIG_SPL_MAX_SIZE		(128 * 1024)
@@ -91,7 +90,6 @@
 #endif
 #elif defined(CONFIG_SPIFLASH)
 #define CONFIG_SPL_SPI_FLASH_MINIMAL
-#define CONFIG_SPL_FLUSH_IMAGE
 #define CONFIG_SPL_TARGET		"u-boot-with-spl.bin"
 #define CONFIG_SPL_PAD_TO		0x20000
 #define CONFIG_SPL_MAX_SIZE		(128 * 1024)
@@ -105,7 +103,6 @@
 #endif
 #elif defined(CONFIG_MTD_RAW_NAND)
 #ifdef CONFIG_TPL_BUILD
-#define CONFIG_SPL_FLUSH_IMAGE
 #define CONFIG_SPL_NAND_INIT
 #define CONFIG_SPL_COMMON_INIT_DDR
 #define CONFIG_SPL_MAX_SIZE		(128 << 10)
@@ -114,8 +111,6 @@
 #define CONFIG_SYS_NAND_U_BOOT_DST	(0x11000000)
 #define CONFIG_SYS_NAND_U_BOOT_START	(0x11000000)
 #elif defined(CONFIG_SPL_BUILD)
-#define CONFIG_SPL_INIT_MINIMAL
-#define CONFIG_SPL_FLUSH_IMAGE
 #define CONFIG_SPL_TARGET		"u-boot-with-spl.bin"
 #define CONFIG_SPL_MAX_SIZE		4096
 #define CONFIG_SYS_NAND_U_BOOT_SIZE	(128 << 10)
@@ -402,7 +397,7 @@
 #define CONFIG_SYS_NS16550_SERIAL
 #define CONFIG_SYS_NS16550_REG_SIZE	1
 #define CONFIG_SYS_NS16550_CLK		get_bus_freq(0)
-#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_INIT_MINIMAL)
+#if defined(CONFIG_SPL_BUILD) && CONFIG_IS_ENABLED(INIT_MINIMAL)
 #define CONFIG_NS16550_MIN_FUNCTIONS
 #endif
 
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index a5e36698b1ff..e40f9fc06c02 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -571,12 +571,10 @@ CONFIG_SPL_BSS_START_ADDR
 CONFIG_SPL_CMT
 CONFIG_SPL_CMT_DEBUG
 CONFIG_SPL_COMMON_INIT_DDR
-CONFIG_SPL_FLUSH_IMAGE
 CONFIG_SPL_FS_LOAD_ARGS_NAME
 CONFIG_SPL_FS_LOAD_KERNEL_NAME
 CONFIG_SPL_FS_LOAD_PAYLOAD_NAME
 CONFIG_SPL_GD_ADDR
-CONFIG_SPL_INIT_MINIMAL
 CONFIG_SPL_MAX_FOOTPRINT
 CONFIG_SPL_MAX_SIZE
 CONFIG_SPL_NAND_INIT
@@ -591,7 +589,6 @@ CONFIG_SPL_RELOC_STACK
 CONFIG_SPL_RELOC_TEXT_BASE
 CONFIG_SPL_SATA_BOOT_DEVICE
 CONFIG_SPL_SIZE
-CONFIG_SPL_SKIP_RELOCATE
 CONFIG_SPL_SPI_FLASH_MINIMAL
 CONFIG_SPL_STACK
 CONFIG_SPL_STACK_ADDR
-- 
2.25.1



More information about the U-Boot mailing list