From: Zeng Zhaoming Date: Mon, 18 Jul 2011 03:55:41 +0000 (+0800) Subject: ENGR00152287-3 SDMA: Fix sdma cache bufferable issue X-Git-Tag: v3.0.35-fsl~2242 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7d853dd41b21fbffb4ae245e1d8fcb2acfe5afab;p=karo-tx-linux.git ENGR00152287-3 SDMA: Fix sdma cache bufferable issue MX6Q desclare dma memory bufferable, which cause sdma load context failed in 60% possibility. To fix it, we need to add dsb to flush write buffer before start dma transfer. Signed-off-by: Zeng Zhaoming --- diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index 0ed6c6e99ff4..3642ca4d07bd 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -373,6 +373,7 @@ static int sdma_run_channel(struct sdma_channel *sdmac) init_completion(&sdmac->done); + wmb(); __raw_writel(1 << channel, sdma->regs + SDMA_H_START); ret = wait_for_completion_timeout(&sdmac->done, HZ); @@ -768,6 +769,7 @@ out: static void sdma_enable_channel(struct sdma_engine *sdma, int channel) { + wmb(); __raw_writel(1 << channel, sdma->regs + SDMA_H_START); }