Commit 7a53b9544e388ac80bff2a3912865df029de27d0
Committed by
Andreas Bießmann
1 parent
dc018fef2f
Exists in
v2017.01-smarct4x
and in
30 other branches
ARM: at91: sama5: update the spi flash mapping
Also move the spi flash configurations to the at91-sama5_common.h. Current at91 zImage size is about 3.3M, the old mapping is not suitable. So update the spi flash map as following: 0x0 ~ 0x004000: at91bootstrap(16k) 0x04000 ~ 0x008000: u-boot env(16k) 0x08000 ~ 0x060000: u-boot(352k) 0x60000 ~ 0x06c000: dtb (48k) 0x6c000 ~ 0x400000: kernel (3M+592k) In AT91Bootstrap, the U-Boot in spi flash also update to 0x8000, refer to following commit in AT91Bootstrap: 3e91e54 Kconfig: fix spi flash address So also update SPL's u-boot load address to 0x8000 in spi flash. Signed-off-by: Josh Wu <josh.wu@atmel.com> Reviewed-by: Jagan Teki <jteki@openedev.com>
Showing 4 changed files with 16 additions and 33 deletions Side-by-side Diff
include/configs/at91-sama5_common.h
... | ... | @@ -87,6 +87,16 @@ |
87 | 87 | #define CONFIG_BOOTCOMMAND "nand read 0x21000000 0x180000 0x80000;" \ |
88 | 88 | "nand read 0x22000000 0x200000 0x600000;" \ |
89 | 89 | "bootz 0x22000000 - 0x21000000" |
90 | +#elif CONFIG_SYS_USE_SERIALFLASH | |
91 | +/* u-boot env in serial flash, by default is bus 0 and cs 0 */ | |
92 | +#define CONFIG_ENV_IS_IN_SPI_FLASH | |
93 | +#define CONFIG_ENV_OFFSET 0x4000 | |
94 | +#define CONFIG_ENV_SIZE 0x4000 | |
95 | +#define CONFIG_ENV_SECT_SIZE 0x1000 | |
96 | +#define CONFIG_BOOTCOMMAND "sf probe 0; " \ | |
97 | + "sf read 0x21000000 0x60000 0xc000; " \ | |
98 | + "sf read 0x22000000 0x6c000 0x394000; " \ | |
99 | + "bootz 0x22000000 - 0x21000000" | |
90 | 100 | #endif |
91 | 101 | |
92 | 102 | #endif |
include/configs/sama5d3xek.h
... | ... | @@ -156,14 +156,7 @@ |
156 | 156 | #define CONFIG_SYS_LOAD_ADDR 0x22000000 /* load address */ |
157 | 157 | |
158 | 158 | #ifdef CONFIG_SYS_USE_SERIALFLASH |
159 | -/* bootstrap + u-boot + env + linux in serial flash */ | |
160 | -#define CONFIG_ENV_IS_IN_SPI_FLASH | |
161 | -#define CONFIG_ENV_OFFSET 0x5000 | |
162 | -#define CONFIG_ENV_SIZE 0x3000 | |
163 | -#define CONFIG_ENV_SECT_SIZE 0x1000 | |
164 | -#define CONFIG_BOOTCOMMAND "sf probe 0; " \ | |
165 | - "sf read 0x22000000 0x42000 0x300000; " \ | |
166 | - "bootm 0x22000000" | |
159 | +/* override the bootcmd, bootargs and other configuration for spi flash env*/ | |
167 | 160 | #elif CONFIG_SYS_USE_NANDFLASH |
168 | 161 | /* override the bootcmd, bootargs and other configuration nandflash env */ |
169 | 162 | #elif CONFIG_SYS_USE_MMC |
... | ... | @@ -216,7 +209,7 @@ |
216 | 209 | #define CONFIG_SPL_SPI_SUPPORT |
217 | 210 | #define CONFIG_SPL_SPI_FLASH_SUPPORT |
218 | 211 | #define CONFIG_SPL_SPI_LOAD |
219 | -#define CONFIG_SYS_SPI_U_BOOT_OFFS 0x8400 | |
212 | +#define CONFIG_SYS_SPI_U_BOOT_OFFS 0x8000 | |
220 | 213 | |
221 | 214 | #endif |
222 | 215 |
include/configs/sama5d4_xplained.h
... | ... | @@ -117,17 +117,7 @@ |
117 | 117 | #endif |
118 | 118 | |
119 | 119 | #ifdef CONFIG_SYS_USE_SERIALFLASH |
120 | -/* bootstrap + u-boot + env + linux in serial flash */ | |
121 | -#define CONFIG_ENV_IS_IN_SPI_FLASH | |
122 | -#define CONFIG_ENV_SPI_BUS CONFIG_SF_DEFAULT_BUS | |
123 | -#define CONFIG_ENV_SPI_CS CONFIG_SF_DEFAULT_CS | |
124 | -#define CONFIG_ENV_OFFSET 0x10000 | |
125 | -#define CONFIG_ENV_SIZE 0x10000 | |
126 | -#define CONFIG_ENV_SECT_SIZE 0x1000 | |
127 | -#define CONFIG_BOOTCOMMAND "sf probe 0; " \ | |
128 | - "sf read 0x21000000 0xa0000 0x60000; " \ | |
129 | - "sf read 0x22000000 0x100000 0x300000; " \ | |
130 | - "bootz 0x22000000 - 0x21000000" | |
120 | +/* override the bootcmd, bootargs and other configuration for spi flash env */ | |
131 | 121 | #elif CONFIG_SYS_USE_NANDFLASH |
132 | 122 | /* override the bootcmd, bootargs and other configuration for nandflash env */ |
133 | 123 | #elif CONFIG_SYS_USE_MMC |
... | ... | @@ -180,7 +170,7 @@ |
180 | 170 | #define CONFIG_SPL_SPI_SUPPORT |
181 | 171 | #define CONFIG_SPL_SPI_FLASH_SUPPORT |
182 | 172 | #define CONFIG_SPL_SPI_LOAD |
183 | -#define CONFIG_SYS_SPI_U_BOOT_OFFS 0x20000 | |
173 | +#define CONFIG_SYS_SPI_U_BOOT_OFFS 0x8000 | |
184 | 174 | |
185 | 175 | #endif |
186 | 176 | #endif |
include/configs/sama5d4ek.h
... | ... | @@ -115,17 +115,7 @@ |
115 | 115 | #define CONFIG_SYS_CONSOLE_IS_IN_ENV |
116 | 116 | |
117 | 117 | #ifdef CONFIG_SYS_USE_SERIALFLASH |
118 | -/* bootstrap + u-boot + env + linux in serial flash */ | |
119 | -#define CONFIG_ENV_IS_IN_SPI_FLASH | |
120 | -#define CONFIG_ENV_SPI_BUS CONFIG_SF_DEFAULT_BUS | |
121 | -#define CONFIG_ENV_SPI_CS CONFIG_SF_DEFAULT_CS | |
122 | -#define CONFIG_ENV_OFFSET 0x10000 | |
123 | -#define CONFIG_ENV_SIZE 0x10000 | |
124 | -#define CONFIG_ENV_SECT_SIZE 0x1000 | |
125 | -#define CONFIG_BOOTCOMMAND "sf probe 0; " \ | |
126 | - "sf read 0x21000000 0xa0000 0x60000; " \ | |
127 | - "sf read 0x22000000 0x100000 0x300000; " \ | |
128 | - "bootz 0x22000000 - 0x21000000" | |
118 | +/* override the bootcmd, bootargs and other configuration for spi flash env*/ | |
129 | 119 | #elif CONFIG_SYS_USE_NANDFLASH |
130 | 120 | /* override the bootcmd, bootargs and other configuration for nandflash env*/ |
131 | 121 | #elif CONFIG_SYS_USE_MMC |
... | ... | @@ -178,7 +168,7 @@ |
178 | 168 | #define CONFIG_SPL_SPI_SUPPORT |
179 | 169 | #define CONFIG_SPL_SPI_FLASH_SUPPORT |
180 | 170 | #define CONFIG_SPL_SPI_LOAD |
181 | -#define CONFIG_SYS_SPI_U_BOOT_OFFS 0x20000 | |
171 | +#define CONFIG_SYS_SPI_U_BOOT_OFFS 0x8000 | |
182 | 172 | |
183 | 173 | #endif |
184 | 174 | #endif |