summaryrefslogtreecommitdiff
path: root/drivers/rpmsg
diff options
context:
space:
mode:
authorFugang Duan <fugang.duan@nxp.com>2019-03-20 15:06:58 +0800
committerFugang Duan <fugang.duan@nxp.com>2019-03-20 16:09:02 +0800
commit12ce2f1b43c4033b4be346f5f69d11dd7e5c78b3 (patch)
tree58f2c3ea75ac51f4e688c33c319ae60c946cccd5 /drivers/rpmsg
parent89cfea811432c5284ddb23ceb972129c582cf90d (diff)
MLK-21194 rpmsg: imx_rpmsg: clear pending partition reboot irq status
Clear pending interrupt status of partition reboot during rpmsg driver probe to avoid to unregister/register virtio device again. Tested-by: Clark Wang <xiaoning.wang@nxp.com> Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com> Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Diffstat (limited to 'drivers/rpmsg')
-rw-r--r--drivers/rpmsg/imx_rpmsg.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/rpmsg/imx_rpmsg.c b/drivers/rpmsg/imx_rpmsg.c
index fab8b6ba257d..e8878967b6cc 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,