diff options
author | Ravi Babu | 2016-11-30 01:24:35 -0600 |
---|---|---|
committer | Lokesh Vutla | 2016-11-30 03:20:03 -0600 |
commit | e3aeda7b7485c680af510daca1481e098aeaa51d (patch) | |
tree | 772d745624f429e4fa48c73f7fa9709db6f51589 | |
parent | de66166d09bc2ddb7bdf18e5a86bcbfb8925eed9 (diff) | |
download | u-boot-e3aeda7b7485c680af510daca1481e098aeaa51d.tar.gz u-boot-e3aeda7b7485c680af510daca1481e098aeaa51d.tar.xz u-boot-e3aeda7b7485c680af510daca1481e098aeaa51d.zip |
TI: Rework SRAM definitions and maximums
commit fa2f81b06f666710c756d25297d7a9ca48c65935 upstream
On all TI platforms the ROM defines a "downloaded image" area at or near
the start of SRAM which is followed by a reserved area. As it is at
best bad form and at worst possibly harmful in corner cases to write in
this reserved area, we stop doing that by adding in the define
NON_SECURE_SRAM_IMG_END to say where the end of the downloaded image
area is and make SRAM_SCRATCH_SPACE_ADDR be one kilobyte before this.
At current we define the end of scratch space at 0x228 bytes past the
start of scratch space this this gives us a lot of room to grow. As
these scratch uses are non-optional today, all targets are modified to
respect this boundary.
Signed-off-by: Ravi Babu <ravibabu@ti.com>
26 files changed, 57 insertions, 47 deletions
diff --git a/arch/arm/include/asm/arch-am33xx/omap.h b/arch/arm/include/asm/arch-am33xx/omap.h index 47962dadf5..3293caaca4 100644 --- a/arch/arm/include/asm/arch-am33xx/omap.h +++ b/arch/arm/include/asm/arch-am33xx/omap.h | |||
@@ -15,24 +15,23 @@ | |||
15 | #ifndef _OMAP_H_ | 15 | #ifndef _OMAP_H_ |
16 | #define _OMAP_H_ | 16 | #define _OMAP_H_ |
17 | 17 | ||
18 | #include <linux/sizes.h> | ||
19 | |||
18 | #ifdef CONFIG_AM33XX | 20 | #ifdef CONFIG_AM33XX |
19 | #define NON_SECURE_SRAM_START 0x402F0400 | 21 | #define NON_SECURE_SRAM_START 0x402F0400 |
20 | #define NON_SECURE_SRAM_END 0x40310000 | 22 | #define NON_SECURE_SRAM_END 0x40310000 |
21 | #define SRAM_SCRATCH_SPACE_ADDR 0x4030B800 | 23 | #define NON_SECURE_SRAM_IMG_END 0x4030B800 |
22 | #elif defined(CONFIG_TI81XX) | 24 | #elif defined(CONFIG_TI81XX) |
23 | #define NON_SECURE_SRAM_START 0x40300000 | 25 | #define NON_SECURE_SRAM_START 0x40300000 |
24 | #define NON_SECURE_SRAM_END 0x40320000 | 26 | #define NON_SECURE_SRAM_END 0x40320000 |
25 | #define SRAM_SCRATCH_SPACE_ADDR 0x4031B800 | 27 | #define NON_SECURE_SRAM_IMG_END 0x4031B800 |
26 | #elif defined(CONFIG_AM43XX) | 28 | #elif defined(CONFIG_AM43XX) |
27 | #define NON_SECURE_SRAM_START 0x402F0400 | 29 | #define NON_SECURE_SRAM_START 0x402F0400 |
28 | #define NON_SECURE_SRAM_END 0x40340000 | 30 | #define NON_SECURE_SRAM_END 0x40340000 |
29 | #define SRAM_SCRATCH_SPACE_ADDR 0x40337C00 | 31 | #define NON_SECURE_SRAM_IMG_END 0x40337DE0 |
30 | #define AM4372_BOARD_NAME_START SRAM_SCRATCH_SPACE_ADDR | ||
31 | #define AM4372_BOARD_NAME_END SRAM_SCRATCH_SPACE_ADDR + 0xC | ||
32 | #define AM4372_BOARD_VERSION_START SRAM_SCRATCH_SPACE_ADDR + 0xD | ||
33 | #define AM4372_BOARD_VERSION_END SRAM_SCRATCH_SPACE_ADDR + 0x14 | ||
34 | #define QSPI_BASE 0x47900000 | 32 | #define QSPI_BASE 0x47900000 |
35 | #endif | 33 | #endif |
34 | #define SRAM_SCRATCH_SPACE_ADDR (NON_SECURE_SRAM_IMG_END - SZ_1K) | ||
36 | 35 | ||
37 | /* Boot parameters */ | 36 | /* Boot parameters */ |
38 | #ifndef __ASSEMBLY__ | 37 | #ifndef __ASSEMBLY__ |
diff --git a/arch/arm/include/asm/arch-omap3/omap.h b/arch/arm/include/asm/arch-omap3/omap.h index 116d863667..417ff895f1 100644 --- a/arch/arm/include/asm/arch-omap3/omap.h +++ b/arch/arm/include/asm/arch-omap3/omap.h | |||
@@ -10,6 +10,8 @@ | |||
10 | #ifndef _OMAP3_H_ | 10 | #ifndef _OMAP3_H_ |
11 | #define _OMAP3_H_ | 11 | #define _OMAP3_H_ |
12 | 12 | ||
13 | #include <linux/sizes.h> | ||
14 | |||
13 | /* Stuff on L3 Interconnect */ | 15 | /* Stuff on L3 Interconnect */ |
14 | #define SMX_APE_BASE 0x68000000 | 16 | #define SMX_APE_BASE 0x68000000 |
15 | 17 | ||
@@ -145,7 +147,8 @@ struct gpio { | |||
145 | 147 | ||
146 | #define NON_SECURE_SRAM_START 0x40208000 /* Works for GP & EMU */ | 148 | #define NON_SECURE_SRAM_START 0x40208000 /* Works for GP & EMU */ |
147 | #define NON_SECURE_SRAM_END 0x40210000 | 149 | #define NON_SECURE_SRAM_END 0x40210000 |
148 | #define SRAM_SCRATCH_SPACE_ADDR 0x4020EC00 | 150 | #define NON_SECURE_SRAM_IMG_END 0x4020F000 |
151 | #define SRAM_SCRATCH_SPACE_ADDR (NON_SECURE_SRAM_IMG_END - SZ_1K) | ||
149 | 152 | ||
150 | #define LOW_LEVEL_SRAM_STACK 0x4020FFFC | 153 | #define LOW_LEVEL_SRAM_STACK 0x4020FFFC |
151 | 154 | ||
diff --git a/arch/arm/include/asm/arch-omap4/omap.h b/arch/arm/include/asm/arch-omap4/omap.h index 5ccda6ee94..b86a776840 100644 --- a/arch/arm/include/asm/arch-omap4/omap.h +++ b/arch/arm/include/asm/arch-omap4/omap.h | |||
@@ -19,6 +19,8 @@ | |||
19 | #include <asm/types.h> | 19 | #include <asm/types.h> |
20 | #endif /* !(__KERNEL_STRICT_NAMES || __ASSEMBLY__) */ | 20 | #endif /* !(__KERNEL_STRICT_NAMES || __ASSEMBLY__) */ |
21 | 21 | ||
22 | #include <linux/sizes.h> | ||
23 | |||
22 | /* | 24 | /* |
23 | * L4 Peripherals - L4 Wakeup and L4 Core now | 25 | * L4 Peripherals - L4 Wakeup and L4 Core now |
24 | */ | 26 | */ |
@@ -109,7 +111,8 @@ struct s32ktimer { | |||
109 | */ | 111 | */ |
110 | #define NON_SECURE_SRAM_START 0x40304000 | 112 | #define NON_SECURE_SRAM_START 0x40304000 |
111 | #define NON_SECURE_SRAM_END 0x4030E000 /* Not inclusive */ | 113 | #define NON_SECURE_SRAM_END 0x4030E000 /* Not inclusive */ |
112 | #define SRAM_SCRATCH_SPACE_ADDR 0x4030C000 | 114 | #define NON_SECURE_SRAM_IMG_END 0x4030C000 |
115 | #define SRAM_SCRATCH_SPACE_ADDR (NON_SECURE_SRAM_IMG_END - SZ_1K) | ||
113 | /* base address for indirect vectors (internal boot mode) */ | 116 | /* base address for indirect vectors (internal boot mode) */ |
114 | #define SRAM_ROM_VECT_BASE 0x4030D000 | 117 | #define SRAM_ROM_VECT_BASE 0x4030D000 |
115 | 118 | ||
diff --git a/include/configs/am3517_crane.h b/include/configs/am3517_crane.h index 822e1c8edc..60e145157f 100644 --- a/include/configs/am3517_crane.h +++ b/include/configs/am3517_crane.h | |||
@@ -280,7 +280,8 @@ | |||
280 | #define CONFIG_SPL_BOARD_INIT | 280 | #define CONFIG_SPL_BOARD_INIT |
281 | #define CONFIG_SPL_NAND_SIMPLE | 281 | #define CONFIG_SPL_NAND_SIMPLE |
282 | #define CONFIG_SPL_TEXT_BASE 0x40200800 | 282 | #define CONFIG_SPL_TEXT_BASE 0x40200800 |
283 | #define CONFIG_SPL_MAX_SIZE (54 * 1024) /* 8 KB for stack */ | 283 | #define CONFIG_SPL_MAX_SIZE (SRAM_SCRATCH_SPACE_ADDR - \ |
284 | CONFIG_SPL_TEXT_BASE) | ||
284 | 285 | ||
285 | #define CONFIG_SPL_BSS_START_ADDR 0x80000000 | 286 | #define CONFIG_SPL_BSS_START_ADDR 0x80000000 |
286 | #define CONFIG_SPL_BSS_MAX_SIZE 0x80000 /* 512 KB */ | 287 | #define CONFIG_SPL_BSS_MAX_SIZE 0x80000 /* 512 KB */ |
diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h index 6f83870868..1d553d7d63 100644 --- a/include/configs/am3517_evm.h +++ b/include/configs/am3517_evm.h | |||
@@ -338,7 +338,8 @@ | |||
338 | #define CONFIG_SPL_BOARD_INIT | 338 | #define CONFIG_SPL_BOARD_INIT |
339 | #define CONFIG_SPL_NAND_SIMPLE | 339 | #define CONFIG_SPL_NAND_SIMPLE |
340 | #define CONFIG_SPL_TEXT_BASE 0x40200000 | 340 | #define CONFIG_SPL_TEXT_BASE 0x40200000 |
341 | #define CONFIG_SPL_MAX_SIZE (64 * 1024) | 341 | #define CONFIG_SPL_MAX_SIZE (SRAM_SCRATCH_SPACE_ADDR - \ |
342 | CONFIG_SPL_TEXT_BASE) | ||
342 | 343 | ||
343 | #define CONFIG_SPL_BSS_START_ADDR 0x80000000 | 344 | #define CONFIG_SPL_BSS_START_ADDR 0x80000000 |
344 | #define CONFIG_SPL_BSS_MAX_SIZE 0x80000 /* 512 KB */ | 345 | #define CONFIG_SPL_BSS_MAX_SIZE 0x80000 /* 512 KB */ |
diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h index a3eefc9956..f805c21f26 100644 --- a/include/configs/am43xx_evm.h +++ b/include/configs/am43xx_evm.h | |||
@@ -38,9 +38,6 @@ | |||
38 | 38 | ||
39 | /* SPL defines. */ | 39 | /* SPL defines. */ |
40 | #define CONFIG_SPL_TEXT_BASE CONFIG_ISW_ENTRY_ADDR | 40 | #define CONFIG_SPL_TEXT_BASE CONFIG_ISW_ENTRY_ADDR |
41 | #define CONFIG_SPL_MAX_SIZE (NON_SECURE_SRAM_END - \ | ||
42 | CONFIG_PUB_ROM_DATA_SIZE - \ | ||
43 | CONFIG_SPL_TEXT_BASE) | ||
44 | #define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_SDRAM_BASE + \ | 41 | #define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_SDRAM_BASE + \ |
45 | (128 << 20)) | 42 | (128 << 20)) |
46 | #define CONFIG_SPL_POWER_SUPPORT | 43 | #define CONFIG_SPL_POWER_SUPPORT |
diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h index 3aa3fad364..225c0ccd8a 100644 --- a/include/configs/am57xx_evm.h +++ b/include/configs/am57xx_evm.h | |||
@@ -163,8 +163,6 @@ | |||
163 | #ifdef CONFIG_SPL_BUILD | 163 | #ifdef CONFIG_SPL_BUILD |
164 | #undef CONFIG_DM_SPI | 164 | #undef CONFIG_DM_SPI |
165 | #undef CONFIG_DM_SPI_FLASH | 165 | #undef CONFIG_DM_SPI_FLASH |
166 | #undef CONFIG_SPL_MAX_SIZE | ||
167 | #define CONFIG_SPL_MAX_SIZE (256 << 10) /* 256 KiB */ | ||
168 | #endif | 166 | #endif |
169 | 167 | ||
170 | /* SPI SPL */ | 168 | /* SPI SPL */ |
diff --git a/include/configs/bur_am335x_common.h b/include/configs/bur_am335x_common.h index a94b1e2711..a6a4f0c943 100644 --- a/include/configs/bur_am335x_common.h +++ b/include/configs/bur_am335x_common.h | |||
@@ -47,10 +47,12 @@ | |||
47 | * area between 0x402F0400 and 0x4030B800 as a download area and | 47 | * area between 0x402F0400 and 0x4030B800 as a download area and |
48 | * 0x4030B800 to 0x4030CE00 as a public stack area. The ROM also | 48 | * 0x4030B800 to 0x4030CE00 as a public stack area. The ROM also |
49 | * supports X-MODEM loading via UART, and we leverage this and then use | 49 | * supports X-MODEM loading via UART, and we leverage this and then use |
50 | * Y-MODEM to load u-boot.img, when booted over UART. | 50 | * Y-MODEM to load u-boot.img, when booted over UART. We must also include |
51 | * the scratch space that U-Boot uses in SRAM. | ||
51 | */ | 52 | */ |
52 | #define CONFIG_SPL_TEXT_BASE 0x402F0400 | 53 | #define CONFIG_SPL_TEXT_BASE 0x402F0400 |
53 | #define CONFIG_SPL_MAX_SIZE (0x4030B800 - CONFIG_SPL_TEXT_BASE) | 54 | #define CONFIG_SPL_MAX_SIZE (SRAM_SCRATCH_SPACE_ADDR - \ |
55 | CONFIG_SPL_TEXT_BASE) | ||
54 | 56 | ||
55 | /* | 57 | /* |
56 | * Since SPL did pll and ddr initialization for us, | 58 | * Since SPL did pll and ddr initialization for us, |
diff --git a/include/configs/cm_t35.h b/include/configs/cm_t35.h index 5d581162cb..7deb2f83de 100644 --- a/include/configs/cm_t35.h +++ b/include/configs/cm_t35.h | |||
@@ -347,7 +347,8 @@ | |||
347 | #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000 | 347 | #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000 |
348 | 348 | ||
349 | #define CONFIG_SPL_TEXT_BASE 0x40200800 | 349 | #define CONFIG_SPL_TEXT_BASE 0x40200800 |
350 | #define CONFIG_SPL_MAX_SIZE (54 * 1024) /* 8 KB for stack */ | 350 | #define CONFIG_SPL_MAX_SIZE (SRAM_SCRATCH_SPACE_ADDR - \ |
351 | CONFIG_SPL_TEXT_BASE) | ||
351 | 352 | ||
352 | /* | 353 | /* |
353 | * Use 0x80008000 as TEXT_BASE here for compatibility reasons with the | 354 | * Use 0x80008000 as TEXT_BASE here for compatibility reasons with the |
diff --git a/include/configs/cm_t43.h b/include/configs/cm_t43.h index ee818ede26..a7f669d1bf 100644 --- a/include/configs/cm_t43.h +++ b/include/configs/cm_t43.h | |||
@@ -158,7 +158,6 @@ | |||
158 | 158 | ||
159 | /* SPL defines. */ | 159 | /* SPL defines. */ |
160 | #define CONFIG_SPL_TEXT_BASE 0x40300350 | 160 | #define CONFIG_SPL_TEXT_BASE 0x40300350 |
161 | #define CONFIG_SPL_MAX_SIZE (64 * 1024) | ||
162 | #define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_SDRAM_BASE + (128 << 20)) | 161 | #define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_SDRAM_BASE + (128 << 20)) |
163 | #define CONFIG_SPL_POWER_SUPPORT | 162 | #define CONFIG_SPL_POWER_SUPPORT |
164 | #define CONFIG_SYS_SPI_U_BOOT_OFFS (256 * 1024) | 163 | #define CONFIG_SYS_SPI_U_BOOT_OFFS (256 * 1024) |
diff --git a/include/configs/kc1.h b/include/configs/kc1.h index b08cf2161d..b30aca6047 100644 --- a/include/configs/kc1.h +++ b/include/configs/kc1.h | |||
@@ -120,7 +120,8 @@ | |||
120 | #define CONFIG_SPL_FRAMEWORK | 120 | #define CONFIG_SPL_FRAMEWORK |
121 | 121 | ||
122 | #define CONFIG_SPL_TEXT_BASE 0x40300000 | 122 | #define CONFIG_SPL_TEXT_BASE 0x40300000 |
123 | #define CONFIG_SPL_MAX_SIZE (48 * 1024) | 123 | #define CONFIG_SPL_MAX_SIZE (SRAM_SCRATCH_SPACE_ADDR - \ |
124 | CONFIG_SPL_TEXT_BASE) | ||
124 | #define CONFIG_SPL_BSS_START_ADDR 0x80000000 | 125 | #define CONFIG_SPL_BSS_START_ADDR 0x80000000 |
125 | #define CONFIG_SPL_BSS_MAX_SIZE (512 * 1024) | 126 | #define CONFIG_SPL_BSS_MAX_SIZE (512 * 1024) |
126 | #define CONFIG_SYS_SPL_MALLOC_START 0x80208000 | 127 | #define CONFIG_SYS_SPL_MALLOC_START 0x80208000 |
diff --git a/include/configs/omap3_evm_common.h b/include/configs/omap3_evm_common.h index 01336ff4d6..4b94571c38 100644 --- a/include/configs/omap3_evm_common.h +++ b/include/configs/omap3_evm_common.h | |||
@@ -258,7 +258,8 @@ | |||
258 | /* Defines for SPL */ | 258 | /* Defines for SPL */ |
259 | #define CONFIG_SPL_FRAMEWORK | 259 | #define CONFIG_SPL_FRAMEWORK |
260 | #define CONFIG_SPL_TEXT_BASE 0x40200800 | 260 | #define CONFIG_SPL_TEXT_BASE 0x40200800 |
261 | #define CONFIG_SPL_MAX_SIZE (54 * 1024) /* 8 KB for stack */ | 261 | #define CONFIG_SPL_MAX_SIZE (SRAM_SCRATCH_SPACE_ADDR - \ |
262 | CONFIG_SPL_TEXT_BASE) | ||
262 | 263 | ||
263 | #define CONFIG_SPL_BSS_START_ADDR 0x80000000 | 264 | #define CONFIG_SPL_BSS_START_ADDR 0x80000000 |
264 | #define CONFIG_SPL_BSS_MAX_SIZE 0x80000 /* 512 KB */ | 265 | #define CONFIG_SPL_BSS_MAX_SIZE 0x80000 /* 512 KB */ |
diff --git a/include/configs/omap3_igep00x0.h b/include/configs/omap3_igep00x0.h index 547aa69e34..fbdaa95f9e 100644 --- a/include/configs/omap3_igep00x0.h +++ b/include/configs/omap3_igep00x0.h | |||
@@ -19,11 +19,11 @@ | |||
19 | #include <configs/ti_omap3_common.h> | 19 | #include <configs/ti_omap3_common.h> |
20 | #include <asm/mach-types.h> | 20 | #include <asm/mach-types.h> |
21 | 21 | ||
22 | /* SRAM starts at 0x40200000 and ends at 0x4020FFFF (64KB) */ | 22 | /* |
23 | #undef CONFIG_SPL_MAX_SIZE | 23 | * We are only ever GP parts and will utilize all of the "downloaded image" |
24 | * area in SRAM which starts at 0x40200000 and ends at 0x4020FFFF (64KB). | ||
25 | */ | ||
24 | #undef CONFIG_SPL_TEXT_BASE | 26 | #undef CONFIG_SPL_TEXT_BASE |
25 | |||
26 | #define CONFIG_SPL_MAX_SIZE (SRAM_SCRATCH_SPACE_ADDR - CONFIG_SPL_TEXT_BASE) | ||
27 | #define CONFIG_SPL_TEXT_BASE 0x40200000 | 27 | #define CONFIG_SPL_TEXT_BASE 0x40200000 |
28 | 28 | ||
29 | #define CONFIG_MISC_INIT_R | 29 | #define CONFIG_MISC_INIT_R |
diff --git a/include/configs/omap3_logic.h b/include/configs/omap3_logic.h index 282626f09c..9f850cd4f1 100644 --- a/include/configs/omap3_logic.h +++ b/include/configs/omap3_logic.h | |||
@@ -30,11 +30,13 @@ | |||
30 | 30 | ||
31 | #include <configs/ti_omap3_common.h> | 31 | #include <configs/ti_omap3_common.h> |
32 | 32 | ||
33 | /* Override default SPL info to minimize empty space and allow BCH8 in SPL */ | 33 | /* |
34 | * We are only ever GP parts and will utilize all of the "downloaded image" | ||
35 | * area in SRAM which starts at 0x40200000 and ends at 0x4020FFFF (64KB) in | ||
36 | * order to allow for BCH8 to fit in. | ||
37 | */ | ||
34 | #undef CONFIG_SPL_TEXT_BASE | 38 | #undef CONFIG_SPL_TEXT_BASE |
35 | #undef CONFIG_SPL_MAX_SIZE | 39 | #define CONFIG_SPL_TEXT_BASE 0x40200000 |
36 | #define CONFIG_SPL_TEXT_BASE 0x40200000 | ||
37 | #define CONFIG_SPL_MAX_SIZE (SRAM_SCRATCH_SPACE_ADDR - CONFIG_SPL_TEXT_BASE) | ||
38 | 40 | ||
39 | #define CONFIG_BOARD_LATE_INIT | 41 | #define CONFIG_BOARD_LATE_INIT |
40 | #define CONFIG_MISC_INIT_R /* misc_init_r dumps the die id */ | 42 | #define CONFIG_MISC_INIT_R /* misc_init_r dumps the die id */ |
diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h index 4d790e9b87..85e011736c 100644 --- a/include/configs/omap3_overo.h +++ b/include/configs/omap3_overo.h | |||
@@ -11,10 +11,12 @@ | |||
11 | #define CONFIG_NAND | 11 | #define CONFIG_NAND |
12 | 12 | ||
13 | #include <configs/ti_omap3_common.h> | 13 | #include <configs/ti_omap3_common.h> |
14 | #undef CONFIG_SPL_MAX_SIZE | 14 | /* |
15 | * We are only ever GP parts and will utilize all of the "downloaded image" | ||
16 | * area in SRAM which starts at 0x40200000 and ends at 0x4020FFFF (64KB). | ||
17 | */ | ||
15 | #undef CONFIG_SPL_TEXT_BASE | 18 | #undef CONFIG_SPL_TEXT_BASE |
16 | #define CONFIG_SPL_TEXT_BASE 0x40200000 | 19 | #define CONFIG_SPL_TEXT_BASE 0x40200000 |
17 | #define CONFIG_SPL_MAX_SIZE (SRAM_SCRATCH_SPACE_ADDR - CONFIG_SPL_TEXT_BASE) | ||
18 | 20 | ||
19 | #define CONFIG_BCH | 21 | #define CONFIG_BCH |
20 | 22 | ||
diff --git a/include/configs/siemens-am33x-common.h b/include/configs/siemens-am33x-common.h index dfc928d33b..0cbfbdf7f0 100644 --- a/include/configs/siemens-am33x-common.h +++ b/include/configs/siemens-am33x-common.h | |||
@@ -124,7 +124,8 @@ | |||
124 | /* Defines for SPL */ | 124 | /* Defines for SPL */ |
125 | #define CONFIG_SPL_FRAMEWORK | 125 | #define CONFIG_SPL_FRAMEWORK |
126 | #define CONFIG_SPL_TEXT_BASE 0x402F0400 | 126 | #define CONFIG_SPL_TEXT_BASE 0x402F0400 |
127 | #define CONFIG_SPL_MAX_SIZE (101 * 1024) | 127 | #define CONFIG_SPL_MAX_SIZE (SRAM_SCRATCH_SPACE_ADDR - \ |
128 | CONFIG_SPL_TEXT_BASE) | ||
128 | 129 | ||
129 | #define CONFIG_SPL_BSS_START_ADDR 0x80000000 | 130 | #define CONFIG_SPL_BSS_START_ADDR 0x80000000 |
130 | #define CONFIG_SPL_BSS_MAX_SIZE 0x80000 /* 512 KB */ | 131 | #define CONFIG_SPL_BSS_MAX_SIZE 0x80000 /* 512 KB */ |
diff --git a/include/configs/sniper.h b/include/configs/sniper.h index fb348a5cd2..cd303c3c20 100644 --- a/include/configs/sniper.h +++ b/include/configs/sniper.h | |||
@@ -128,7 +128,8 @@ | |||
128 | #define CONFIG_SPL_FRAMEWORK | 128 | #define CONFIG_SPL_FRAMEWORK |
129 | 129 | ||
130 | #define CONFIG_SPL_TEXT_BASE 0x40200000 | 130 | #define CONFIG_SPL_TEXT_BASE 0x40200000 |
131 | #define CONFIG_SPL_MAX_SIZE (54 * 1024) | 131 | #define CONFIG_SPL_MAX_SIZE (SRAM_SCRATCH_SPACE_ADDR - \ |
132 | CONFIG_SPL_TEXT_BASE) | ||
132 | #define CONFIG_SPL_BSS_START_ADDR 0x80000000 | 133 | #define CONFIG_SPL_BSS_START_ADDR 0x80000000 |
133 | #define CONFIG_SPL_BSS_MAX_SIZE (512 * 1024) | 134 | #define CONFIG_SPL_BSS_MAX_SIZE (512 * 1024) |
134 | #define CONFIG_SYS_SPL_MALLOC_START 0x80208000 | 135 | #define CONFIG_SYS_SPL_MALLOC_START 0x80208000 |
diff --git a/include/configs/tam3517-common.h b/include/configs/tam3517-common.h index efdc70622f..4dfe74f06f 100644 --- a/include/configs/tam3517-common.h +++ b/include/configs/tam3517-common.h | |||
@@ -219,6 +219,8 @@ | |||
219 | 219 | ||
220 | #define CONFIG_SPL_TEXT_BASE 0x40200000 /*CONFIG_SYS_SRAM_START*/ | 220 | #define CONFIG_SPL_TEXT_BASE 0x40200000 /*CONFIG_SYS_SRAM_START*/ |
221 | #define CONFIG_SPL_MAX_SIZE (54 * 1024) /* 8 KB for stack */ | 221 | #define CONFIG_SPL_MAX_SIZE (54 * 1024) /* 8 KB for stack */ |
222 | #define CONFIG_SPL_MAX_SIZE (SRAM_SCRATCH_SPACE_ADDR - \ | ||
223 | CONFIG_SPL_TEXT_BASE) | ||
222 | 224 | ||
223 | #define CONFIG_SYS_SPL_MALLOC_START 0x8f000000 | 225 | #define CONFIG_SYS_SPL_MALLOC_START 0x8f000000 |
224 | #define CONFIG_SYS_SPL_MALLOC_SIZE 0x80000 | 226 | #define CONFIG_SYS_SPL_MALLOC_SIZE 0x80000 |
diff --git a/include/configs/tao3530.h b/include/configs/tao3530.h index 4d66dd2407..68ad266d9b 100644 --- a/include/configs/tao3530.h +++ b/include/configs/tao3530.h | |||
@@ -329,7 +329,8 @@ | |||
329 | #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000 | 329 | #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000 |
330 | 330 | ||
331 | #define CONFIG_SPL_TEXT_BASE 0x40200800 | 331 | #define CONFIG_SPL_TEXT_BASE 0x40200800 |
332 | #define CONFIG_SPL_MAX_SIZE (54 * 1024) /* 8 KB for stack */ | 332 | #define CONFIG_SPL_MAX_SIZE (SRAM_SCRATCH_SPACE_ADDR - \ |
333 | CONFIG_SPL_TEXT_BASE) | ||
333 | 334 | ||
334 | /* | 335 | /* |
335 | * Use 0x80008000 as TEXT_BASE here for compatibility reasons with the | 336 | * Use 0x80008000 as TEXT_BASE here for compatibility reasons with the |
diff --git a/include/configs/ti814x_evm.h b/include/configs/ti814x_evm.h index 09f8e8fe5c..e61cd78939 100644 --- a/include/configs/ti814x_evm.h +++ b/include/configs/ti814x_evm.h | |||
@@ -160,7 +160,8 @@ | |||
160 | /* Defines for SPL */ | 160 | /* Defines for SPL */ |
161 | #define CONFIG_SPL_FRAMEWORK | 161 | #define CONFIG_SPL_FRAMEWORK |
162 | #define CONFIG_SPL_TEXT_BASE 0x40300000 | 162 | #define CONFIG_SPL_TEXT_BASE 0x40300000 |
163 | #define CONFIG_SPL_MAX_SIZE ((128 - 18) * 1024) | 163 | #define CONFIG_SPL_MAX_SIZE (SRAM_SCRATCH_SPACE_ADDR - \ |
164 | CONFIG_SPL_TEXT_BASE) | ||
164 | 165 | ||
165 | #define CONFIG_SPL_BSS_START_ADDR 0x80000000 | 166 | #define CONFIG_SPL_BSS_START_ADDR 0x80000000 |
166 | #define CONFIG_SPL_BSS_MAX_SIZE 0x80000 /* 512 KB */ | 167 | #define CONFIG_SPL_BSS_MAX_SIZE 0x80000 /* 512 KB */ |
diff --git a/include/configs/ti816x_evm.h b/include/configs/ti816x_evm.h index 2e84dd27e4..85c575dd8d 100644 --- a/include/configs/ti816x_evm.h +++ b/include/configs/ti816x_evm.h | |||
@@ -126,7 +126,8 @@ | |||
126 | /* Defines for SPL */ | 126 | /* Defines for SPL */ |
127 | #define CONFIG_SPL_FRAMEWORK | 127 | #define CONFIG_SPL_FRAMEWORK |
128 | #define CONFIG_SPL_TEXT_BASE 0x40400000 | 128 | #define CONFIG_SPL_TEXT_BASE 0x40400000 |
129 | #define CONFIG_SPL_MAX_SIZE ((128 - 18) * 1024) | 129 | #define CONFIG_SPL_MAX_SIZE (SRAM_SCRATCH_SPACE_ADDR - \ |
130 | CONFIG_SPL_TEXT_BASE) | ||
130 | 131 | ||
131 | #define CONFIG_SPL_BSS_START_ADDR 0x80000000 | 132 | #define CONFIG_SPL_BSS_START_ADDR 0x80000000 |
132 | #define CONFIG_SPL_BSS_MAX_SIZE 0x80000 /* 512 KB */ | 133 | #define CONFIG_SPL_BSS_MAX_SIZE 0x80000 /* 512 KB */ |
diff --git a/include/configs/ti_am335x_common.h b/include/configs/ti_am335x_common.h index 52f4ed66db..fb4e82fe8e 100644 --- a/include/configs/ti_am335x_common.h +++ b/include/configs/ti_am335x_common.h | |||
@@ -58,7 +58,6 @@ | |||
58 | * Y-MODEM to load u-boot.img, when booted over UART. | 58 | * Y-MODEM to load u-boot.img, when booted over UART. |
59 | */ | 59 | */ |
60 | #define CONFIG_SPL_TEXT_BASE CONFIG_ISW_ENTRY_ADDR | 60 | #define CONFIG_SPL_TEXT_BASE CONFIG_ISW_ENTRY_ADDR |
61 | #define CONFIG_SPL_MAX_SIZE (0x4030B800 - CONFIG_SPL_TEXT_BASE) | ||
62 | #define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_SDRAM_BASE + \ | 61 | #define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_SDRAM_BASE + \ |
63 | (128 << 20)) | 62 | (128 << 20)) |
64 | 63 | ||
diff --git a/include/configs/ti_omap3_common.h b/include/configs/ti_omap3_common.h index 32877d1964..843f87d930 100644 --- a/include/configs/ti_omap3_common.h +++ b/include/configs/ti_omap3_common.h | |||
@@ -70,7 +70,6 @@ | |||
70 | 70 | ||
71 | /* SPL */ | 71 | /* SPL */ |
72 | #define CONFIG_SPL_TEXT_BASE 0x40200800 | 72 | #define CONFIG_SPL_TEXT_BASE 0x40200800 |
73 | #define CONFIG_SPL_MAX_SIZE (54 * 1024) | ||
74 | #define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds" | 73 | #define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds" |
75 | #define CONFIG_SPL_POWER_SUPPORT | 74 | #define CONFIG_SPL_POWER_SUPPORT |
76 | #define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_SDRAM_BASE + \ | 75 | #define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_SDRAM_BASE + \ |
diff --git a/include/configs/ti_omap4_common.h b/include/configs/ti_omap4_common.h index fb9a0ce42f..99873e2b07 100644 --- a/include/configs/ti_omap4_common.h +++ b/include/configs/ti_omap4_common.h | |||
@@ -146,7 +146,6 @@ | |||
146 | * So moving TEXT_BASE down to non-HS limit. | 146 | * So moving TEXT_BASE down to non-HS limit. |
147 | */ | 147 | */ |
148 | #define CONFIG_SPL_TEXT_BASE 0x40300000 | 148 | #define CONFIG_SPL_TEXT_BASE 0x40300000 |
149 | #define CONFIG_SPL_MAX_SIZE (0x4030C000 - CONFIG_SPL_TEXT_BASE) | ||
150 | #define CONFIG_SPL_DISPLAY_PRINT | 149 | #define CONFIG_SPL_DISPLAY_PRINT |
151 | #define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds" | 150 | #define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds" |
152 | #define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_SDRAM_BASE + \ | 151 | #define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_SDRAM_BASE + \ |
diff --git a/include/configs/ti_omap5_common.h b/include/configs/ti_omap5_common.h index 4fac47fecd..360860f3ca 100644 --- a/include/configs/ti_omap5_common.h +++ b/include/configs/ti_omap5_common.h | |||
@@ -165,11 +165,6 @@ | |||
165 | #endif | 165 | #endif |
166 | 166 | ||
167 | /* DRA7xx/AM57xx have 512K of SRAM, OMAP5 only 128K */ | 167 | /* DRA7xx/AM57xx have 512K of SRAM, OMAP5 only 128K */ |
168 | #if defined(CONFIG_DRA7XX) | ||
169 | #define CONFIG_SPL_BOOT_END 0x4037E000 | ||
170 | #else | ||
171 | #define CONFIG_SPL_BOOT_END 0x4031E000 | ||
172 | #endif | ||
173 | #define CONFIG_SPL_DISPLAY_PRINT | 168 | #define CONFIG_SPL_DISPLAY_PRINT |
174 | #define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds" | 169 | #define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds" |
175 | #define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_SDRAM_BASE + \ | 170 | #define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_SDRAM_BASE + \ |
diff --git a/include/configs/tricorder.h b/include/configs/tricorder.h index 855d789c18..289aaffef1 100644 --- a/include/configs/tricorder.h +++ b/include/configs/tricorder.h | |||
@@ -342,7 +342,8 @@ | |||
342 | #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 /* address 0x60000 */ | 342 | #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 /* address 0x60000 */ |
343 | 343 | ||
344 | #define CONFIG_SPL_TEXT_BASE 0x40200000 /*CONFIG_SYS_SRAM_START*/ | 344 | #define CONFIG_SPL_TEXT_BASE 0x40200000 /*CONFIG_SYS_SRAM_START*/ |
345 | #define CONFIG_SPL_MAX_SIZE (57 * 1024) /* 7 KB for stack */ | 345 | #define CONFIG_SPL_MAX_SIZE (SRAM_SCRATCH_SPACE_ADDR - \ |
346 | CONFIG_SPL_TEXT_BASE) | ||
346 | 347 | ||
347 | #define CONFIG_SPL_BSS_START_ADDR 0x80000000 /*CONFIG_SYS_SDRAM_BASE*/ | 348 | #define CONFIG_SPL_BSS_START_ADDR 0x80000000 /*CONFIG_SYS_SDRAM_BASE*/ |
348 | #define CONFIG_SPL_BSS_MAX_SIZE 0x80000 | 349 | #define CONFIG_SPL_BSS_MAX_SIZE 0x80000 |