]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: koelsch: Add support QSPI device and enable boot from SPI flash
authorNobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Wed, 8 Jan 2014 01:32:24 +0000 (10:32 +0900)
committerNobuhiro Iwamatsu <iwamatsu@nigauri.org>
Wed, 15 Jan 2014 23:07:20 +0000 (08:07 +0900)
This supports SH-QSPI device on koelsch board, and enable booting from
SPI flash.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
include/configs/koelsch.h

index f8cca5b28106054d8f6d66c6ee52e41e424cff61..cc3c7a8e6a94ebcdb24451433b67069e54285148 100644 (file)
 #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
 #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
 #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)