[PATCH 05/20] Convert CONFIG_SPL_RELOC_TEXT_BASE et al to Kconfig

Tom Rini trini at konsulko.com
Sun May 29 18:55:06 CEST 2022


This converts the following to Kconfig:
   CONFIG_SPL_RELOC_TEXT_BASE
   CONFIG_SPL_RELOC_STACK
   CONFIG_SPL_RELOC_MALLOC_ADDR
   CONFIG_SPL_RELOC_MALLOC_SIZE

Signed-off-by: Tom Rini <trini at konsulko.com>
---
 README                                       | 13 -----
 board/freescale/p1010rdb/spl.c               |  6 +-
 board/freescale/p1_p2_rdb_pc/spl.c           |  6 +-
 common/spl/Kconfig                           | 59 +++++++++++++++++++-
 configs/P1010RDB-PA_36BIT_NAND_defconfig     |  7 +++
 configs/P1010RDB-PA_36BIT_NOR_defconfig      |  1 -
 configs/P1010RDB-PA_36BIT_SDCARD_defconfig   |  5 ++
 configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig |  5 ++
 configs/P1010RDB-PA_NAND_defconfig           |  7 +++
 configs/P1010RDB-PA_NOR_defconfig            |  1 -
 configs/P1010RDB-PA_SDCARD_defconfig         |  5 ++
 configs/P1010RDB-PA_SPIFLASH_defconfig       |  5 ++
 configs/P1010RDB-PB_36BIT_NAND_defconfig     |  7 +++
 configs/P1010RDB-PB_36BIT_NOR_defconfig      |  1 -
 configs/P1010RDB-PB_36BIT_SDCARD_defconfig   |  5 ++
 configs/P1010RDB-PB_36BIT_SPIFLASH_defconfig |  5 ++
 configs/P1010RDB-PB_NAND_defconfig           |  7 +++
 configs/P1010RDB-PB_NOR_defconfig            |  1 -
 configs/P1010RDB-PB_SDCARD_defconfig         |  5 ++
 configs/P1010RDB-PB_SPIFLASH_defconfig       |  5 ++
 configs/P1020RDB-PC_36BIT_NAND_defconfig     |  7 +++
 configs/P1020RDB-PC_36BIT_SDCARD_defconfig   |  4 ++
 configs/P1020RDB-PC_36BIT_SPIFLASH_defconfig |  4 ++
 configs/P1020RDB-PC_36BIT_defconfig          |  1 -
 configs/P1020RDB-PC_NAND_defconfig           |  7 +++
 configs/P1020RDB-PC_SDCARD_defconfig         |  4 ++
 configs/P1020RDB-PC_SPIFLASH_defconfig       |  4 ++
 configs/P1020RDB-PC_defconfig                |  1 -
 configs/P1020RDB-PD_NAND_defconfig           |  7 +++
 configs/P1020RDB-PD_SDCARD_defconfig         |  4 ++
 configs/P1020RDB-PD_SPIFLASH_defconfig       |  4 ++
 configs/P1020RDB-PD_defconfig                |  1 -
 configs/P2020RDB-PC_36BIT_NAND_defconfig     |  7 +++
 configs/P2020RDB-PC_36BIT_SDCARD_defconfig   |  4 ++
 configs/P2020RDB-PC_36BIT_SPIFLASH_defconfig |  4 ++
 configs/P2020RDB-PC_36BIT_defconfig          |  1 -
 configs/P2020RDB-PC_NAND_defconfig           |  7 +++
 configs/P2020RDB-PC_SDCARD_defconfig         |  4 ++
 configs/P2020RDB-PC_SPIFLASH_defconfig       |  4 ++
 configs/P2020RDB-PC_defconfig                |  1 -
 configs/T1024RDB_NAND_defconfig              |  4 ++
 configs/T1024RDB_SDCARD_defconfig            |  4 ++
 configs/T1024RDB_SPIFLASH_defconfig          |  4 ++
 configs/T1042D4RDB_NAND_defconfig            |  4 ++
 configs/T1042D4RDB_SDCARD_defconfig          |  4 ++
 configs/T1042D4RDB_SPIFLASH_defconfig        |  4 ++
 configs/T2080QDS_NAND_defconfig              |  4 ++
 configs/T2080QDS_SDCARD_defconfig            |  4 ++
 configs/T2080QDS_SPIFLASH_defconfig          |  4 ++
 configs/T2080RDB_NAND_defconfig              |  4 ++
 configs/T2080RDB_SDCARD_defconfig            |  4 ++
 configs/T2080RDB_SPIFLASH_defconfig          |  4 ++
 configs/T2080RDB_revD_NAND_defconfig         |  4 ++
 configs/T2080RDB_revD_SDCARD_defconfig       |  4 ++
 configs/T2080RDB_revD_SPIFLASH_defconfig     |  4 ++
 configs/T4240RDB_SDCARD_defconfig            |  4 ++
 include/configs/P1010RDB.h                   | 12 ----
 include/configs/T102xRDB.h                   |  3 -
 include/configs/T104xRDB.h                   |  3 -
 include/configs/T208xQDS.h                   |  3 -
 include/configs/T208xRDB.h                   |  3 -
 include/configs/T4240RDB.h                   |  3 -
 include/configs/p1_p2_rdb_pc.h               | 14 -----
 63 files changed, 270 insertions(+), 71 deletions(-)

diff --git a/README b/README
index 360d357bfbc1..7b4067f8f249 100644
--- a/README
+++ b/README
@@ -1625,10 +1625,6 @@ The following options need to be configured:
 		CONFIG_SPL
 		Enable building of SPL globally.
 
-		CONFIG_SPL_RELOC_TEXT_BASE
-		Address to relocate to.  If unspecified, this is equal to
-		CONFIG_SPL_TEXT_BASE (i.e. no relocation is done).
-
 		CONFIG_SPL_BSS_START_ADDR
 		Link address for the BSS within the SPL binary.
 
@@ -1642,15 +1638,6 @@ The following options need to be configured:
 		consider that a completely unreadable NAND block is bad,
 		and thus should be skipped silently.
 
-		CONFIG_SPL_RELOC_STACK
-		Adress of the start of the stack SPL will use after
-		relocation.  If unspecified, this is equal to
-		CONFIG_SYS_SPL_MALLOC_START
-		Starting address of the malloc pool used in SPL.
-		When this option is set the full malloc is used in SPL and
-		it is set up by spl_init() and before that, the simple malloc()
-		can be used if CONFIG_SYS_MALLOC_F is defined.
-
 		CONFIG_SYS_SPL_MALLOC_SIZE
 		The size of the malloc pool used in SPL.
 
diff --git a/board/freescale/p1010rdb/spl.c b/board/freescale/p1010rdb/spl.c
index 7eaa2047facb..a78a9143a01d 100644
--- a/board/freescale/p1010rdb/spl.c
+++ b/board/freescale/p1010rdb/spl.c
@@ -57,7 +57,7 @@ void board_init_f(ulong bootflag)
 	/* NOTE - code has to be copied out of NAND buffer before
 	 * other blocks can be read.
 	*/
-	relocate_code(CONFIG_SPL_RELOC_STACK, 0, CONFIG_SPL_RELOC_TEXT_BASE);
+	relocate_code(CONFIG_VAL(RELOC_STACK), 0, CONFIG_SPL_RELOC_TEXT_BASE);
 }
 
 void board_init_r(gd_t *gd, ulong dest_addr)
@@ -73,8 +73,8 @@ void board_init_r(gd_t *gd, ulong dest_addr)
 
 	arch_cpu_init();
 	get_clocks();
-	mem_malloc_init(CONFIG_SPL_RELOC_MALLOC_ADDR,
-			CONFIG_SPL_RELOC_MALLOC_SIZE);
+	mem_malloc_init(CONFIG_VAL(RELOC_MALLOC_ADDR),
+			CONFIG_VAL(RELOC_MALLOC_SIZE));
 	gd->flags |= GD_FLG_FULL_MALLOC_INIT;
 
 #ifndef CONFIG_SPL_NAND_BOOT
