From: Santosh Shilimkar Date: Thu, 25 Sep 2008 10:01:23 +0000 (+0530) Subject: ARM: OMAP3: DMA: Fix for sDMA Errata 1.113 X-Git-Tag: v2.6.27-omap1~99 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=22e6b78019e4f9c98be1ac0eb30d7e120fa66414;p=linux-2.6-omap-h63xx.git ARM: OMAP3: DMA: Fix for sDMA Errata 1.113 SDMA channel is not disabled after transaction error. So explicitly disable it. Signed-off-by: Santosh Shilimkar Acked By : Nishant kamat Signed-off-by: Tony Lindgren --- diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index eaea12ae20b..c4e5ba3ef58 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c @@ -1849,9 +1849,22 @@ static int omap2_dma_handle_ch(int ch) printk(KERN_INFO "DMA synchronization event drop occurred with device " "%d\n", dma_chan[ch].dev_id); - if (unlikely(status & OMAP2_DMA_TRANS_ERR_IRQ)) + if (unlikely(status & OMAP2_DMA_TRANS_ERR_IRQ)) { printk(KERN_INFO "DMA transaction error with device %d\n", dma_chan[ch].dev_id); + if (cpu_class_is_omap2()) { + /* Errata: sDMA Channel is not disabled + * after a transaction error. So we explicitely + * disable the channel + */ + u32 ccr; + + ccr = dma_read(CCR(ch)); + ccr &= ~OMAP_DMA_CCR_EN; + dma_write(ccr, CCR(ch)); + dma_chan[ch].flags &= ~OMAP_DMA_ACTIVE; + } + } if (unlikely(status & OMAP2_DMA_SECURE_ERR_IRQ)) printk(KERN_INFO "DMA secure error with device %d\n", dma_chan[ch].dev_id);