From: Nobuhiro Iwamatsu Date: Wed, 8 Jan 2014 01:32:24 +0000 (+0900) Subject: arm: koelsch: Add support QSPI device and enable boot from SPI flash X-Git-Url: http://git.dujemihanovic.xyz/img/static/gitweb.css?a=commitdiff_plain;h=c71b4dd2da0dcddabd7c29e6c3dc8a495d4bd928;p=u-boot.git arm: koelsch: Add support QSPI device and enable boot from SPI flash This supports SH-QSPI device on koelsch board, and enable booting from SPI flash. Signed-off-by: Nobuhiro Iwamatsu Signed-off-by: Nobuhiro Iwamatsu --- diff --git a/include/configs/koelsch.h b/include/configs/koelsch.h index f8cca5b281..cc3c7a8e6a 100644 --- a/include/configs/koelsch.h +++ b/include/configs/koelsch.h @@ -31,7 +31,16 @@ #define CONFIG_CMD_DHCP #define CONFIG_CMD_NFS #define CONFIG_CMD_BOOTZ + +#if defined(CONFIG_SYS_USE_BOOT_NORFLASH) #define CONFIG_CMD_FLASH +#define CONFIG_SYS_TEXT_BASE 0x00000000 +#else +/* SPI flash boot is default. */ +#define CONFIG_CMD_SF +#define CONFIG_CMD_SPI +#define CONFIG_SYS_TEXT_BASE 0xE6304000 +#endif #define CONFIG_CMDLINE_TAG #define CONFIG_SETUP_MEMORY_TAGS @@ -101,7 +110,7 @@ #define CONFIG_SYS_BOOTMAPSZ (8 * 1024 * 1024) /* FLASH */ -#define CONFIG_SYS_TEXT_BASE 0x00000000 +#if defined(CONFIG_SYS_USE_BOOT_NORFLASH) #define CONFIG_SYS_FLASH_CFI #define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT #define CONFIG_FLASH_CFI_DRIVER @@ -117,13 +126,28 @@ #define CONFIG_SYS_FLASH_WRITE_TOUT 3000 #define CONFIG_SYS_FLASH_LOCK_TOUT 3000 #define CONFIG_SYS_FLASH_UNLOCK_TOUT 3000 - /* ENV setting */ #define CONFIG_ENV_IS_IN_FLASH -#define CONFIG_ENV_OVERWRITE 1 -#define CONFIG_ENV_SECT_SIZE (256 * 1024) #define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + \ CONFIG_SYS_MONITOR_LEN) + +#else /* CONFIG_SYS_USE_BOOT_NORFLASH */ + +#define CONFIG_SYS_NO_FLASH +#define CONFIG_SPI +#define CONFIG_SH_QSPI +#define CONFIG_SPI_FLASH +#define CONFIG_SPI_FLASH_BAR +#define CONFIG_SPI_FLASH_SPANSION +/* ENV setting */ +#define CONFIG_ENV_IS_IN_SPI_FLASH +#define CONFIG_ENV_ADDR 0xC0000 + +#endif /* CONFIG_SYS_USE_BOOT_NORFLASH */ + +/* Common ENV setting */ +#define CONFIG_ENV_OVERWRITE +#define CONFIG_ENV_SECT_SIZE (256 * 1024) #define CONFIG_ENV_OFFSET (CONFIG_ENV_ADDR) #define CONFIG_ENV_SIZE (CONFIG_ENV_SECT_SIZE) #define CONFIG_ENV_SIZE_REDUND (CONFIG_SYS_MONITOR_LEN)