summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>2014-01-08 01:32:22 (GMT)
committerNobuhiro Iwamatsu <iwamatsu@nigauri.org>2014-01-15 23:07:20 (GMT)
commit0e05b217c2dac0ebd2c888427347eda9e9506cc1 (patch)
tree566ae2e8cb026a2647d6a79a46e965edaafbfb9c
parent22e75d6d60516f45347c399f2d4efa35c30c773b (diff)
downloadu-boot-0e05b217c2dac0ebd2c888427347eda9e9506cc1.tar.xz
arm: lager: Add support QSPI device and enable boot from SPI flash
This supports SH-QSPI device on lager 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>
-rw-r--r--include/configs/lager.h33
1 files changed, 29 insertions, 4 deletions
diff --git a/include/configs/lager.h b/include/configs/lager.h
index 8932825..b6c1954 100644
--- a/include/configs/lager.h
+++ b/include/configs/lager.h
@@ -34,7 +34,15 @@
#define CONFIG_CMD_DHCP
#define CONFIG_CMD_NFS
#define CONFIG_CMD_BOOTZ
-#define CONFIG_CMD_FLASH
+
+#if defined(CONFIG_SYS_USE_BOOT_NORFLASH)
+#define CONFIG_CMD_FLASH
+#define CONFIG_SYS_TEXT_BASE 0x00000000
+#else
+#define CONFIG_CMD_SF
+#define CONFIG_CMD_SPI
+#define CONFIG_SYS_TEXT_BASE 0xE8080000
+#endif
#define CONFIG_CMDLINE_TAG
#define CONFIG_SETUP_MEMORY_TAGS
@@ -104,8 +112,8 @@
#define CONFIG_SYS_GBL_DATA_SIZE (256)
#define CONFIG_SYS_BOOTMAPSZ (8 * 1024 * 1024)
+#if defined(CONFIG_SYS_USE_BOOT_NORFLASH)
/* USE NOR FLASH */
-#define CONFIG_SYS_TEXT_BASE 0x00000000
#define CONFIG_SYS_FLASH_CFI
#define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT
#define CONFIG_FLASH_CFI_DRIVER
@@ -124,10 +132,27 @@
/* 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 */
+
+/* USE SPI */
+#define CONFIG_SPI
+#define CONFIG_SPI_FLASH_BAR
+#define CONFIG_SH_QSPI
+#define CONFIG_SPI_FLASH
+#define CONFIG_SPI_FLASH_SPANSION
+#define CONFIG_SYS_NO_FLASH
+
+/* ENV setting */
+#define CONFIG_ENV_IS_IN_SPI_FLASH
+#define CONFIG_ENV_ADDR 0xC0000
+#endif
+
+/* 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)