Skip to content

Commit

Permalink
zephyr: wrapper: Conditionally call platform_boot_complete()
Browse files Browse the repository at this point in the history
Due to the fact that on i.MX93 the host will initialize the
SOF_IPC_FW_READY sequence there's no need to call
platform_boot_complete() at the end of start_complete(). This
will be handled in the IPC3 handler.

This commit makes sure that aforementioned scenario won't
happen for i.MX93 while keeping the flow constant for the
other platforms.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
  • Loading branch information
LaurentiuM1234 authored and dbaluta committed May 2, 2023
1 parent 91dbc05 commit bcbb85a
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions zephyr/wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,20 @@ int task_main_start(struct sof *sof)
return 0;
}

static int boot_complete(void)
{
#ifdef CONFIG_IMX93_A55
/* in the case of i.MX93, SOF_IPC_FW_READY
* sequence will be initiated by the host
* so we shouldn't do anything here.
*/
return 0;
#else
/* let host know DSP boot is complete */
return platform_boot_complete(0);
#endif /* CONFIG_IMX93_A55 */
}

int start_complete(void)
{
#if defined(CONFIG_IMX)
Expand All @@ -214,9 +228,7 @@ int start_complete(void)
pm_policy_state_lock_get(PM_STATE_RUNTIME_IDLE, PM_ALL_SUBSTATES);
pm_policy_state_lock_get(PM_STATE_SOFT_OFF, PM_ALL_SUBSTATES);
#endif

/* let host know DSP boot is complete */
return platform_boot_complete(0);
return boot_complete();
}

/*
Expand Down

0 comments on commit bcbb85a

Please sign in to comment.