summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2015-07-21 07:50:03 +0200
committerMarek Vasut <marex@denx.de>2015-08-08 14:14:08 +0200
commit346d6f5667d3ab6e0a7b550d9789d3365a12478a (patch)
tree85e99361f11d39a1dc171536b14ea7bac3924297
parentd3f34e752dd432eb75e50b2f2ab44d0849b3deef (diff)
downloadtalos-obmc-uboot-346d6f5667d3ab6e0a7b550d9789d3365a12478a.tar.gz
talos-obmc-uboot-346d6f5667d3ab6e0a7b550d9789d3365a12478a.zip
arm: socfpga: spl: Add support for booting from QSPI
Add code and configuration options to support booting from QSPI NOR. Enable support for booting from QSPI NOR. Signed-off-by: Marek Vasut <marex@denx.de>
-rw-r--r--arch/arm/mach-socfpga/spl.c5
-rw-r--r--configs/socfpga_arria5_defconfig5
-rw-r--r--configs/socfpga_cyclone5_defconfig5
-rw-r--r--configs/socfpga_socrates_defconfig5
-rw-r--r--include/configs/socfpga_common.h9
5 files changed, 28 insertions, 1 deletions
diff --git a/arch/arm/mach-socfpga/spl.c b/arch/arm/mach-socfpga/spl.c
index bacc845cd4..7f0ebeb9fd 100644
--- a/arch/arm/mach-socfpga/spl.c
+++ b/arch/arm/mach-socfpga/spl.c
@@ -31,7 +31,10 @@ static struct nic301_registers *nic301_regs =
u32 spl_boot_device(void)
{
-#ifdef CONFIG_SPL_MMC_SUPPORT
+#ifdef CONFIG_SPL_SPI_SUPPORT
+ socfpga_per_reset(SOCFPGA_RESET(QSPI), 0);
+ return BOOT_DEVICE_SPI;
+#elif CONFIG_SPL_MMC_SUPPORT
socfpga_per_reset(SOCFPGA_RESET(SDMMC), 0);
socfpga_per_reset(SOCFPGA_RESET(DMA), 0);
return BOOT_DEVICE_MMC1;
diff --git a/configs/socfpga_arria5_defconfig b/configs/socfpga_arria5_defconfig
index 245d53c17c..ee03156046 100644
--- a/configs/socfpga_arria5_defconfig
+++ b/configs/socfpga_arria5_defconfig
@@ -9,3 +9,8 @@ CONFIG_OF_CONTROL=y
CONFIG_SPI_FLASH=y
CONFIG_SPL_DM=y
CONFIG_SPL_MMC_SUPPORT=y
+CONFIG_DM_SEQ_ALIAS=y
+CONFIG_SPL_SIMPLE_BUS=y
+CONFIG_DM_SPI=y
+CONFIG_DM_SPI_FLASH=y
+CONFIG_SPL_SPI_SUPPORT=y
diff --git a/configs/socfpga_cyclone5_defconfig b/configs/socfpga_cyclone5_defconfig
index 00536ffc77..992ce7e0de 100644
--- a/configs/socfpga_cyclone5_defconfig
+++ b/configs/socfpga_cyclone5_defconfig
@@ -11,3 +11,8 @@ CONFIG_NETDEVICES=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_SPL_DM=y
CONFIG_SPL_MMC_SUPPORT=y
+CONFIG_DM_SEQ_ALIAS=y
+CONFIG_SPL_SIMPLE_BUS=y
+CONFIG_DM_SPI=y
+CONFIG_DM_SPI_FLASH=y
+CONFIG_SPL_SPI_SUPPORT=y
diff --git a/configs/socfpga_socrates_defconfig b/configs/socfpga_socrates_defconfig
index 11bbff1db4..98894bb283 100644
--- a/configs/socfpga_socrates_defconfig
+++ b/configs/socfpga_socrates_defconfig
@@ -11,3 +11,8 @@ CONFIG_NETDEVICES=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_SPL_DM=y
CONFIG_SPL_MMC_SUPPORT=y
+CONFIG_DM_SEQ_ALIAS=y
+CONFIG_SPL_SIMPLE_BUS=y
+CONFIG_DM_SPI=y
+CONFIG_DM_SPI_FLASH=y
+CONFIG_SPL_SPI_SUPPORT=y
diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h
index c1380807ec..c62c78ad8d 100644
--- a/include/configs/socfpga_common.h
+++ b/include/configs/socfpga_common.h
@@ -301,6 +301,7 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
#define CONFIG_SPL_WATCHDOG_SUPPORT
#define CONFIG_SPL_SERIAL_SUPPORT
#define CONFIG_SPL_MMC_SUPPORT
+#define CONFIG_SPL_SPI_SUPPORT
/* SPL SDMMC boot support */
#ifdef CONFIG_SPL_MMC_SUPPORT
@@ -315,6 +316,14 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
#endif
#endif
+/* SPL QSPI boot support */
+#ifdef CONFIG_SPL_SPI_SUPPORT
+#define CONFIG_DM_SEQ_ALIAS 1
+#define CONFIG_SPL_SPI_FLASH_SUPPORT
+#define CONFIG_SPL_SPI_LOAD
+#define CONFIG_SYS_SPI_U_BOOT_OFFS 0x40000
+#endif
+
/*
* Stack setup
*/
OpenPOWER on IntegriCloud