Commit 074b89e4a2c50ccffa1a324c23c6626a7c8e7d1c

Authored by Richard Zhu
1 parent 2c13ab1ab4

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: Richard Zhu <hongxing.zhu@nxp.com>
(cherry picked from commit 117dbcb1ce258587f8d162c0b3219f32d6de6fbc)

Showing 1 changed file with 8 additions and 3 deletions Side-by-side Diff

drivers/rpmsg/imx_rpmsg.c
... ... @@ -65,6 +65,7 @@
65 65 enum imx_rpmsg_variants variant;
66 66 int vdev_nums;
67 67 int first_notify;
  68 + u32 none_suspend;
68 69 #define MAX_VDEV_NUMS 8
69 70 struct imx_virdev *ivdev[MAX_VDEV_NUMS];
70 71 void __iomem *mu_base;
... ... @@ -513,7 +514,7 @@
513 514 void imx_rpmsg_restore(struct imx_rpmsg_vproc *rpdev)
514 515 {
515 516 int i;
516   - u32 flags;
  517 + u32 flags = 0;
517 518 int vdev_nums = rpdev->vdev_nums;
518 519  
519 520 for (i = 0; i < vdev_nums; i++) {
... ... @@ -523,7 +524,8 @@
523 524  
524 525 /* Make a double check that remote processor is ready or not */
525 526 for (i = 0; i < REMOTE_READY_WAIT_MAX_RETRIES; i++) {
526   - flags = MU_ReadStatus(rpdev->mu_base);
  527 + if (rpdev->none_suspend)
  528 + flags = MU_ReadStatus(rpdev->mu_base);
527 529 if (flags & REMOTE_IS_READY)
528 530 break;
529 531 usleep_range(100, 200);
... ... @@ -776,6 +778,7 @@
776 778 {
777 779 struct imx_rpmsg_vproc *rpdev = dev_get_drvdata(dev);
778 780  
  781 + rpdev->none_suspend = 0;
779 782 if (rpdev->mu_clk)
780 783 clk_disable_unprepare(rpdev->mu_clk);
781 784  
782 785  
... ... @@ -794,8 +797,10 @@
794 797 return ret;
795 798 }
796 799 }
  800 + ret = imx_rpmsg_mu_init(rpdev);
  801 + rpdev->none_suspend = 1;
797 802  
798   - return imx_rpmsg_mu_init(rpdev);
  803 + return ret;
799 804 }
800 805 #endif
801 806