All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][OMAP3][sDMA] : Fixing the DMA chain transfer callback.
@ 2008-12-16 12:05 Shilimkar, Santosh
  2008-12-18 14:07 ` Tony Lindgren
  0 siblings, 1 reply; 3+ messages in thread
From: Shilimkar, Santosh @ 2008-12-16 12:05 UTC (permalink / raw)
  To: 'Tony Lindgren'; +Cc: 'linux-omap@vger.kernel.org'

Tony,
Here is the patch for DMA to ease the chaining usage. OMAP mcbsp drivers makes use of this chaining feature but it's not pushed on mainline yet. It's available on zoom tree. Link for the same driver. http://git.omapzoom.org/?p=omapkernel.git;a=blob;f=arch/arm/mach-omap2/mcbsp.c;h=ce726c5d27eedb678ad3f981e2f5e08134e44e27;hb=2af15d1d7931a7c928d84057ed4494b77769de12


From: Santosh Shilimkar <santosh.shilimkar@ti.com>

This patch reverts back the change done on OMAP dma library. It corrects the chaining callback and reduces the complexity for the DMA users in chaining. So with this patch, drivers making use of OMAP DMA chaining feature need not built any intelligence for chain related transfers in their callback using private data. 

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked By : Nishant kamat <nskamat@ti.com>
---
--- omapkernel.orig/arch/arm/plat-omap/dma.c	2008-12-04 11:11:07.000000000 +0530
+++ omapkernel/arch/arm/plat-omap/dma.c	2008-12-16 16:59:42.066118383 +0530
@@ -1936,7 +1936,11 @@ static int omap2_dma_handle_ch(int ch)
 	}
 
 	if (likely(dma_chan[ch].callback != NULL))
-		dma_chan[ch].callback(ch, status, dma_chan[ch].data);
+		if (dma_chan[ch].chain_id != -1)
+			dma_chan[ch].callback(dma_chan[ch].chain_id, status,
+					      dma_chan[ch].data);
+		else
+			dma_chan[ch].callback(ch, status, dma_chan[ch].data);
 
 	dma_write(status, CSR(ch));

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-12-18 14:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-16 12:05 [PATCH][OMAP3][sDMA] : Fixing the DMA chain transfer callback Shilimkar, Santosh
2008-12-18 14:07 ` Tony Lindgren
2008-12-18 14:31   ` Shilimkar, Santosh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.