diff --git a/board/freescale/p1_p2_rdb_pc/spl.c b/board/freescale/p1_p2_rdb_pc/spl.c
index 22156f2824ec..580972d800a7 100644
--- a/board/freescale/p1_p2_rdb_pc/spl.c
+++ b/board/freescale/p1_p2_rdb_pc/spl.c
@@ -63,7 +63,7 @@ void board_init_f(ulong bootflag)
 	/* NOTE - code has to be copied out of NAND buffer before
 	 * other blocks can be read.
 	 */
-	relocate_code(CONFIG_SPL_RELOC_STACK, 0, CONFIG_SPL_RELOC_TEXT_BASE);
+	relocate_code(CONFIG_VAL(RELOC_STACK), 0, CONFIG_SPL_RELOC_TEXT_BASE);
 }
 
 void board_init_r(gd_t *gd, ulong dest_addr)
@@ -79,8 +79,8 @@ void board_init_r(gd_t *gd, ulong dest_addr)
 
 	arch_cpu_init();
 	get_clocks();
-	mem_malloc_init(CONFIG_SPL_RELOC_MALLOC_ADDR,
-			CONFIG_SPL_RELOC_MALLOC_SIZE);
+	mem_malloc_init(CONFIG_VAL(RELOC_MALLOC_ADDR),
+			CONFIG_VAL(RELOC_MALLOC_SIZE));
 	gd->flags |= GD_FLG_FULL_MALLOC_INIT;
 
 #ifdef CONFIG_SPL_ENV_SUPPORT
diff --git a/common/spl/Kconfig b/common/spl/Kconfig
index 8f3985d612f9..304fd0e697cf 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -219,8 +219,8 @@ config TPL_SYS_CCSR_DO_NOT_RELOCATE
 
 endmenu
 
-menu "PowerPC SPL specific options"
-	depends on PPC && (SUPPORT_SPL && !SPL_FRAMEWORK)
+menu "PowerPC SPL / TPL specific options"
+	depends on PPC && (SPL && !SPL_FRAMEWORK)
 
 config SPL_INIT_MINIMAL
 	bool "Arch init code will be built for a very small image"
@@ -231,6 +231,61 @@ config SPL_FLUSH_IMAGE
 config SPL_SKIP_RELOCATE
 	bool "Skip relocating SPL"
 
+config SPL_RELOC_TEXT_BASE
+	hex "Address to relocate SPL to"
+	default SPL_TEXT_BASE
+	help
+	  If unspecified, this is equal to CONFIG_SPL_TEXT_BASE (i.e. no
+	  relocation is done).
+
+config SPL_RELOC_STACK
+	hex "Address of the start of the stack SPL will use after relocation."
+	help
+	  If unspecified, this is equal to CONFIG_SYS_SPL_MALLOC_START.  Starting
+	  address of the malloc pool used in SPL.  When this option is set the full
+	  malloc is used in SPL and it is set up by spl_init() and before that, the
+	  simple malloc() can be used if CONFIG_SYS_MALLOC_F is defined.
+
+config SPL_RELOC_MALLOC
+	bool "SPL has malloc pool after relocation"
+
+config SPL_RELOC_MALLOC_ADDR
+	hex "Address of malloc pool in SPL"
+	depends on SPL_RELOC_MALLOC
+
+config SPL_RELOC_MALLOC_SIZE
+	hex "Size of malloc pool in SPL"
+	depends on SPL_RELOC_MALLOC
+
+config TPL_RELOC_TEXT_BASE
+	hex "Address to relocate TPL to"
+	depends on TPL
+	default TPL_TEXT_BASE
+	help
+	  If unspecified, this is equal to CONFIG_TPL_TEXT_BASE (i.e. no
+	  relocation is done).
+
+config TPL_RELOC_STACK
+	hex "Address of the start of the stack TPL will use after relocation."
+	depends on TPL
+	help
+	  If unspecified, this is equal to CONFIG_SYS_TPL_MALLOC_START.  Starting
+	  address of the malloc pool used in TPL.  When this option is set the full
+	  malloc is used in TPL and it is set up by spl_init() and before that, the
+	  simple malloc() can be used if CONFIG_SYS_MALLOC_F is defined.
+
+config TPL_RELOC_MALLOC
+	bool "TPL has malloc pool after relocation"
+	depends on TPL
+
+config TPL_RELOC_MALLOC_ADDR
+	hex "Address of malloc pool in TPL"
+	depends on TPL_RELOC_MALLOC
+
+config TPL_RELOC_MALLOC_SIZE
+	hex "Size of malloc pool in TPL"
+	depends on TPL_RELOC_MALLOC
+
 endmenu
 
 config HANDOFF
diff --git a/configs/P1010RDB-PA_36BIT_NAND_defconfig b/configs/P1010RDB-PA_36BIT_NAND_defconfig
index f6426f0c171c..22b43801a776 100644
--- a/configs/P1010RDB-PA_36BIT_NAND_defconfig
+++ b/configs/P1010RDB-PA_36BIT_NAND_defconfig
@@ -33,6 +33,13 @@ CONFIG_SPL_NAND_BOOT=y
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
 CONFIG_SPL_INIT_MINIMAL=y
 CONFIG_SPL_FLUSH_IMAGE=y
+CONFIG_SPL_RELOC_TEXT_BASE=0xd003d000
+CONFIG_SPL_RELOC_STACK=0xd003fff0
+CONFIG_TPL_RELOC_TEXT_BASE=0xd0001000
+CONFIG_TPL_RELOC_STACK=0xd0030000
+CONFIG_TPL_RELOC_MALLOC=y
+CONFIG_TPL_RELOC_MALLOC_ADDR=0xd0034000
+CONFIG_TPL_RELOC_MALLOC_SIZE=0xc000
 CONFIG_SPL_NAND_SUPPORT=y
 CONFIG_TPL=y
 CONFIG_TPL_MAX_SIZE=0x20000
diff --git a/configs/P1010RDB-PA_36BIT_NOR_defconfig b/configs/P1010RDB-PA_36BIT_NOR_defconfig
index eb026fcb4b5f..934135ceccd3 100644
--- a/configs/P1010RDB-PA_36BIT_NOR_defconfig
+++ b/configs/P1010RDB-PA_36BIT_NOR_defconfig
@@ -22,7 +22,6 @@ CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_BOARD_EARLY_INIT_R=y
 CONFIG_SPL_MAX_SIZE=0x18000
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=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 57ad4b4485a3..7406cb29b03f 100644
--- a/configs/P1010RDB-PA_36BIT_SDCARD_defconfig
+++ b/configs/P1010RDB-PA_36BIT_SDCARD_defconfig
@@ -30,6 +30,11 @@ CONFIG_SPL_MAX_SIZE=0x18000
 CONFIG_SPL_MMC_BOOT=y
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
 CONFIG_SPL_FLUSH_IMAGE=y
+CONFIG_SPL_RELOC_TEXT_BASE=0xd0001000
+CONFIG_SPL_RELOC_STACK=0xd001c000
+CONFIG_SPL_RELOC_MALLOC=y
+CONFIG_SPL_RELOC_MALLOC_ADDR=0xd0020000
+CONFIG_SPL_RELOC_MALLOC_SIZE=0x20000
 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 ce5f1fd27628..41b2f2f58b17 100644
--- a/configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig
+++ b/configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig
@@ -33,6 +33,11 @@ CONFIG_SPL_MAX_SIZE=0x18000
 CONFIG_SPL_SPI_BOOT=y
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
 CONFIG_SPL_FLUSH_IMAGE=y
+CONFIG_SPL_RELOC_TEXT_BASE=0xd0001000
+CONFIG_SPL_RELOC_STACK=0xd001c000
+CONFIG_SPL_RELOC_MALLOC=y
+CONFIG_SPL_RELOC_MALLOC_ADDR=0xd0020000
+CONFIG_SPL_RELOC_MALLOC_SIZE=0x20000
 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 fca971bcf43f..993a1f8d54a1 100644
