From 5da3df266bb863c80122ccf03a5aad37c597949b Mon Sep 17 00:00:00 2001
From: "Guoniu.zhou" <guoniu.zhou@nxp.com>
Date: Fri, 2 Jul 2021 10:57:58 +0800
Subject: [PATCH] MLK-25629-02: dma: pxp: Fix timeout issue after adding power
 domain for PXP

The IRQ_MASK value and PXP status will missed after runtime suspend, so
reconfigure PXP before start new process.

Signed-off-by: Guoniu.zhou <guoniu.zhou@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
---
 drivers/dma/pxp/pxp_dma_v3.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/dma/pxp/pxp_dma_v3.c b/drivers/dma/pxp/pxp_dma_v3.c
index b99d975c063874..8a86c97895d17a 100644
--- a/drivers/dma/pxp/pxp_dma_v3.c
+++ b/drivers/dma/pxp/pxp_dma_v3.c
@@ -4272,6 +4272,12 @@ static void pxp_issue_pending(struct dma_chan *chan)
 	spin_unlock(&pxp_chan->lock);
 
 	pxp_clk_enable(pxp);
+
+	pxp_soft_reset(pxp);
+	if (pxp->devdata && pxp->devdata->pxp_data_path_config)
+		pxp->devdata->pxp_data_path_config(pxp);
+	__raw_writel(0xffff, pxp->base + HW_PXP_IRQ_MASK);
+
 	wake_up_interruptible(&pxp->thread_waitq);
 }
 
-- 
GitLab