From: Romain Goyet Date: Thu, 15 Sep 2005 07:14:37 +0000 (+0300) Subject: [PATCH] ARM: OMAP: Reset DMA channels in init and add support for 330 X-Git-Tag: v2.6.15-omap2~220 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=323dececc9c406f9f928e1c372ee937f6dba2b89;p=linux-2.6-omap-h63xx.git [PATCH] ARM: OMAP: Reset DMA channels in init and add support for 330 Reset DMA channels in init and add support for 330 --- diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index da7b6514565..76f9ed47730 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c @@ -951,7 +951,7 @@ void omap_clear_dma(int lch) local_irq_save(flags); omap_writew(omap_readw(OMAP_DMA_CCR(lch)) & ~OMAP_DMA_CCR_EN, OMAP_DMA_CCR(lch)); - status = OMAP_DMA_CSR(lch); /* clear pending interrupts */ + status = omap_readw(OMAP_DMA_CSR(lch)); /* clear pending interrupts */ local_irq_restore(flags); } @@ -1016,8 +1016,8 @@ static int __init omap_init_dma(void) { int ch, r; - if (cpu_is_omap1510()) { - printk(KERN_INFO "DMA support for OMAP1510 initialized\n"); + if (cpu_is_omap15xx()) { + printk(KERN_INFO "DMA support for OMAP15xx initialized\n"); dma_chan_count = 9; enable_1510_mode = 1; } else if (cpu_is_omap16xx() || cpu_is_omap730()) { @@ -1048,6 +1048,10 @@ static int __init omap_init_dma(void) spin_lock_init(&dma_chan_lock); memset(&dma_chan, 0, sizeof(dma_chan)); + /* Disable and clear all DMA channels to avoid spurious IRQ */ + for (ch = 0; ch < dma_chan_count; ch++) { + omap_clear_dma(ch); + } for (ch = 0; ch < dma_chan_count; ch++) { dma_chan[ch].dev_id = -1; dma_chan[ch].next_lch = -1;