diff options
author | Bo Shen <voice.shen@atmel.com> | 2012-08-19 20:32:24 +0000 |
---|---|---|
committer | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2012-09-01 17:06:14 +0200 |
commit | 1d7442e653ff1cad27dcfc2a2c19842e564e4bc3 (patch) | |
tree | d8f7a0b26dc6298661e2118e2b36d9932639d3aa | |
parent | 3083efe212826163e13c55abee46b22238301ea6 (diff) | |
download | u-boot-imx-1d7442e653ff1cad27dcfc2a2c19842e564e4bc3.zip u-boot-imx-1d7442e653ff1cad27dcfc2a2c19842e564e4bc3.tar.gz u-boot-imx-1d7442e653ff1cad27dcfc2a2c19842e564e4bc3.tar.bz2 |
atmel: at91sam9x5: add spi flash boot support
Add at91sam9x5 series spi flash boot support
Using at91sam9x5ek_spiflash to configure, then it can boot from at25df321
serial flash
SPI mater work in 30Mhz speed, while not 1Mhz speed. This will base on
atmel_spi patch, or else, it will occur receive overrun
Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
-rw-r--r-- | boards.cfg | 1 | ||||
-rw-r--r-- | include/configs/at91sam9x5ek.h | 20 |
2 files changed, 17 insertions, 4 deletions
@@ -96,6 +96,7 @@ at91sam9m10g45ek_nandflash arm arm926ejs at91sam9m10g45ek atmel at91sam9rlek_dataflash arm arm926ejs at91sam9rlek atmel at91 at91sam9rlek:AT91SAM9RL,SYS_USE_DATAFLASH at91sam9rlek_nandflash arm arm926ejs at91sam9rlek atmel at91 at91sam9rlek:AT91SAM9RL,SYS_USE_NANDFLASH at91sam9x5ek_nandflash arm arm926ejs at91sam9x5ek atmel at91 at91sam9x5ek:AT91SAM9X5,SYS_USE_NANDFLASH +at91sam9x5ek_spiflash arm arm926ejs at91sam9x5ek atmel at91 at91sam9x5ek:AT91SAM9X5,SYS_USE_SPIFLASH at91sam9xeek_dataflash_cs0 arm arm926ejs at91sam9260ek atmel at91 at91sam9260ek:AT91SAM9XE,SYS_USE_DATAFLASH_CS0 at91sam9xeek_dataflash_cs1 arm arm926ejs at91sam9260ek atmel at91 at91sam9260ek:AT91SAM9XE,SYS_USE_DATAFLASH_CS1 at91sam9xeek_nandflash arm arm926ejs at91sam9260ek atmel at91 at91sam9260ek:AT91SAM9XE,SYS_USE_NANDFLASH diff --git a/include/configs/at91sam9x5ek.h b/include/configs/at91sam9x5ek.h index 82f6b48..5cae6bd 100644 --- a/include/configs/at91sam9x5ek.h +++ b/include/configs/at91sam9x5ek.h @@ -86,6 +86,7 @@ #define CONFIG_CMD_PING #define CONFIG_CMD_DHCP #define CONFIG_CMD_NAND +#define CONFIG_CMD_SF /* SDRAM */ #define CONFIG_NR_DRAM_BANKS 1 @@ -96,12 +97,11 @@ (CONFIG_SYS_SDRAM_BASE + 4 * 1024 - GENERATED_GBL_DATA_SIZE) /* DataFlash */ -#ifdef CONFIG_ATMEL_SPI -#define CONFIG_CMD_SF -#define CONFIG_CMD_SPI +#ifdef CONFIG_CMD_SF +#define CONFIG_ATMEL_SPI #define CONFIG_SPI_FLASH #define CONFIG_SPI_FLASH_ATMEL -#define CONFIG_SYS_MAX_DATAFLASH_BANKS +#define CONFIG_SF_DEFAULT_SPEED 30000000 #endif /* no NOR flash */ @@ -149,6 +149,18 @@ #define CONFIG_BOOTCOMMAND "nand read " \ "0x22000000 0x200000 0x300000; " \ "bootm 0x22000000" +#else +#ifdef CONFIG_SYS_USE_SPIFLASH +/* bootstrap + u-boot + env + linux in spi flash */ +#define CONFIG_ENV_IS_IN_SPI_FLASH +#define CONFIG_ENV_OFFSET 0x5000 +#define CONFIG_ENV_SIZE 0x3000 +#define CONFIG_ENV_SECT_SIZE 0x1000 +#define CONFIG_ENV_SPI_MAX_HZ 30000000 +#define CONFIG_BOOTCOMMAND "sf probe 0; " \ + "sf read 0x22000000 0x100000 0x300000; " \ + "bootm 0x22000000" +#endif #endif #define CONFIG_BOOTARGS "mem=128M console=ttyS0,115200 " \ |