--- a/configs/P1010RDB-PA_NAND_defconfig
+++ b/configs/P1010RDB-PA_NAND_defconfig
@@ -32,6 +32,13 @@ CONFIG_SPL_NAND_BOOT=y
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
 CONFIG_SPL_INIT_MINIMAL=y
 CONFIG_SPL_FLUSH_IMAGE=y
+CONFIG_SPL_RELOC_TEXT_BASE=0xd003d000
+CONFIG_SPL_RELOC_STACK=0xd003fff0
+CONFIG_TPL_RELOC_TEXT_BASE=0xd0001000
+CONFIG_TPL_RELOC_STACK=0xd0030000
+CONFIG_TPL_RELOC_MALLOC=y
+CONFIG_TPL_RELOC_MALLOC_ADDR=0xd0034000
+CONFIG_TPL_RELOC_MALLOC_SIZE=0xc000
 CONFIG_SPL_NAND_SUPPORT=y
 CONFIG_TPL=y
 CONFIG_TPL_MAX_SIZE=0x20000
diff --git a/configs/P1010RDB-PA_NOR_defconfig b/configs/P1010RDB-PA_NOR_defconfig
index 6f1214d92282..24c54f0eaf29 100644
--- a/configs/P1010RDB-PA_NOR_defconfig
+++ b/configs/P1010RDB-PA_NOR_defconfig
@@ -21,7 +21,6 @@ CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_BOARD_EARLY_INIT_R=y
 CONFIG_SPL_MAX_SIZE=0x18000
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=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 44d3512db221..058c87d77b38 100644
--- a/configs/P1010RDB-PA_SDCARD_defconfig
+++ b/configs/P1010RDB-PA_SDCARD_defconfig
@@ -29,6 +29,11 @@ CONFIG_SPL_MAX_SIZE=0x18000
 CONFIG_SPL_MMC_BOOT=y
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
 CONFIG_SPL_FLUSH_IMAGE=y
+CONFIG_SPL_RELOC_TEXT_BASE=0xd0001000
+CONFIG_SPL_RELOC_STACK=0xd001c000
+CONFIG_SPL_RELOC_MALLOC=y
+CONFIG_SPL_RELOC_MALLOC_ADDR=0xd0020000
+CONFIG_SPL_RELOC_MALLOC_SIZE=0x20000
 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 5e6d0c234450..4c2d72605e22 100644
--- a/configs/P1010RDB-PA_SPIFLASH_defconfig
+++ b/configs/P1010RDB-PA_SPIFLASH_defconfig
@@ -32,6 +32,11 @@ CONFIG_SPL_MAX_SIZE=0x18000
 CONFIG_SPL_SPI_BOOT=y
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
 CONFIG_SPL_FLUSH_IMAGE=y
+CONFIG_SPL_RELOC_TEXT_BASE=0xd0001000
+CONFIG_SPL_RELOC_STACK=0xd001c000
+CONFIG_SPL_RELOC_MALLOC=y
+CONFIG_SPL_RELOC_MALLOC_ADDR=0xd0020000
+CONFIG_SPL_RELOC_MALLOC_SIZE=0x20000
 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 39391699499b..c38be8f14573 100644
--- a/configs/P1010RDB-PB_36BIT_NAND_defconfig
+++ b/configs/P1010RDB-PB_36BIT_NAND_defconfig
@@ -34,6 +34,13 @@ CONFIG_SPL_NAND_BOOT=y
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
 CONFIG_SPL_INIT_MINIMAL=y
 CONFIG_SPL_FLUSH_IMAGE=y
+CONFIG_SPL_RELOC_TEXT_BASE=0xd003d000
+CONFIG_SPL_RELOC_STACK=0xd003fff0
+CONFIG_TPL_RELOC_TEXT_BASE=0xd0001000
+CONFIG_TPL_RELOC_STACK=0xd0030000
+CONFIG_TPL_RELOC_MALLOC=y
+CONFIG_TPL_RELOC_MALLOC_ADDR=0xd0034000
+CONFIG_TPL_RELOC_MALLOC_SIZE=0xc000
 CONFIG_SPL_NAND_SUPPORT=y
 CONFIG_TPL=y
 CONFIG_TPL_MAX_SIZE=0x20000
diff --git a/configs/P1010RDB-PB_36BIT_NOR_defconfig b/configs/P1010RDB-PB_36BIT_NOR_defconfig
index fef75f261575..64a82ed4c6e2 100644
--- a/configs/P1010RDB-PB_36BIT_NOR_defconfig
+++ b/configs/P1010RDB-PB_36BIT_NOR_defconfig
@@ -23,7 +23,6 @@ CONFIG_BOARD_EARLY_INIT_R=y
 CONFIG_ID_EEPROM=y
 CONFIG_SPL_MAX_SIZE=0x18000
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=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 4e5e92d96700..9e788ab9bf3a 100644
--- a/configs/P1010RDB-PB_36BIT_SDCARD_defconfig
+++ b/configs/P1010RDB-PB_36BIT_SDCARD_defconfig
@@ -31,6 +31,11 @@ CONFIG_SPL_MAX_SIZE=0x18000
 CONFIG_SPL_MMC_BOOT=y
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
 CONFIG_SPL_FLUSH_IMAGE=y
+CONFIG_SPL_RELOC_TEXT_BASE=0xd0001000
+CONFIG_SPL_RELOC_STACK=0xd001c000
+CONFIG_SPL_RELOC_MALLOC=y
+CONFIG_SPL_RELOC_MALLOC_ADDR=0xd0020000
+CONFIG_SPL_RELOC_MALLOC_SIZE=0x20000
 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 f67961d83151..a762f07c489b 100644
--- a/configs/P1010RDB-PB_36BIT_SPIFLASH_defconfig
+++ b/configs/P1010RDB-PB_36BIT_SPIFLASH_defconfig
@@ -34,6 +34,11 @@ CONFIG_SPL_MAX_SIZE=0x18000
 CONFIG_SPL_SPI_BOOT=y
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
 CONFIG_SPL_FLUSH_IMAGE=y
+CONFIG_SPL_RELOC_TEXT_BASE=0xd0001000
+CONFIG_SPL_RELOC_STACK=0xd001c000
+CONFIG_SPL_RELOC_MALLOC=y
+CONFIG_SPL_RELOC_MALLOC_ADDR=0xd0020000
+CONFIG_SPL_RELOC_MALLOC_SIZE=0x20000
 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 da189ce8569f..18ba32f2d1e2 100644
--- a/configs/P1010RDB-PB_NAND_defconfig
+++ b/configs/P1010RDB-PB_NAND_defconfig
@@ -33,6 +33,13 @@ CONFIG_SPL_NAND_BOOT=y
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
 CONFIG_SPL_INIT_MINIMAL=y
 CONFIG_SPL_FLUSH_IMAGE=y
+CONFIG_SPL_RELOC_TEXT_BASE=0xd003d000
+CONFIG_SPL_RELOC_STACK=0xd003fff0
+CONFIG_TPL_RELOC_TEXT_BASE=0xd0001000
+CONFIG_TPL_RELOC_STACK=0xd0030000
+CONFIG_TPL_RELOC_MALLOC=y
+CONFIG_TPL_RELOC_MALLOC_ADDR=0xd0034000
+CONFIG_TPL_RELOC_MALLOC_SIZE=0xc000
 CONFIG_SPL_NAND_SUPPORT=y
 CONFIG_TPL=y
 CONFIG_TPL_MAX_SIZE=0x20000
diff --git a/configs/P1010RDB-PB_NOR_defconfig b/configs/P1010RDB-PB_NOR_defconfig
index 95727680c6fd..1b63bfdc7846 100644
--- a/configs/P1010RDB-PB_NOR_defconfig
+++ b/configs/P1010RDB-PB_NOR_defconfig
@@ -22,7 +22,6 @@ CONFIG_BOARD_EARLY_INIT_R=y
 CONFIG_ID_EEPROM=y
 CONFIG_SPL_MAX_SIZE=0x18000
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=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 b5d097add8f9..1d18f1282d11 100644
--- a/configs/P1010RDB-PB_SDCARD_defconfig
+++ b/configs/P1010RDB-PB_SDCARD_defconfig
@@ -30,6 +30,11 @@ CONFIG_SPL_MAX_SIZE=0x18000
 CONFIG_SPL_MMC_BOOT=y
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
 CONFIG_SPL_FLUSH_IMAGE=y
