Skip to content
Snippets Groups Projects
Commit 12ce2f1b authored by Fugang Duan's avatar Fugang Duan
Browse files

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: default avatarClark Wang <xiaoning.wang@nxp.com>
Reviewed-by: default avatarRichard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: default avatarFugang Duan <fugang.duan@nxp.com>
parent 89cfea81
No related branches found
No related tags found
No related merge requests found
...@@ -694,6 +694,8 @@ static int imx_rpmsg_probe(struct platform_device *pdev) ...@@ -694,6 +694,8 @@ static int imx_rpmsg_probe(struct platform_device *pdev)
uint32_t mu_id; uint32_t mu_id;
sc_err_t sciErr; sc_err_t sciErr;
static sc_ipc_t mu_ipchandle; static sc_ipc_t mu_ipchandle;
uint32_t irq_status;
/* Get muB partition id and enable irq in SCFW then */ /* Get muB partition id and enable irq in SCFW then */
if (of_property_read_u32(np, "mub-partition", if (of_property_read_u32(np, "mub-partition",
&rpdev->mub_partition)) &rpdev->mub_partition))
...@@ -712,6 +714,15 @@ static int imx_rpmsg_probe(struct platform_device *pdev) ...@@ -712,6 +714,15 @@ static int imx_rpmsg_probe(struct platform_device *pdev)
return sciErr; 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. */ /* Request for the partition reset interrupt. */
sciErr = sc_irq_enable(mu_ipchandle, SC_R_MU_1A, sciErr = sc_irq_enable(mu_ipchandle, SC_R_MU_1A,
SC_IRQ_GROUP_REBOOTED, SC_IRQ_GROUP_REBOOTED,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment