summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorAbel Vesa <abel.vesa@nxp.com>2018-09-13 11:16:38 +0300
committerAbel Vesa <abel.vesa@nxp.com>2018-09-18 09:47:48 +0300
commitf7587cc9486952698250e7ddaf9bbce2f66efb71 (patch)
treecb17556cef3748485f6164216f1ec19a4373d559 /board
parentc70afc348ee9fae242f00be56cde556822f93156 (diff)
MLK-19183-12 iMX8QXP SPL: Add QSPI support for imx8qxp_mek
Allow iMX8QXP SPL to boot from QSPI. Signed-off-by: Abel Vesa <abel.vesa@nxp.com> Reviewed-by: Ye Li <ye.li@nxp.com>
Diffstat (limited to 'board')
-rw-r--r--board/freescale/imx8qxp_mek/spl.c20
1 files changed, 20 insertions, 0 deletions
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 */