Commit f4a61013b4d94d8c6ff89bc03ba7b083c0ef4c17

Authored by Ye Li
1 parent e3a1ff7514

MLK-20987-2 imx8qm/qxp: spl: Clean the flexspi power up/down warning

When flexspi is assigned to M4 for XIP, its power up/down will fail.
This is expected so don't need to give warning.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 0803b4a9d4074a5bb101d194633cbdd7510a1e9a)

Showing 2 changed files with 16 additions and 8 deletions Side-by-side Diff

board/freescale/imx8qm_mek/spl.c
... ... @@ -179,8 +179,10 @@
179 179 sc_ipc_t ipcHndl = 0;
180 180  
181 181 ipcHndl = gd->arch.ipc_channel_handle;
182   - if (sc_pm_set_resource_power_mode(ipcHndl, SC_R_FSPI_0, SC_PM_PW_MODE_ON)) {
183   - puts("Warning: failed to initialize FSPI0\n");
  182 + if (sc_rm_is_resource_owned(ipcHndl, SC_R_FSPI_0)) {
  183 + if (sc_pm_set_resource_power_mode(ipcHndl, SC_R_FSPI_0, SC_PM_PW_MODE_ON)) {
  184 + puts("Warning: failed to initialize FSPI0\n");
  185 + }
184 186 }
185 187 #endif
186 188  
... ... @@ -196,8 +198,10 @@
196 198 sc_ipc_t ipcHndl = 0;
197 199  
198 200 ipcHndl = gd->arch.ipc_channel_handle;
199   - if (sc_pm_set_resource_power_mode(ipcHndl, SC_R_FSPI_0, SC_PM_PW_MODE_OFF)) {
200   - puts("Warning: failed to turn off FSPI0\n");
  201 + if (sc_rm_is_resource_owned(ipcHndl, SC_R_FSPI_0)) {
  202 + if (sc_pm_set_resource_power_mode(ipcHndl, SC_R_FSPI_0, SC_PM_PW_MODE_OFF)) {
  203 + puts("Warning: failed to turn off FSPI0\n");
  204 + }
201 205 }
202 206 #endif
203 207 }
board/freescale/imx8qxp_mek/spl.c
... ... @@ -177,8 +177,10 @@
177 177 sc_ipc_t ipcHndl = 0;
178 178  
179 179 ipcHndl = gd->arch.ipc_channel_handle;
180   - if (sc_pm_set_resource_power_mode(ipcHndl, SC_R_FSPI_0, SC_PM_PW_MODE_ON)) {
181   - puts("Warning: failed to initialize FSPI0\n");
  180 + if (sc_rm_is_resource_owned(ipcHndl, SC_R_FSPI_0)) {
  181 + if (sc_pm_set_resource_power_mode(ipcHndl, SC_R_FSPI_0, SC_PM_PW_MODE_ON)) {
  182 + puts("Warning: failed to initialize FSPI0\n");
  183 + }
182 184 }
183 185 #endif
184 186 /* DDR initialization */
... ... @@ -193,8 +195,10 @@
193 195 sc_ipc_t ipcHndl = 0;
194 196  
195 197 ipcHndl = gd->arch.ipc_channel_handle;
196   - if (sc_pm_set_resource_power_mode(ipcHndl, SC_R_FSPI_0, SC_PM_PW_MODE_OFF)) {
197   - puts("Warning: failed to turn off FSPI0\n");
  198 + if (sc_rm_is_resource_owned(ipcHndl, SC_R_FSPI_0)) {
  199 + if (sc_pm_set_resource_power_mode(ipcHndl, SC_R_FSPI_0, SC_PM_PW_MODE_OFF)) {
  200 + puts("Warning: failed to turn off FSPI0\n");
  201 + }
198 202 }
199 203 #endif
200 204 }