+CONFIG_SPL_RELOC_TEXT_BASE=0xd0001000
+CONFIG_SPL_RELOC_STACK=0xd001c000
+CONFIG_SPL_RELOC_MALLOC=y
+CONFIG_SPL_RELOC_MALLOC_ADDR=0xd0020000
+CONFIG_SPL_RELOC_MALLOC_SIZE=0x20000
 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 62d8e77745ce..1a36d6c5133f 100644
--- a/configs/P1010RDB-PB_SPIFLASH_defconfig
+++ b/configs/P1010RDB-PB_SPIFLASH_defconfig
@@ -33,6 +33,11 @@ CONFIG_SPL_MAX_SIZE=0x18000
 CONFIG_SPL_SPI_BOOT=y
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
 CONFIG_SPL_FLUSH_IMAGE=y
+CONFIG_SPL_RELOC_TEXT_BASE=0xd0001000
+CONFIG_SPL_RELOC_STACK=0xd001c000
+CONFIG_SPL_RELOC_MALLOC=y
+CONFIG_SPL_RELOC_MALLOC_ADDR=0xd0020000
+CONFIG_SPL_RELOC_MALLOC_SIZE=0x20000
 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 e9a7237a0805..54cd3d2b5ccb 100644
--- a/configs/P1020RDB-PC_36BIT_NAND_defconfig
+++ b/configs/P1020RDB-PC_36BIT_NAND_defconfig
@@ -34,6 +34,13 @@ CONFIG_SPL_NAND_BOOT=y
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
 CONFIG_SPL_INIT_MINIMAL=y
 CONFIG_SPL_FLUSH_IMAGE=y
+CONFIG_SPL_RELOC_TEXT_BASE=0xf8fbe000
+CONFIG_SPL_RELOC_STACK=0xf8fbfff0
+CONFIG_TPL_RELOC_TEXT_BASE=0xf8f81000
+CONFIG_TPL_RELOC_STACK=0xf8fb0000
+CONFIG_TPL_RELOC_MALLOC=y
+CONFIG_TPL_RELOC_MALLOC_ADDR=0xf8fb4000
+CONFIG_TPL_RELOC_MALLOC_SIZE=0xc000
 CONFIG_SPL_NAND_SUPPORT=y
 CONFIG_TPL=y
 CONFIG_TPL_MAX_SIZE=0x20000
diff --git a/configs/P1020RDB-PC_36BIT_SDCARD_defconfig b/configs/P1020RDB-PC_36BIT_SDCARD_defconfig
index 6c47be30b724..6a36f3ba9b27 100644
--- a/configs/P1020RDB-PC_36BIT_SDCARD_defconfig
+++ b/configs/P1020RDB-PC_36BIT_SDCARD_defconfig
@@ -32,6 +32,10 @@ CONFIG_SPL_MAX_SIZE=0x20000
 CONFIG_SPL_MMC_BOOT=y
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
 CONFIG_SPL_FLUSH_IMAGE=y
+CONFIG_SPL_RELOC_STACK=0xf8f9d000
+CONFIG_SPL_RELOC_MALLOC=y
+CONFIG_SPL_RELOC_MALLOC_ADDR=0xf8fa5000
+CONFIG_SPL_RELOC_MALLOC_SIZE=0x1b000
 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 3b2e7ce1118d..e246a2190d0c 100644
--- a/configs/P1020RDB-PC_36BIT_SPIFLASH_defconfig
+++ b/configs/P1020RDB-PC_36BIT_SPIFLASH_defconfig
@@ -35,6 +35,10 @@ CONFIG_SPL_MAX_SIZE=0x20000
 CONFIG_SPL_SPI_BOOT=y
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
 CONFIG_SPL_FLUSH_IMAGE=y
+CONFIG_SPL_RELOC_STACK=0xf8f9d000
+CONFIG_SPL_RELOC_MALLOC=y
+CONFIG_SPL_RELOC_MALLOC_ADDR=0xf8fa5000
+CONFIG_SPL_RELOC_MALLOC_SIZE=0x1b000
 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 9546fd137af5..7a0ddd958da5 100644
--- a/configs/P1020RDB-PC_36BIT_defconfig
+++ b/configs/P1020RDB-PC_36BIT_defconfig
@@ -24,7 +24,6 @@ CONFIG_BOARD_EARLY_INIT_R=y
 # CONFIG_MISC_INIT_R is not set
 CONFIG_SPL_MAX_SIZE=0x20000
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
-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 cf211c7f5d55..b49cdcb480dc 100644
--- a/configs/P1020RDB-PC_NAND_defconfig
+++ b/configs/P1020RDB-PC_NAND_defconfig
@@ -33,6 +33,13 @@ CONFIG_SPL_NAND_BOOT=y
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
 CONFIG_SPL_INIT_MINIMAL=y
 CONFIG_SPL_FLUSH_IMAGE=y
+CONFIG_SPL_RELOC_TEXT_BASE=0xf8fbe000
+CONFIG_SPL_RELOC_STACK=0xf8fbfff0
+CONFIG_TPL_RELOC_TEXT_BASE=0xf8f81000
+CONFIG_TPL_RELOC_STACK=0xf8fb0000
+CONFIG_TPL_RELOC_MALLOC=y
+CONFIG_TPL_RELOC_MALLOC_ADDR=0xf8fb4000
+CONFIG_TPL_RELOC_MALLOC_SIZE=0xc000
 CONFIG_SPL_NAND_SUPPORT=y
 CONFIG_TPL=y
 CONFIG_TPL_MAX_SIZE=0x20000
diff --git a/configs/P1020RDB-PC_SDCARD_defconfig b/configs/P1020RDB-PC_SDCARD_defconfig
index 55dc19d658aa..a86a406eb7c5 100644
--- a/configs/P1020RDB-PC_SDCARD_defconfig
+++ b/configs/P1020RDB-PC_SDCARD_defconfig
@@ -31,6 +31,10 @@ CONFIG_SPL_MAX_SIZE=0x20000
 CONFIG_SPL_MMC_BOOT=y
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
 CONFIG_SPL_FLUSH_IMAGE=y
+CONFIG_SPL_RELOC_STACK=0xf8f9d000
+CONFIG_SPL_RELOC_MALLOC=y
+CONFIG_SPL_RELOC_MALLOC_ADDR=0xf8fa5000
+CONFIG_SPL_RELOC_MALLOC_SIZE=0x1b000
 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 c4391ed5424c..4c9f1b4c81ed 100644
--- a/configs/P1020RDB-PC_SPIFLASH_defconfig
+++ b/configs/P1020RDB-PC_SPIFLASH_defconfig
@@ -34,6 +34,10 @@ CONFIG_SPL_MAX_SIZE=0x20000
 CONFIG_SPL_SPI_BOOT=y
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
 CONFIG_SPL_FLUSH_IMAGE=y
+CONFIG_SPL_RELOC_STACK=0xf8f9d000
+CONFIG_SPL_RELOC_MALLOC=y
+CONFIG_SPL_RELOC_MALLOC_ADDR=0xf8fa5000
+CONFIG_SPL_RELOC_MALLOC_SIZE=0x1b000
 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 ba8d2fe7eb99..ae8b802787bb 100644
--- a/configs/P1020RDB-PC_defconfig
+++ b/configs/P1020RDB-PC_defconfig
@@ -23,7 +23,6 @@ CONFIG_BOARD_EARLY_INIT_R=y
 # CONFIG_MISC_INIT_R is not set
 CONFIG_SPL_MAX_SIZE=0x20000
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
-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 c85ec6d25201..899d074537fa 100644
--- a/configs/P1020RDB-PD_NAND_defconfig
+++ b/configs/P1020RDB-PD_NAND_defconfig
@@ -33,6 +33,13 @@ CONFIG_SPL_NAND_BOOT=y
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
 CONFIG_SPL_INIT_MINIMAL=y
 CONFIG_SPL_FLUSH_IMAGE=y
