diff options
author | Fugang Duan <fugang.duan@nxp.com> | 2019-03-20 15:06:58 +0800 |
---|---|---|
committer | Fugang Duan <fugang.duan@nxp.com> | 2019-03-20 16:07:46 +0800 |
commit | 630e2fef49a191b6cc58174d8e44d797eae06d49 (patch) | |
tree | 55b58c7895c7c7616756d96cdd53fffa95748252 | |
parent | b6d88bb72915efe2f1557896df9ca25bf0469a10 (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>
-rw-r--r-- | drivers/rpmsg/imx_rpmsg.c | 11 |
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, |