diff --git a/drivers/rpmsg/imx_rpmsg.c b/drivers/rpmsg/imx_rpmsg.c index fab8b6ba257d6a1ce6cd41e2ac14f9e8ae312e6f..e8878967b6cc48dba3e6980a67b43378772f81db 100644 --- a/drivers/rpmsg/imx_rpmsg.c +++ b/drivers/rpmsg/imx_rpmsg.c @@ -694,6 +694,8 @@ static int imx_rpmsg_probe(struct platform_device *pdev) uint32_t mu_id; sc_err_t sciErr; static sc_ipc_t mu_ipchandle; + uint32_t irq_status; + /* Get muB partition id and enable irq in SCFW then */ if (of_property_read_u32(np, "mub-partition", &rpdev->mub_partition)) @@ -712,6 +714,15 @@ static int imx_rpmsg_probe(struct platform_device *pdev) return sciErr; }; + /* Clear any pending partition reset interrupt during + * rpmsg probe. + */ + sciErr = sc_irq_status(mu_ipchandle, SC_R_MU_1A, + SC_IRQ_GROUP_REBOOTED, + &irq_status); + if (sciErr != SC_ERR_NONE) + pr_info("Cannot get partition reboot interrupt status\n"); + /* Request for the partition reset interrupt. */ sciErr = sc_irq_enable(mu_ipchandle, SC_R_MU_1A, SC_IRQ_GROUP_REBOOTED,