+CONFIG_SPL_RELOC_TEXT_BASE=0xf8fbe000
+CONFIG_SPL_RELOC_STACK=0xf8fbfff0
+CONFIG_TPL_RELOC_TEXT_BASE=0xf8f81000
+CONFIG_TPL_RELOC_STACK=0xf8fb0000
+CONFIG_TPL_RELOC_MALLOC=y
+CONFIG_TPL_RELOC_MALLOC_ADDR=0xf8fb4000
+CONFIG_TPL_RELOC_MALLOC_SIZE=0xc000
 CONFIG_SPL_NAND_SUPPORT=y
 CONFIG_TPL=y
 CONFIG_TPL_MAX_SIZE=0x20000
diff --git a/configs/P1020RDB-PD_SDCARD_defconfig b/configs/P1020RDB-PD_SDCARD_defconfig
index a1bbb639257c..ea91b9e95d5d 100644
--- a/configs/P1020RDB-PD_SDCARD_defconfig
+++ b/configs/P1020RDB-PD_SDCARD_defconfig
@@ -31,6 +31,10 @@ CONFIG_SPL_MAX_SIZE=0x20000
 CONFIG_SPL_MMC_BOOT=y
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
 CONFIG_SPL_FLUSH_IMAGE=y
+CONFIG_SPL_RELOC_STACK=0xf8f9d000
+CONFIG_SPL_RELOC_MALLOC=y
+CONFIG_SPL_RELOC_MALLOC_ADDR=0xf8fa5000
+CONFIG_SPL_RELOC_MALLOC_SIZE=0x1b000
 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 e859587ccd3c..9351f00e5db5 100644
--- a/configs/P1020RDB-PD_SPIFLASH_defconfig
+++ b/configs/P1020RDB-PD_SPIFLASH_defconfig
@@ -34,6 +34,10 @@ CONFIG_SPL_MAX_SIZE=0x20000
 CONFIG_SPL_SPI_BOOT=y
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
 CONFIG_SPL_FLUSH_IMAGE=y
+CONFIG_SPL_RELOC_STACK=0xf8f9d000
+CONFIG_SPL_RELOC_MALLOC=y
+CONFIG_SPL_RELOC_MALLOC_ADDR=0xf8fa5000
+CONFIG_SPL_RELOC_MALLOC_SIZE=0x1b000
 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 8ab9eda187cf..92b23a1c9f3b 100644
--- a/configs/P1020RDB-PD_defconfig
+++ b/configs/P1020RDB-PD_defconfig
@@ -23,7 +23,6 @@ CONFIG_BOARD_EARLY_INIT_R=y
 # CONFIG_MISC_INIT_R is not set
 CONFIG_SPL_MAX_SIZE=0x20000
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
-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 eefc72e49874..ad6c72c23c52 100644
--- a/configs/P2020RDB-PC_36BIT_NAND_defconfig
+++ b/configs/P2020RDB-PC_36BIT_NAND_defconfig
@@ -34,6 +34,13 @@ CONFIG_SPL_NAND_BOOT=y
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
 CONFIG_SPL_INIT_MINIMAL=y
 CONFIG_SPL_FLUSH_IMAGE=y
+CONFIG_SPL_RELOC_TEXT_BASE=0xf8ffe000
+CONFIG_SPL_RELOC_STACK=0xf8fffff0
+CONFIG_TPL_RELOC_TEXT_BASE=0xf8f81000
+CONFIG_TPL_RELOC_STACK=0xf8fb0000
+CONFIG_TPL_RELOC_MALLOC=y
+CONFIG_TPL_RELOC_MALLOC_ADDR=0xf8fb4000
+CONFIG_TPL_RELOC_MALLOC_SIZE=0xc000
 CONFIG_SPL_NAND_SUPPORT=y
 CONFIG_TPL=y
 CONFIG_TPL_MAX_SIZE=0x20000
diff --git a/configs/P2020RDB-PC_36BIT_SDCARD_defconfig b/configs/P2020RDB-PC_36BIT_SDCARD_defconfig
index 5ac2f8c566d4..d4f82f16f586 100644
--- a/configs/P2020RDB-PC_36BIT_SDCARD_defconfig
+++ b/configs/P2020RDB-PC_36BIT_SDCARD_defconfig
@@ -32,6 +32,10 @@ CONFIG_SPL_MAX_SIZE=0x20000
 CONFIG_SPL_MMC_BOOT=y
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
 CONFIG_SPL_FLUSH_IMAGE=y
+CONFIG_SPL_RELOC_STACK=0xf8f9d000
+CONFIG_SPL_RELOC_MALLOC=y
+CONFIG_SPL_RELOC_MALLOC_ADDR=0xf8fa5000
+CONFIG_SPL_RELOC_MALLOC_SIZE=0x5b000
 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 6150b84d11b7..7a198e01785f 100644
--- a/configs/P2020RDB-PC_36BIT_SPIFLASH_defconfig
+++ b/configs/P2020RDB-PC_36BIT_SPIFLASH_defconfig
@@ -35,6 +35,10 @@ CONFIG_SPL_MAX_SIZE=0x20000
 CONFIG_SPL_SPI_BOOT=y
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
 CONFIG_SPL_FLUSH_IMAGE=y
+CONFIG_SPL_RELOC_STACK=0xf8f9d000
+CONFIG_SPL_RELOC_MALLOC=y
+CONFIG_SPL_RELOC_MALLOC_ADDR=0xf8fa5000
+CONFIG_SPL_RELOC_MALLOC_SIZE=0x5b000
 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 be9896fbf583..b2f825e5186a 100644
--- a/configs/P2020RDB-PC_36BIT_defconfig
+++ b/configs/P2020RDB-PC_36BIT_defconfig
@@ -24,7 +24,6 @@ CONFIG_BOARD_EARLY_INIT_R=y
 # CONFIG_MISC_INIT_R is not set
 CONFIG_SPL_MAX_SIZE=0x20000
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
-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 dc94e25375cb..f5bd7015fb54 100644
--- a/configs/P2020RDB-PC_NAND_defconfig
+++ b/configs/P2020RDB-PC_NAND_defconfig
@@ -33,6 +33,13 @@ CONFIG_SPL_NAND_BOOT=y
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
 CONFIG_SPL_INIT_MINIMAL=y
 CONFIG_SPL_FLUSH_IMAGE=y
+CONFIG_SPL_RELOC_TEXT_BASE=0xf8ffe000
+CONFIG_SPL_RELOC_STACK=0xf8fffff0
+CONFIG_TPL_RELOC_TEXT_BASE=0xf8f81000
+CONFIG_TPL_RELOC_STACK=0xf8fb0000
+CONFIG_TPL_RELOC_MALLOC=y
+CONFIG_TPL_RELOC_MALLOC_ADDR=0xf8fb4000
+CONFIG_TPL_RELOC_MALLOC_SIZE=0xc000
 CONFIG_SPL_NAND_SUPPORT=y
 CONFIG_TPL=y
 CONFIG_TPL_MAX_SIZE=0x20000
diff --git a/configs/P2020RDB-PC_SDCARD_defconfig b/configs/P2020RDB-PC_SDCARD_defconfig
index 4f33a697cda0..0e1eb82a00ee 100644
--- a/configs/P2020RDB-PC_SDCARD_defconfig
+++ b/configs/P2020RDB-PC_SDCARD_defconfig
@@ -31,6 +31,10 @@ CONFIG_SPL_MAX_SIZE=0x20000
 CONFIG_SPL_MMC_BOOT=y
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
 CONFIG_SPL_FLUSH_IMAGE=y
+CONFIG_SPL_RELOC_STACK=0xf8f9d000
+CONFIG_SPL_RELOC_MALLOC=y
+CONFIG_SPL_RELOC_MALLOC_ADDR=0xf8fa5000
+CONFIG_SPL_RELOC_MALLOC_SIZE=0x5b000
 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 e63cd161ddba..5ffda90dd3bf 100644
