]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00152287-3 SDMA: Fix sdma cache bufferable issue
authorZeng Zhaoming <b32542@freescale.com>
Mon, 18 Jul 2011 03:55:41 +0000 (11:55 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:33:00 +0000 (08:33 +0200)
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 <b32542@freescale.com>
drivers/dma/imx-sdma.c

index 0ed6c6e99ff49121b8a11c02e9c65908ce22e59e..3642ca4d07bd6a87a7a5adf6dda9c257e6863530 100644 (file)
@@ -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);
 }