All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Add support for packet synchronised sDMA transfers.
@ 2010-03-03 10:20 Fabrice Goucem
  2010-03-03 13:02 ` hari n
  0 siblings, 1 reply; 4+ messages in thread
From: Fabrice Goucem @ 2010-03-03 10:20 UTC (permalink / raw)
  To: linux-omap; +Cc: Fabrice Goucem

System DMA packet synchronisation is currently not supported in the
Linux Kernel.
This patch provides necessary modifications to support packet
synchronisation:
Function omap_set_dma_transfer_params() handles value OMAP_DMA_SYNC_PACKET
to program FS and BS bits of register CCR.
Users can give the packet size to the DMA driver by using parameters
src_fi / dst_fi in functions omap_set_dma_src_params() /
omap_set_dma_dest_params().

Patch has been validated using OMAP's McSPI (on Zoom2, OMAP3430):
McSPI is configured to use DMA transfer.
FIFO are activated with a threshold of 16 bytes (i.e. DMA requests will be
triggered as soon as more than 16 bytes are free in the FIFO).
A frame of 132 elements (bytes) has been transfered, by packets of 16
elements. Resulting transfer was 8 packets of 16 elements plus a last packet
of 4 elements.

Modifications tested building on OMAP2, OMAP3 and OMAP4 configurations.

Signed-off-by: Fabrice Goucem <f-goucem@ti.com>
Acked-by: Venkatraman S <svenkatr@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Shilpa Maddi <s-maddi@ti.com>
---
 arch/arm/plat-omap/dma.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index 2ab224c..48f9355 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -293,12 +293,14 @@ void omap_set_dma_transfer_params(int lch, int data_type, int elem_count,
 		val |= (dma_trigger & ~0x1f) << 14;
 		val |= dma_trigger & 0x1f;
 
-		if (sync_mode & OMAP_DMA_SYNC_FRAME)
+		if ((sync_mode == OMAP_DMA_SYNC_FRAME) ||
+		    (sync_mode == OMAP_DMA_SYNC_PACKET))
 			val |= 1 << 5;
 		else
 			val &= ~(1 << 5);
 
-		if (sync_mode & OMAP_DMA_SYNC_BLOCK)
+		if ((sync_mode == OMAP_DMA_SYNC_BLOCK) ||
+		    (sync_mode == OMAP_DMA_SYNC_PACKET))
 			val |= 1 << 18;
 		else
 			val &= ~(1 << 18);
-- 
1.6.0.4


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

end of thread, other threads:[~2010-05-11 22:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-03 10:20 [PATCH] Add support for packet synchronised sDMA transfers Fabrice Goucem
2010-03-03 13:02 ` hari n
2010-03-09 13:14   ` Goucem, Fabrice
2010-05-11 22:47     ` Tony Lindgren

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.