--- a/configs/P2020RDB-PC_SPIFLASH_defconfig
+++ b/configs/P2020RDB-PC_SPIFLASH_defconfig
@@ -34,6 +34,10 @@ CONFIG_SPL_MAX_SIZE=0x20000
 CONFIG_SPL_SPI_BOOT=y
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
 CONFIG_SPL_FLUSH_IMAGE=y
+CONFIG_SPL_RELOC_STACK=0xf8f9d000
+CONFIG_SPL_RELOC_MALLOC=y
+CONFIG_SPL_RELOC_MALLOC_ADDR=0xf8fa5000
+CONFIG_SPL_RELOC_MALLOC_SIZE=0x5b000
 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 d016763313f9..114491ae2192 100644
--- a/configs/P2020RDB-PC_defconfig
+++ b/configs/P2020RDB-PC_defconfig
@@ -23,7 +23,6 @@ CONFIG_BOARD_EARLY_INIT_R=y
 # CONFIG_MISC_INIT_R is not set
 CONFIG_SPL_MAX_SIZE=0x20000
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
-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 ae8828d7e6da..93dc0c1909f0 100644
--- a/configs/T1024RDB_NAND_defconfig
+++ b/configs/T1024RDB_NAND_defconfig
@@ -39,6 +39,10 @@ CONFIG_SPL_FSL_PBL=y
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
 CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_SPL_SKIP_RELOCATE=y
+CONFIG_SPL_RELOC_STACK=0xfffd8000
+CONFIG_SPL_RELOC_MALLOC=y
+CONFIG_SPL_RELOC_MALLOC_ADDR=0xfffcb000
+CONFIG_SPL_RELOC_MALLOC_SIZE=0x7800
 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 8ac0e4a5dacb..dddf74262e35 100644
--- a/configs/T1024RDB_SDCARD_defconfig
+++ b/configs/T1024RDB_SDCARD_defconfig
@@ -40,6 +40,10 @@ CONFIG_SPL_FSL_PBL=y
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
 CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_SPL_SKIP_RELOCATE=y
+CONFIG_SPL_RELOC_STACK=0xfffd8000
+CONFIG_SPL_RELOC_MALLOC=y
+CONFIG_SPL_RELOC_MALLOC_ADDR=0xfffcb000
+CONFIG_SPL_RELOC_MALLOC_SIZE=0x7800
 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 ebe814f38132..d8e41241ee6d 100644
--- a/configs/T1024RDB_SPIFLASH_defconfig
+++ b/configs/T1024RDB_SPIFLASH_defconfig
@@ -43,6 +43,10 @@ CONFIG_SPL_FSL_PBL=y
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
 CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_SPL_SKIP_RELOCATE=y
+CONFIG_SPL_RELOC_STACK=0xfffd8000
+CONFIG_SPL_RELOC_MALLOC=y
+CONFIG_SPL_RELOC_MALLOC_ADDR=0xfffcb000
+CONFIG_SPL_RELOC_MALLOC_SIZE=0x7800
 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 e12bb9f15906..ccb1a3343cad 100644
--- a/configs/T1042D4RDB_NAND_defconfig
+++ b/configs/T1042D4RDB_NAND_defconfig
@@ -35,6 +35,10 @@ CONFIG_SPL_FSL_PBL=y
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
 CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_SPL_SKIP_RELOCATE=y
+CONFIG_SPL_RELOC_STACK=0xfffd8000
+CONFIG_SPL_RELOC_MALLOC=y
+CONFIG_SPL_RELOC_MALLOC_ADDR=0xfffcb000
+CONFIG_SPL_RELOC_MALLOC_SIZE=0x7800
 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 01a6e97afc42..4b3962c7de8e 100644
--- a/configs/T1042D4RDB_SDCARD_defconfig
+++ b/configs/T1042D4RDB_SDCARD_defconfig
@@ -36,6 +36,10 @@ CONFIG_SPL_FSL_PBL=y
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
 CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_SPL_SKIP_RELOCATE=y
+CONFIG_SPL_RELOC_STACK=0xfffd8000
+CONFIG_SPL_RELOC_MALLOC=y
+CONFIG_SPL_RELOC_MALLOC_ADDR=0xfffcb000
+CONFIG_SPL_RELOC_MALLOC_SIZE=0x7800
 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 ce334b12a99d..a9668c562de9 100644
--- a/configs/T1042D4RDB_SPIFLASH_defconfig
+++ b/configs/T1042D4RDB_SPIFLASH_defconfig
@@ -39,6 +39,10 @@ CONFIG_SPL_FSL_PBL=y
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
 CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_SPL_SKIP_RELOCATE=y
+CONFIG_SPL_RELOC_STACK=0xfffd8000
+CONFIG_SPL_RELOC_MALLOC=y
+CONFIG_SPL_RELOC_MALLOC_ADDR=0xfffcb000
+CONFIG_SPL_RELOC_MALLOC_SIZE=0x7800
 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 67f84d2b809d..e8b83ed127de 100644
--- a/configs/T2080QDS_NAND_defconfig
+++ b/configs/T2080QDS_NAND_defconfig
@@ -40,6 +40,10 @@ CONFIG_SPL_FSL_PBL=y
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
 CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_SPL_SKIP_RELOCATE=y
+CONFIG_SPL_RELOC_STACK=0xfffd8000
+CONFIG_SPL_RELOC_MALLOC=y
+CONFIG_SPL_RELOC_MALLOC_ADDR=0xfffcb000
+CONFIG_SPL_RELOC_MALLOC_SIZE=0xc800
 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 5cfdb5659dcc..1e9b58622658 100644
--- a/configs/T2080QDS_SDCARD_defconfig
+++ b/configs/T2080QDS_SDCARD_defconfig
@@ -41,6 +41,10 @@ CONFIG_SPL_FSL_PBL=y
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
 CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_SPL_SKIP_RELOCATE=y
+CONFIG_SPL_RELOC_STACK=0xfffd8000
+CONFIG_SPL_RELOC_MALLOC=y
+CONFIG_SPL_RELOC_MALLOC_ADDR=0xfffcb000
+CONFIG_SPL_RELOC_MALLOC_SIZE=0xc800
 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 99889cf6df19..2967c4e9806a 100644
--- a/configs/T2080QDS_SPIFLASH_defconfig
+++ b/configs/T2080QDS_SPIFLASH_defconfig
@@ -44,6 +44,10 @@ CONFIG_SPL_FSL_PBL=y
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
 CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_SPL_SKIP_RELOCATE=y
+CONFIG_SPL_RELOC_STACK=0xfffd8000
+CONFIG_SPL_RELOC_MALLOC=y
+CONFIG_SPL_RELOC_MALLOC_ADDR=0xfffcb000
+CONFIG_SPL_RELOC_MALLOC_SIZE=0xc800
 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 0046bd386723..dd5a3dee4d82 100644
--- a/configs/T2080RDB_NAND_defconfig
+++ b/configs/T2080RDB_NAND_defconfig
@@ -38,6 +38,10 @@ CONFIG_SPL_FSL_PBL=y
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
 CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_SPL_SKIP_RELOCATE=y
+CONFIG_SPL_RELOC_STACK=0xfffd8000
+CONFIG_SPL_RELOC_MALLOC=y
+CONFIG_SPL_RELOC_MALLOC_ADDR=0xfffcb000
+CONFIG_SPL_RELOC_MALLOC_SIZE=0xc800
 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 0d09be36c85c..2c35b80c0c6c 100644
--- a/configs/T2080RDB_SDCARD_defconfig
+++ b/configs/T2080RDB_SDCARD_defconfig
@@ -39,6 +39,10 @@ CONFIG_SPL_FSL_PBL=y
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
 CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_SPL_SKIP_RELOCATE=y
