aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAnand Gadiyar <gadiyar@ti.com>2009-01-15 06:09:53 -0500
committerTony Lindgren <tony@atomide.com>2009-01-15 06:09:53 -0500
commit4b3cf44846b6424d4119676ad68d54a62b81e31c (patch)
treedcf09df49e55541bf115da40155add60b7ed0590 /arch
parent3a26e3318bc2ceec340f242c6ee7074becdc7219 (diff)
ARM: OMAP: Fix DMA CCR programming for request line > 63, v3
Bug in existing code causes synchro control to be set +32 if request line greater than 63 is used. Also clean up the function a bit by removing extra parens and clearing the bits at before write. Reported by Wenbiao Wang. Signed-off-by: Anand Gadiyar <gadiyar@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/plat-omap/dma.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index 692d2b495af3..e77373c39f8c 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -278,14 +278,11 @@ void omap_set_dma_transfer_params(int lch, int data_type, int elem_count,
278 u32 val; 278 u32 val;
279 279
280 val = dma_read(CCR(lch)); 280 val = dma_read(CCR(lch));
281 val &= ~(3 << 19); 281
282 if (dma_trigger > 63) 282 /* DMA_SYNCHRO_CONTROL_UPPER depends on the channel number */
283 val |= 1 << 20; 283 val &= ~((3 << 19) | 0x1f);
284 if (dma_trigger > 31) 284 val |= (dma_trigger & ~0x1f) << 14;
285 val |= 1 << 19; 285 val |= dma_trigger & 0x1f;
286
287 val &= ~(0x1f);
288 val |= (dma_trigger & 0x1f);
289 286
290 if (sync_mode & OMAP_DMA_SYNC_FRAME) 287 if (sync_mode & OMAP_DMA_SYNC_FRAME)
291 val |= 1 << 5; 288 val |= 1 << 5;