ipm: imx: send firmware ready reply to check for fw boot completion

Send a fw ready reply message as soon as possible.
This is usually used on host side which is waiting
for this message in order to establish the
communication with the remote processor - see
imx_dsp_rproc driver from Linux.

This can be enabled by IPM_IMX_FW_READY_REPLY config,
which is by default N.

Set CONFIG_IPM_IMX_FW_READY_REPLY as Y for
openamp_rsc_table sample, running on nxp_adsp_imx8m.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
This commit is contained in:
Iuliana Prodan 2023-08-18 16:58:27 +03:00 committed by Carles Cufí
commit 8148643881
3 changed files with 23 additions and 0 deletions

View file

@ -64,3 +64,9 @@ config IPM_IMX_MAX_ID_VAL
default 1 if IPM_IMX_MAX_DATA_SIZE_8
default 0 if IPM_IMX_MAX_DATA_SIZE_16
depends on IPM_IMX || IPM_IMX_REV2
config IPM_IMX_FW_READY_REPLY
bool "Send FW_READY reply message"
depends on IPM_IMX || IPM_IMX_REV2
help
Send FW_READY reply to check for FW boot completion

View file

@ -321,6 +321,22 @@ static int imx_mu_init(const struct device *dev)
MU_Init(MU(config));
config->irq_config_func(dev);
#if defined(CONFIG_IPM_IMX_FW_READY_REPLY)
/* Send FW_READY reply message - this is used on host side,
* for handshake communication.
*
* An example is in Linux, imx_dsp_rproc driver, where
* after starting the remote processor, the host is waiting for a
* FW_READY reply.
*/
MU_Type * base = MU(config);
MU_TriggerInterrupts(base, kMU_GenInt0InterruptTrigger |
kMU_GenInt1InterruptTrigger |
kMU_GenInt2InterruptTrigger |
kMU_GenInt3InterruptTrigger);
#endif
return 0;
}