[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210806023055.29524-1-derong.liu@mediatek.com>
Date: Fri, 6 Aug 2021 10:30:55 +0800
From: Derong Liu <derong.liu@...iatek.com>
To: Chaotian Jing <chaotian.jing@...iatek.com>,
Ulf Hansson <ulf.hansson@...aro.org>,
Matthias Brugger <matthias.bgg@...il.com>
CC: <linux-mmc@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-mediatek@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>, <wsp_upstream@...iatek.com>,
Peng Zhou <peng.zhou@...iatek.com>,
Derong Liu <derong.liu@...iatek.com>
Subject: [PATCH] mmc: mediatek: add wait dma stop done flow
From: mtk13858 <derong.liu@...iatek.com>
it needs to wait for dma stop done after set dma stop.
Signed-off-by: mtk13858 <derong.liu@...iatek.com>
---
drivers/mmc/host/mtk-sd.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
index 4dfc246c5f95..1dfd2842471b 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
@@ -2339,6 +2339,8 @@ static void msdc_cqe_disable(struct mmc_host *mmc, bool recovery)
if (recovery) {
sdr_set_field(host->base + MSDC_DMA_CTRL,
MSDC_DMA_CTRL_STOP, 1);
+ while (readl(host->base + MSDC_DMA_CFG) & MSDC_DMA_CFG_STS)
+ cpu_relax();
msdc_reset_hw(host);
}
}
--
2.18.0
Powered by blists - more mailing lists