ipc4: add support for ipc4 boot message and data

Add support to send IPC4 boot message and boot data by providing
a new API to get this data from ABI specific code.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
This commit is contained in:
Liam Girdwood 2021-06-10 20:48:47 +01:00 committed by Liam Girdwood
parent f6cc7dd499
commit 7ba1a08862
2 changed files with 16 additions and 4 deletions

View File

@ -1473,6 +1473,11 @@ ipc_cmd_hdr *ipc_prepare_to_send(struct ipc_msg *msg)
return ipc_to_hdr(hdr);
}
void ipc_boot_complete_msg(ipc_cmd_hdr *header, uint32_t *data)
{
*header = SOF_IPC_FW_READY;
}
/*
* Global IPC Operations.
*/

View File

@ -296,6 +296,9 @@ int platform_boot_complete(uint32_t boot_message)
int platform_boot_complete(uint32_t boot_message)
{
ipc_cmd_hdr header;
uint32_t data;
#if CONFIG_TIGERLAKE && !CONFIG_CAVS_LPRO_ONLY
/* TGL specific HW recommended flow */
pm_runtime_get(PM_RUNTIME_DSP, PWRD_BY_HPRO | (CONFIG_CORE_COUNT - 1));
@ -303,13 +306,17 @@ int platform_boot_complete(uint32_t boot_message)
mailbox_dspbox_write(0, &ready, sizeof(ready));
/* get any IPC specific boot message and optional data */
data = SRAM_WINDOW_HOST_OFFSET(0) >> 12;
ipc_boot_complete_msg(&header, &data);
/* tell host we are ready */
#if CAVS_VERSION == CAVS_VERSION_1_5
ipc_write(IPC_DIPCIE, SRAM_WINDOW_HOST_OFFSET(0) >> 12);
ipc_write(IPC_DIPCI, IPC_DIPCI_BUSY | SOF_IPC_FW_READY);
ipc_write(IPC_DIPCIE, data);
ipc_write(IPC_DIPCI, IPC_DIPCI_BUSY | header);
#else
ipc_write(IPC_DIPCIDD, SRAM_WINDOW_HOST_OFFSET(0) >> 12);
ipc_write(IPC_DIPCIDR, IPC_DIPCIDR_BUSY | SOF_IPC_FW_READY);
ipc_write(IPC_DIPCIDD, data);
ipc_write(IPC_DIPCIDR, IPC_DIPCIDR_BUSY | header);
#endif
return 0;
}