diff options
-rw-r--r-- | arch/arm/mach-imx/spl.c | 2 | ||||
-rw-r--r-- | board/freescale/imx8qxp_mek/spl.c | 20 | ||||
-rw-r--r-- | drivers/mtd/spi/Makefile | 1 | ||||
-rw-r--r-- | include/configs/imx8qxp_mek.h | 5 |
4 files changed, 28 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c index 1d9f7f02abb..4b72160dda5 100644 --- a/arch/arm/mach-imx/spl.c +++ b/arch/arm/mach-imx/spl.c @@ -119,6 +119,8 @@ u32 spl_boot_device(void) return BOOT_DEVICE_MMC2_2; case SD3_BOOT: return BOOT_DEVICE_MMC1; + case FLEXSPI_BOOT: + return BOOT_DEVICE_SPI; #elif defined(CONFIG_IMX8M) case SD1_BOOT: case MMC1_BOOT: diff --git a/board/freescale/imx8qxp_mek/spl.c b/board/freescale/imx8qxp_mek/spl.c index 03f92f67ae1..37b03af4b68 100644 --- a/board/freescale/imx8qxp_mek/spl.c +++ b/board/freescale/imx8qxp_mek/spl.c @@ -173,12 +173,32 @@ int board_mmc_getcd(struct mmc *mmc) void spl_board_init(void) { +#if defined(CONFIG_QSPI_BOOT) + sc_ipc_t ipcHndl = 0; + + ipcHndl = gd->arch.ipc_channel_handle; + if (sc_pm_set_resource_power_mode(ipcHndl, SC_R_FSPI_0, SC_PM_PW_MODE_ON)) { + puts("Warning: failed to initialize FSPI0\n"); + } +#endif /* DDR initialization */ spl_dram_init(); puts("Normal Boot\n"); } +void spl_board_prepare_for_boot(void) +{ +#if defined(CONFIG_QSPI_BOOT) + sc_ipc_t ipcHndl = 0; + + ipcHndl = gd->arch.ipc_channel_handle; + if (sc_pm_set_resource_power_mode(ipcHndl, SC_R_FSPI_0, SC_PM_PW_MODE_OFF)) { + puts("Warning: failed to turn off FSPI0\n"); + } +#endif +} + void board_init_f(ulong dummy) { /* Clear global data */ diff --git a/drivers/mtd/spi/Makefile b/drivers/mtd/spi/Makefile index fcda0234121..6e0cfb5539e 100644 --- a/drivers/mtd/spi/Makefile +++ b/drivers/mtd/spi/Makefile @@ -8,6 +8,7 @@ obj-$(CONFIG_DM_SPI_FLASH) += sf-uclass.o ifdef CONFIG_SPL_BUILD +obj-$(CONFIG_SPL_SPI_FLASH_SUPPORT) += sf_probe.o spi_flash.o spi_flash_ids.o sf.o obj-$(CONFIG_SPL_SPI_BOOT) += fsl_espi_spl.o obj-$(CONFIG_SPL_SPI_SUNXI) += sunxi_spi_spl.o endif diff --git a/include/configs/imx8qxp_mek.h b/include/configs/imx8qxp_mek.h index 181623198be..66ab254998c 100644 --- a/include/configs/imx8qxp_mek.h +++ b/include/configs/imx8qxp_mek.h @@ -13,6 +13,11 @@ #include "imx_env.h" #ifdef CONFIG_SPL_BUILD + +#ifdef CONFIG_QSPI_BOOT +#define CONFIG_SPL_SPI_LOAD +#endif + #define CONFIG_SPL_TEXT_BASE 0x0 #define CONFIG_SPL_MAX_SIZE (124 * 1024) #define CONFIG_SYS_MONITOR_LEN (1024 * 1024) |