From bcbb85a29e32e3ff2366c1a77f463944c96f6a7c Mon Sep 17 00:00:00 2001 From: Laurentiu Mihalcea Date: Fri, 28 Apr 2023 13:40:51 +0300 Subject: [PATCH] zephyr: wrapper: Conditionally call platform_boot_complete() 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 --- zephyr/wrapper.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/zephyr/wrapper.c b/zephyr/wrapper.c index 0ccb23623..60108c4b4 100644 --- a/zephyr/wrapper.c +++ b/zephyr/wrapper.c @@ -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) @@ -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(); } /*