]> git.sur5r.net Git - u-boot/commitdiff
arm: socfpga: spl: Add support for booting from QSPI
authorMarek Vasut <marex@denx.de>
Tue, 21 Jul 2015 05:50:03 +0000 (07:50 +0200)
committerMarek Vasut <marex@denx.de>
Sat, 8 Aug 2015 12:14:08 +0000 (14:14 +0200)
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>
arch/arm/mach-socfpga/spl.c
configs/socfpga_arria5_defconfig
configs/socfpga_cyclone5_defconfig
configs/socfpga_socrates_defconfig
include/configs/socfpga_common.h

index bacc845cd4dc29f3c456b443ec0818eb1dc0dc83..7f0ebeb9fdc3e07b43cdf2cce7ac1afb6a259903 100644 (file)
@@ -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;
index 245d53c17ce0b5c513490800875428a9ec96a0a2..ee03156046a420c567aceaedf173e4367b894ac8 100644 (file)
@@ -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
index 00536ffc77ab376cb9a73f6ea494938737e99a90..992ce7e0de51e83d540fdf8713619456750110b3 100644 (file)
@@ -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
index 11bbff1db4a9e2dfebf49af8bf15f93bf653c135..98894bb28361e11263506c2d7e33baa688bdc5ba 100644 (file)
@@ -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
index c1380807ec89d16fa6f0975a5c7896979e0844ad..c62c78ad8da83ad80d05e786fdfb5da09459f668 100644 (file)
@@ -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
  */