mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] mmc: mediatek: add wait dma stop done flow
@ 2021-08-06  2:30 Derong Liu
  2021-08-06 10:42 ` Matthias Brugger
  0 siblings, 1 reply; 2+ messages in thread
From: Derong Liu @ 2021-08-06  2:30 UTC (permalink / raw)
  To: Chaotian Jing, Ulf Hansson, Matthias Brugger
  Cc: linux-mmc, linux-arm-kernel, linux-mediatek, linux-kernel,
	wsp_upstream, Peng Zhou, Derong Liu

From: mtk13858 <derong.liu@mediatek.com>

it needs to wait for dma stop done after set dma stop.

Signed-off-by: mtk13858 <derong.liu@mediatek.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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-06 10:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-06  2:30 [PATCH] mmc: mediatek: add wait dma stop done flow Derong Liu
2021-08-06 10:42 ` Matthias Brugger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®