diff --git a/drivers/ipm/Kconfig.imx b/drivers/ipm/Kconfig.imx index 503d32b708c..f945483f0be 100644 --- a/drivers/ipm/Kconfig.imx +++ b/drivers/ipm/Kconfig.imx @@ -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 diff --git a/drivers/ipm/ipm_imx.c b/drivers/ipm/ipm_imx.c index c38117cbde5..65e525f815a 100644 --- a/drivers/ipm/ipm_imx.c +++ b/drivers/ipm/ipm_imx.c @@ -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; } diff --git a/samples/subsys/ipc/openamp_rsc_table/boards/nxp_adsp_imx8m.conf b/samples/subsys/ipc/openamp_rsc_table/boards/nxp_adsp_imx8m.conf index 0f7274227ce..01dd4f8ca3f 100644 --- a/samples/subsys/ipc/openamp_rsc_table/boards/nxp_adsp_imx8m.conf +++ b/samples/subsys/ipc/openamp_rsc_table/boards/nxp_adsp_imx8m.conf @@ -2,3 +2,4 @@ CONFIG_LOG_PRINTK=n CONFIG_IPM_IMX_MAX_DATA_SIZE_16=n CONFIG_IPM_IMX_MAX_DATA_SIZE_4=y CONFIG_OPENAMP_WITH_DCACHE=y +CONFIG_IPM_IMX_FW_READY_REPLY=y