Commit 2bb68043 authored by Anand Gadiyar's avatar Anand Gadiyar Committed by Tony Lindgren

OMAP: DMA: Fix CCR programming for request line > 63

Bug in existing code causes synchro control to be set +32 if request
line greater than 63 is used.

Reported by Wenbiao Wang
Signed-off-by: default avatarAnand Gadiyar <gadiyar@ti.com>
+++ linux-omap-2.6/arch/arm/plat-omap/dma.c	2009-01-08 14:44:46.000000000 +0200
@@ -279,10 +279,7 @@ void omap_set_dma_transfer_params(int lc

 		val = dma_read(CCR(lch));
 		val &= ~(3 << 19);
-		if (dma_trigger > 63)
-			val |= 1 << 20;
-		if (dma_trigger > 31)
-			val |= 1 << 19;
+		val |= ((dma_trigger & ~(0x1f)) << 14);

 		val &= ~(0x1f);
 		val |= (dma_trigger & 0x1f);
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 19d34d9a
......@@ -279,10 +279,7 @@ void omap_set_dma_transfer_params(int lch, int data_type, int elem_count,
val = dma_read(CCR(lch));
val &= ~(3 << 19);
if (dma_trigger > 63)
val |= 1 << 20;
if (dma_trigger > 31)
val |= 1 << 19;
val |= ((dma_trigger & ~(0x1f)) << 14);
val &= ~(0x1f);
val |= (dma_trigger & 0x1f);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment