From f7587cc9486952698250e7ddaf9bbce2f66efb71 Mon Sep 17 00:00:00 2001 From: Abel Vesa Date: Thu, 13 Sep 2018 11:16:38 +0300 Subject: MLK-19183-12 iMX8QXP SPL: Add QSPI support for imx8qxp_mek Allow iMX8QXP SPL to boot from QSPI. Signed-off-by: Abel Vesa Reviewed-by: Ye Li --- board/freescale/imx8qxp_mek/spl.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'board') diff --git a/board/freescale/imx8qxp_mek/spl.c b/board/freescale/imx8qxp_mek/spl.c index 03f92f67ae..37b03af4b6 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 */ -- cgit v1.2.3