+CONFIG_SPL_RELOC_STACK=0xfffd8000
+CONFIG_SPL_RELOC_MALLOC=y
+CONFIG_SPL_RELOC_MALLOC_ADDR=0xfffcb000
+CONFIG_SPL_RELOC_MALLOC_SIZE=0xc800
 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 5cbfc55a5a55..21e0be3a03ac 100644
--- a/configs/T2080RDB_SPIFLASH_defconfig
+++ b/configs/T2080RDB_SPIFLASH_defconfig
@@ -42,6 +42,10 @@ CONFIG_SPL_FSL_PBL=y
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
 CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_SPL_SKIP_RELOCATE=y
+CONFIG_SPL_RELOC_STACK=0xfffd8000
+CONFIG_SPL_RELOC_MALLOC=y
+CONFIG_SPL_RELOC_MALLOC_ADDR=0xfffcb000
+CONFIG_SPL_RELOC_MALLOC_SIZE=0xc800
 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 bc307fa59a3a..d2b8df2dbc10 100644
--- a/configs/T2080RDB_revD_NAND_defconfig
+++ b/configs/T2080RDB_revD_NAND_defconfig
@@ -39,6 +39,10 @@ CONFIG_SPL_FSL_PBL=y
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
 CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_SPL_SKIP_RELOCATE=y
+CONFIG_SPL_RELOC_STACK=0xfffd8000
+CONFIG_SPL_RELOC_MALLOC=y
+CONFIG_SPL_RELOC_MALLOC_ADDR=0xfffcb000
+CONFIG_SPL_RELOC_MALLOC_SIZE=0xc800
 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 e0456dee0777..24dea1ae9af6 100644
--- a/configs/T2080RDB_revD_SDCARD_defconfig
+++ b/configs/T2080RDB_revD_SDCARD_defconfig
@@ -40,6 +40,10 @@ CONFIG_SPL_FSL_PBL=y
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
 CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_SPL_SKIP_RELOCATE=y
+CONFIG_SPL_RELOC_STACK=0xfffd8000
+CONFIG_SPL_RELOC_MALLOC=y
+CONFIG_SPL_RELOC_MALLOC_ADDR=0xfffcb000
+CONFIG_SPL_RELOC_MALLOC_SIZE=0xc800
 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 4bef18e0f920..a5c397dc4dd9 100644
--- a/configs/T2080RDB_revD_SPIFLASH_defconfig
+++ b/configs/T2080RDB_revD_SPIFLASH_defconfig
@@ -43,6 +43,10 @@ CONFIG_SPL_FSL_PBL=y
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
 CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_SPL_SKIP_RELOCATE=y
+CONFIG_SPL_RELOC_STACK=0xfffd8000
+CONFIG_SPL_RELOC_MALLOC=y
+CONFIG_SPL_RELOC_MALLOC_ADDR=0xfffcb000
+CONFIG_SPL_RELOC_MALLOC_SIZE=0xc800
 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 f68d98c7eeec..56eb03b0c029 100644
--- a/configs/T4240RDB_SDCARD_defconfig
+++ b/configs/T4240RDB_SDCARD_defconfig
@@ -37,6 +37,10 @@ CONFIG_SPL_FSL_PBL=y
 CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE=y
 CONFIG_SPL_FLUSH_IMAGE=y
 CONFIG_SPL_SKIP_RELOCATE=y
+CONFIG_SPL_RELOC_STACK=0xfffd8000
+CONFIG_SPL_RELOC_MALLOC=y
+CONFIG_SPL_RELOC_MALLOC_ADDR=0xfffcb000
+CONFIG_SPL_RELOC_MALLOC_SIZE=0xc800
 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 ead535566157..13f8360a5b48 100644
--- a/include/configs/P1010RDB.h
+++ b/include/configs/P1010RDB.h
@@ -43,8 +43,6 @@
 #ifdef CONFIG_NXP_ESBC
 #define CONFIG_SPL_TARGET		"u-boot-with-spl.bin"
 
-#define CONFIG_SPL_RELOC_TEXT_BASE	0x00100000
-#define CONFIG_SPL_RELOC_STACK		0x00100000
 #define CONFIG_SYS_NAND_U_BOOT_SIZE	((768 << 10) - 0x2000)
 #define CONFIG_SYS_NAND_U_BOOT_DST	(0x00200000 - CONFIG_SPL_MAX_SIZE)
 #define CONFIG_SYS_NAND_U_BOOT_START	0x00200000
@@ -392,10 +390,6 @@ extern unsigned long get_sdram_size(void);
 #define CONFIG_SYS_INIT_L2_ADDR_PHYS	CONFIG_SYS_INIT_L2_ADDR
 #define CONFIG_SYS_L2_SIZE		(256 << 10)
 #define CONFIG_SYS_INIT_L2_END	(CONFIG_SYS_INIT_L2_ADDR + CONFIG_SYS_L2_SIZE)
-#define CONFIG_SPL_RELOC_TEXT_BASE	0xD0001000
-#define CONFIG_SPL_RELOC_STACK		(CONFIG_SYS_INIT_L2_ADDR + 112 * 1024)
-#define CONFIG_SPL_RELOC_MALLOC_ADDR	(CONFIG_SYS_INIT_L2_ADDR + 128 * 1024)
-#define CONFIG_SPL_RELOC_MALLOC_SIZE	(128 << 10)
 #define CONFIG_SPL_GD_ADDR		(CONFIG_SYS_INIT_L2_ADDR + 96 * 1024)
 #elif defined(CONFIG_MTD_RAW_NAND)
 #ifdef CONFIG_TPL_BUILD
@@ -403,18 +397,12 @@ extern unsigned long get_sdram_size(void);
 #define CONFIG_SYS_INIT_L2_ADDR_PHYS	CONFIG_SYS_INIT_L2_ADDR
 #define CONFIG_SYS_L2_SIZE		(256 << 10)
 #define CONFIG_SYS_INIT_L2_END	(CONFIG_SYS_INIT_L2_ADDR + CONFIG_SYS_L2_SIZE)
-#define CONFIG_SPL_RELOC_TEXT_BASE	0xD0001000
-#define CONFIG_SPL_RELOC_STACK		(CONFIG_SYS_INIT_L2_ADDR + 192 * 1024)
-#define CONFIG_SPL_RELOC_MALLOC_ADDR	(CONFIG_SYS_INIT_L2_ADDR + 208 * 1024)
-#define CONFIG_SPL_RELOC_MALLOC_SIZE	(48 << 10)
 #define CONFIG_SPL_GD_ADDR		(CONFIG_SYS_INIT_L2_ADDR + 176 * 1024)
 #else
 #define CONFIG_SYS_INIT_L2_ADDR		0xD0000000
 #define CONFIG_SYS_INIT_L2_ADDR_PHYS	CONFIG_SYS_INIT_L2_ADDR
 #define CONFIG_SYS_L2_SIZE		(256 << 10)
 #define CONFIG_SYS_INIT_L2_END	(CONFIG_SYS_INIT_L2_ADDR + CONFIG_SYS_L2_SIZE)
-#define CONFIG_SPL_RELOC_TEXT_BASE	(CONFIG_SYS_INIT_L2_END - 0x3000)
-#define CONFIG_SPL_RELOC_STACK		((CONFIG_SYS_INIT_L2_END - 1) & ~0xF)
 #endif
 #endif
 #endif
diff --git a/include/configs/T102xRDB.h b/include/configs/T102xRDB.h
index 5b0cea735dfa..4dcd376d8954 100644
--- a/include/configs/T102xRDB.h
+++ b/include/configs/T102xRDB.h
@@ -121,9 +121,6 @@
 #define CONFIG_SYS_L3_SIZE		(256 << 10)
 #define CONFIG_SPL_GD_ADDR		(CONFIG_SYS_INIT_L3_ADDR + 32 * 1024)
 #define SPL_ENV_ADDR			(CONFIG_SPL_GD_ADDR + 4 * 1024)
