mxc : Clean up properly when imx_dma_free() used without imx_dma_disable()
authorMartin Fuzzey <mfuzzey@gmail.com>
Thu, 26 Mar 2009 21:21:16 +0000 (22:21 +0100)
committerSascha Hauer <s.hauer@pengutronix.de>
Tue, 5 May 2009 07:36:22 +0000 (09:36 +0200)
The sequence
imx_dma_request()
imx_dma_enable()
imx_dma_free()
left the dma channel in_use mode and did not release the timer.

Signed-off-by: Martin Fuzzey <mfuzzey@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
arch/arm/plat-mxc/dma-mx1-mx2.c

index e364a5e..a9126ed 100644 (file)
@@ -737,10 +737,7 @@ void imx_dma_free(int channel)
 
        local_irq_save(flags);
        /* Disable interrupts */
-       __raw_writel(__raw_readl(DMA_BASE + DMA_DIMR) | (1 << channel),
-               DMA_BASE + DMA_DIMR);
-       __raw_writel(__raw_readl(DMA_BASE + DMA_CCR(channel)) & ~CCR_CEN,
-               DMA_BASE + DMA_CCR(channel));
+       imx_dma_disable(channel);
        imxdma->name = NULL;
 
 #ifdef CONFIG_ARCH_MX2