Commit 4adfcd68cc10449e2fda0f9fac8b09f2b5c09a02
1 parent
427ac8cca3
Exists in
master
and in
53 other branches
am335x evm: Add am335x_evm_spiboot target
This target will move the environment into SPI flash and documents the expected layout. We correct the SPL define for where U-Boot is and remove an unused define. Signed-off-by: Tom Rini <trini@ti.com>
Showing 2 changed files with 24 additions and 2 deletions Side-by-side Diff
boards.cfg
... | ... | @@ -233,6 +233,7 @@ |
233 | 233 | integratorcp_cm946es arm arm946es integrator armltd - integratorcp:CM946ES |
234 | 234 | ca9x4_ct_vxp arm armv7 vexpress armltd |
235 | 235 | am335x_evm arm armv7 am335x ti am33xx am335x_evm:SERIAL1,CONS_INDEX=1 |
236 | +am335x_evm_spiboot arm armv7 am335x ti am33xx am335x_evm:SERIAL1,CONS_INDEX=1,SPI_BOOT | |
236 | 237 | am335x_evm_uart1 arm armv7 am335x ti am33xx am335x_evm:SERIAL2,CONS_INDEX=2 |
237 | 238 | am335x_evm_uart2 arm armv7 am335x ti am33xx am335x_evm:SERIAL3,CONS_INDEX=3 |
238 | 239 | am335x_evm_uart3 arm armv7 am335x ti am33xx am335x_evm:SERIAL4,CONS_INDEX=4 |
include/configs/am335x_evm.h
... | ... | @@ -280,8 +280,7 @@ |
280 | 280 | #define CONFIG_SPL_SPI_LOAD |
281 | 281 | #define CONFIG_SPL_SPI_BUS 0 |
282 | 282 | #define CONFIG_SPL_SPI_CS 0 |
283 | -#define CONFIG_SYS_SPI_U_BOOT_OFFS 0x20000 | |
284 | -#define CONFIG_SYS_SPI_U_BOOT_SIZE 0x40000 | |
283 | +#define CONFIG_SYS_SPI_U_BOOT_OFFS 0x80000 | |
285 | 284 | #define CONFIG_SPL_MUSB_NEW_SUPPORT |
286 | 285 | #define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds" |
287 | 286 | |
... | ... | @@ -371,6 +370,26 @@ |
371 | 370 | #undef CONFIG_EXTRA_ENV_SETTINGS |
372 | 371 | #endif |
373 | 372 | |
373 | +/* | |
374 | + * Default to using SPI for environment, etc. We have multiple copies | |
375 | + * of SPL as the ROM will check these locations. | |
376 | + * 0x0 - 0x20000 : First copy of SPL | |
377 | + * 0x20000 - 0x40000 : Second copy of SPL | |
378 | + * 0x40000 - 0x60000 : Third copy of SPL | |
379 | + * 0x60000 - 0x80000 : Fourth copy of SPL | |
380 | + * 0x80000 - 0xDF000 : U-Boot | |
381 | + * 0xDF000 - 0xE0000 : U-Boot Environment | |
382 | + * 0xE0000 - 0x442000 : Linux Kernel | |
383 | + * 0x442000 - 0x800000 : Userland | |
384 | + */ | |
385 | +#if defined(CONFIG_SPI_BOOT) | |
386 | +# undef CONFIG_ENV_IS_NOWHERE | |
387 | +# define CONFIG_ENV_IS_IN_SPI_FLASH | |
388 | +# define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED | |
389 | +# define CONFIG_ENV_OFFSET (892 << 10) /* 892 KiB in */ | |
390 | +# define CONFIG_ENV_SECT_SIZE (4 << 10) /* 4 KB sectors */ | |
391 | +#endif /* SPI support */ | |
392 | + | |
374 | 393 | /* Unsupported features */ |
375 | 394 | #undef CONFIG_USE_IRQ |
376 | 395 | |
377 | 396 | |
... | ... | @@ -403,10 +422,12 @@ |
403 | 422 | /* CS0 */ |
404 | 423 | #define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of NAND |
405 | 424 | devices */ |
425 | +#if !defined(CONFIG_SPI_BOOT) | |
406 | 426 | #undef CONFIG_ENV_IS_NOWHERE |
407 | 427 | #define CONFIG_ENV_IS_IN_NAND |
408 | 428 | #define CONFIG_ENV_OFFSET 0x260000 /* environment starts here */ |
409 | 429 | #define CONFIG_SYS_ENV_SECT_SIZE (128 << 10) /* 128 KiB */ |
430 | +#endif | |
410 | 431 | #endif |
411 | 432 | |
412 | 433 | #endif /* ! __CONFIG_AM335X_EVM_H */ |