-#define CONFIG_SPL_RELOC_MALLOC_ADDR	(CONFIG_SPL_GD_ADDR + 12 * 1024)
-#define CONFIG_SPL_RELOC_MALLOC_SIZE	(30 << 10)
-#define CONFIG_SPL_RELOC_STACK		(CONFIG_SPL_GD_ADDR + 64 * 1024)
 
 #ifdef CONFIG_PHYS_64BIT
 #define CONFIG_SYS_DCSRBAR		0xf0000000
diff --git a/include/configs/T104xRDB.h b/include/configs/T104xRDB.h
index 29b4cc40995b..07eed3bb14f3 100644
--- a/include/configs/T104xRDB.h
+++ b/include/configs/T104xRDB.h
@@ -108,9 +108,6 @@
 #define CONFIG_SYS_L3_SIZE		256 << 10
 #define CONFIG_SPL_GD_ADDR		(CONFIG_SYS_INIT_L3_VADDR + 32 * 1024)
 #define SPL_ENV_ADDR			(CONFIG_SPL_GD_ADDR + 4 * 1024)
-#define CONFIG_SPL_RELOC_MALLOC_ADDR	(CONFIG_SPL_GD_ADDR + 12 * 1024)
-#define CONFIG_SPL_RELOC_MALLOC_SIZE	(30 << 10)
-#define CONFIG_SPL_RELOC_STACK		(CONFIG_SPL_GD_ADDR + 64 * 1024)
 
 #define CONFIG_SYS_DCSRBAR		0xf0000000
 #define CONFIG_SYS_DCSRBAR_PHYS		0xf00000000ull
diff --git a/include/configs/T208xQDS.h b/include/configs/T208xQDS.h
index 22cee32f6d7a..16751e5a3fb3 100644
--- a/include/configs/T208xQDS.h
+++ b/include/configs/T208xQDS.h
@@ -94,9 +94,6 @@
 #define CONFIG_SYS_L3_SIZE		(512 << 10)
 #define CONFIG_SPL_GD_ADDR		(CONFIG_SYS_INIT_L3_ADDR + 32 * 1024)
 #define SPL_ENV_ADDR			(CONFIG_SPL_GD_ADDR + 4 * 1024)
-#define CONFIG_SPL_RELOC_MALLOC_ADDR	(CONFIG_SPL_GD_ADDR + 12 * 1024)
-#define CONFIG_SPL_RELOC_MALLOC_SIZE	(50 << 10)
-#define CONFIG_SPL_RELOC_STACK		(CONFIG_SPL_GD_ADDR + 64 * 1024)
 
 #define CONFIG_SYS_DCSRBAR	0xf0000000
 #define CONFIG_SYS_DCSRBAR_PHYS	0xf00000000ull
diff --git a/include/configs/T208xRDB.h b/include/configs/T208xRDB.h
index fafd83440ef0..feec2c359912 100644
--- a/include/configs/T208xRDB.h
+++ b/include/configs/T208xRDB.h
@@ -89,9 +89,6 @@
 #define CONFIG_SYS_L3_SIZE		(512 << 10)
 #define CONFIG_SPL_GD_ADDR		(CONFIG_SYS_INIT_L3_ADDR + 32 * 1024)
 #define SPL_ENV_ADDR			(CONFIG_SPL_GD_ADDR + 4 * 1024)
-#define CONFIG_SPL_RELOC_MALLOC_ADDR	(CONFIG_SPL_GD_ADDR + 12 * 1024)
-#define CONFIG_SPL_RELOC_MALLOC_SIZE	(50 << 10)
-#define CONFIG_SPL_RELOC_STACK		(CONFIG_SPL_GD_ADDR + 64 * 1024)
 
 #define CONFIG_SYS_DCSRBAR	0xf0000000
 #define CONFIG_SYS_DCSRBAR_PHYS	0xf00000000ull
diff --git a/include/configs/T4240RDB.h b/include/configs/T4240RDB.h
index 4b5c6bcf7ebe..21854139b9da 100644
--- a/include/configs/T4240RDB.h
+++ b/include/configs/T4240RDB.h
@@ -69,9 +69,6 @@
 #define CONFIG_SYS_L3_SIZE		(512 << 10)
 #define CONFIG_SPL_GD_ADDR		(CONFIG_SYS_INIT_L3_ADDR + 32 * 1024)
 #define SPL_ENV_ADDR			(CONFIG_SPL_GD_ADDR + 4 * 1024)
-#define CONFIG_SPL_RELOC_MALLOC_ADDR	(CONFIG_SPL_GD_ADDR + 12 * 1024)
-#define CONFIG_SPL_RELOC_MALLOC_SIZE	(50 << 10)
-#define CONFIG_SPL_RELOC_STACK		(CONFIG_SPL_GD_ADDR + 64 * 1024)
 
 #define CONFIG_SYS_DCSRBAR		0xf0000000
 #define CONFIG_SYS_DCSRBAR_PHYS		0xf00000000ull
diff --git a/include/configs/p1_p2_rdb_pc.h b/include/configs/p1_p2_rdb_pc.h
index 849a0b8cb649..0b866f4d5a66 100644
--- a/include/configs/p1_p2_rdb_pc.h
+++ b/include/configs/p1_p2_rdb_pc.h
@@ -336,31 +336,17 @@
 #define CONFIG_SYS_INIT_L2_ADDR		0xf8f80000
 #define CONFIG_SYS_INIT_L2_ADDR_PHYS	CONFIG_SYS_INIT_L2_ADDR
 #define CONFIG_SYS_INIT_L2_END	(CONFIG_SYS_INIT_L2_ADDR + CONFIG_SYS_L2_SIZE)
-#define CONFIG_SPL_RELOC_TEXT_BASE	0xf8f81000
 #define CONFIG_SPL_GD_ADDR		(CONFIG_SYS_INIT_L2_ADDR + 112 * 1024)
-#define CONFIG_SPL_RELOC_STACK		(CONFIG_SYS_INIT_L2_ADDR + 116 * 1024)
-#define CONFIG_SPL_RELOC_MALLOC_ADDR	(CONFIG_SYS_INIT_L2_ADDR + 148 * 1024)
-#if defined(CONFIG_TARGET_P2020RDB)
-#define CONFIG_SPL_RELOC_MALLOC_SIZE	(364 << 10)
-#else
-#define CONFIG_SPL_RELOC_MALLOC_SIZE	(108 << 10)
-#endif
 #elif defined(CONFIG_MTD_RAW_NAND)
 #ifdef CONFIG_TPL_BUILD
 #define CONFIG_SYS_INIT_L2_ADDR		0xf8f80000
 #define CONFIG_SYS_INIT_L2_ADDR_PHYS	CONFIG_SYS_INIT_L2_ADDR
 #define CONFIG_SYS_INIT_L2_END	(CONFIG_SYS_INIT_L2_ADDR + CONFIG_SYS_L2_SIZE)
-#define CONFIG_SPL_RELOC_TEXT_BASE	0xf8f81000
-#define CONFIG_SPL_RELOC_STACK		(CONFIG_SYS_INIT_L2_ADDR + 192 * 1024)
-#define CONFIG_SPL_RELOC_MALLOC_ADDR	(CONFIG_SYS_INIT_L2_ADDR + 208 * 1024)
-#define CONFIG_SPL_RELOC_MALLOC_SIZE	(48 << 10)
 #define CONFIG_SPL_GD_ADDR		(CONFIG_SYS_INIT_L2_ADDR + 176 * 1024)
 #else
 #define CONFIG_SYS_INIT_L2_ADDR		0xf8f80000
 #define CONFIG_SYS_INIT_L2_ADDR_PHYS	CONFIG_SYS_INIT_L2_ADDR
 #define CONFIG_SYS_INIT_L2_END	(CONFIG_SYS_INIT_L2_ADDR + CONFIG_SYS_L2_SIZE)
-#define CONFIG_SPL_RELOC_TEXT_BASE	(CONFIG_SYS_INIT_L2_END - 0x2000)
-#define CONFIG_SPL_RELOC_STACK		((CONFIG_SYS_INIT_L2_END - 1) & ~0xF)
 #endif /* CONFIG_TPL_BUILD */
 #endif
 #endif
-- 
2.25.1



More information about the U-Boot mailing list