summaryrefslogtreecommitdiff
path: root/board/freescale/imx8qm_mek/spl.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/freescale/imx8qm_mek/spl.c')
-rw-r--r--board/freescale/imx8qm_mek/spl.c22
1 files changed, 22 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 */