Skip to content
Snippets Groups Projects
Commit 074b89e4 authored by Richard Zhu's avatar Richard Zhu
Browse files

MLK-21247 rpmsg: imx: do not check the remote ready flag in suspend mode


Since, the partition reset irq would be triggered anytime.
Do not read the status of the MU if master side is in suspend mode.

Signed-off-by: default avatarRichard Zhu <hongxing.zhu@nxp.com>
(cherry picked from commit 117dbcb1)
parent 2c13ab1a
No related branches found
No related tags found
No related merge requests found
...@@ -65,6 +65,7 @@ struct imx_rpmsg_vproc { ...@@ -65,6 +65,7 @@ struct imx_rpmsg_vproc {
enum imx_rpmsg_variants variant; enum imx_rpmsg_variants variant;
int vdev_nums; int vdev_nums;
int first_notify; int first_notify;
u32 none_suspend;
#define MAX_VDEV_NUMS 8 #define MAX_VDEV_NUMS 8
struct imx_virdev *ivdev[MAX_VDEV_NUMS]; struct imx_virdev *ivdev[MAX_VDEV_NUMS];
void __iomem *mu_base; void __iomem *mu_base;
...@@ -513,7 +514,7 @@ static int imx_rpmsg_mu_init(struct imx_rpmsg_vproc *rpdev) ...@@ -513,7 +514,7 @@ static int imx_rpmsg_mu_init(struct imx_rpmsg_vproc *rpdev)
void imx_rpmsg_restore(struct imx_rpmsg_vproc *rpdev) void imx_rpmsg_restore(struct imx_rpmsg_vproc *rpdev)
{ {
int i; int i;
u32 flags; u32 flags = 0;
int vdev_nums = rpdev->vdev_nums; int vdev_nums = rpdev->vdev_nums;
for (i = 0; i < vdev_nums; i++) { for (i = 0; i < vdev_nums; i++) {
...@@ -523,7 +524,8 @@ void imx_rpmsg_restore(struct imx_rpmsg_vproc *rpdev) ...@@ -523,7 +524,8 @@ void imx_rpmsg_restore(struct imx_rpmsg_vproc *rpdev)
/* Make a double check that remote processor is ready or not */ /* Make a double check that remote processor is ready or not */
for (i = 0; i < REMOTE_READY_WAIT_MAX_RETRIES; i++) { for (i = 0; i < REMOTE_READY_WAIT_MAX_RETRIES; i++) {
flags = MU_ReadStatus(rpdev->mu_base); if (rpdev->none_suspend)
flags = MU_ReadStatus(rpdev->mu_base);
if (flags & REMOTE_IS_READY) if (flags & REMOTE_IS_READY)
break; break;
usleep_range(100, 200); usleep_range(100, 200);
...@@ -776,6 +778,7 @@ static int imx_rpmsg_noirq_suspend(struct device *dev) ...@@ -776,6 +778,7 @@ static int imx_rpmsg_noirq_suspend(struct device *dev)
{ {
struct imx_rpmsg_vproc *rpdev = dev_get_drvdata(dev); struct imx_rpmsg_vproc *rpdev = dev_get_drvdata(dev);
rpdev->none_suspend = 0;
if (rpdev->mu_clk) if (rpdev->mu_clk)
clk_disable_unprepare(rpdev->mu_clk); clk_disable_unprepare(rpdev->mu_clk);
...@@ -794,8 +797,10 @@ static int imx_rpmsg_noirq_resume(struct device *dev) ...@@ -794,8 +797,10 @@ static int imx_rpmsg_noirq_resume(struct device *dev)
return ret; return ret;
} }
} }
ret = imx_rpmsg_mu_init(rpdev);
rpdev->none_suspend = 1;
return imx_rpmsg_mu_init(rpdev); return ret;
} }
#endif #endif
......
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