summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbel Vesa <abel.vesa@nxp.com>2018-09-26 14:39:31 +0300
committerYe Li <ye.li@nxp.com>2018-09-29 00:35:26 -0700
commitceae539f20646db381968edbd8c3b57ec1ac70e5 (patch)
treec4916a3ac61a98a8b7e7d1d777faa95840c698b7
parent4117915f843bbe7532934399150451d73adfe45a (diff)
MLK-19769-1 iMX8QM SPL: Add QSPI support for imx8qm_mek
Allow iMX8QM mek SPL to boot from QSPI. Signed-off-by: Abel Vesa <abel.vesa@nxp.com> Reviewed-by: Ye Li <ye.li@nxp.com> (cherry picked from commit e2c73faa7b2048551824773adf66b3912108d867)
-rw-r--r--board/freescale/imx8qm_mek/spl.c22
-rw-r--r--include/configs/imx8qm_mek.h5
2 files changed, 27 insertions, 0 deletions
diff --git a/board/freescale/imx8qm_mek/spl.c b/board/freescale/imx8qm_mek/spl.c
index 51d266f85f..46a64a20e4 100644
--- a/board/freescale/imx8qm_mek/spl.c
+++ b/board/freescale/imx8qm_mek/spl.c
@@ -175,12 +175,34 @@ void spl_dram_init(void)
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/include/configs/imx8qm_mek.h b/include/configs/imx8qm_mek.h
index 2d8f85aa56..fa6d40f7af 100644
--- a/include/configs/imx8qm_mek.h
+++ b/include/configs/imx8qm_mek.h
@@ -12,6 +12,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)