All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] Prefetch support for DMA transfer
@ 2010-06-30  8:47 Samu Onkalo
  2010-06-30  8:47 ` [PATCH 1/1] omap: dma: Support for prefetch in destination synchronized transfer Samu Onkalo
  0 siblings, 1 reply; 3+ messages in thread
From: Samu Onkalo @ 2010-06-30  8:47 UTC (permalink / raw)
  To: tony; +Cc: linux-omap

Add support for Prefetech mode in destination synchronized DMA transfer.
This enables DMA controller to fetch data from memory in advance.
When the destination HW block requests new data block, it can be send out
faster compared to read from memory. This may prevent stalls in target
HW block. 

Samu Onkalo (1):
  omap: dma: Support for prefetch in destination synchronized transfer

 arch/arm/plat-omap/dma.c              |   11 +++++++----
 arch/arm/plat-omap/include/plat/dma.h |    1 +
 2 files changed, 8 insertions(+), 4 deletions(-)


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

* [PATCH 1/1] omap: dma: Support for prefetch in destination synchronized transfer
  2010-06-30  8:47 [PATCH 0/1] Prefetch support for DMA transfer Samu Onkalo
@ 2010-06-30  8:47 ` Samu Onkalo
  2010-07-07 11:48   ` [APPLIED] [PATCH 1/1] omap: dma: Support for prefetch in destination Tony Lindgren
  0 siblings, 1 reply; 3+ messages in thread
From: Samu Onkalo @ 2010-06-30  8:47 UTC (permalink / raw)
  To: tony; +Cc: linux-omap

Omap DMA controller can prefetch data in advance in case of
destination synchronized data transfer. This may increase
performance when target HW block doesn't have fifo.
Data is waiting for transfer request in DMA fifo instead of read from memory.

Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com>
---
 arch/arm/plat-omap/dma.c              |   11 +++++++----
 arch/arm/plat-omap/include/plat/dma.h |    1 +
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index f7f571e..ec7eddf 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -290,7 +290,7 @@ void omap_set_dma_transfer_params(int lch, int data_type, int elem_count,
 		val = dma_read(CCR(lch));
 
 		/* DMA_SYNCHRO_CONTROL_UPPER depends on the channel number */
-		val &= ~((3 << 19) | 0x1f);
+		val &= ~((1 << 23) | (3 << 19) | 0x1f);
 		val |= (dma_trigger & ~0x1f) << 14;
 		val |= dma_trigger & 0x1f;
 
@@ -304,11 +304,14 @@ void omap_set_dma_transfer_params(int lch, int data_type, int elem_count,
 		else
 			val &= ~(1 << 18);
 
-		if (src_or_dst_synch)
+		if (src_or_dst_synch == OMAP_DMA_DST_SYNC_PREFETCH) {
+			val &= ~(1 << 24);	/* dest synch */
+			val |= (1 << 23);	/* Prefetch */
+		} else if (src_or_dst_synch) {
 			val |= 1 << 24;		/* source synch */
-		else
+		} else {
 			val &= ~(1 << 24);	/* dest synch */
-
+		}
 		dma_write(val, CCR(lch));
 	}
 
diff --git a/arch/arm/plat-omap/include/plat/dma.h b/arch/arm/plat-omap/include/plat/dma.h
index 02232ca..af3a039 100644
--- a/arch/arm/plat-omap/include/plat/dma.h
+++ b/arch/arm/plat-omap/include/plat/dma.h
@@ -345,6 +345,7 @@
 #define OMAP_DMA_SYNC_BLOCK		0x02
 #define OMAP_DMA_SYNC_PACKET		0x03
 
+#define OMAP_DMA_DST_SYNC_PREFETCH	0x02
 #define OMAP_DMA_SRC_SYNC		0x01
 #define OMAP_DMA_DST_SYNC		0x00
 
-- 
1.6.0.4


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

* [APPLIED] [PATCH 1/1] omap: dma: Support for prefetch in destination
  2010-06-30  8:47 ` [PATCH 1/1] omap: dma: Support for prefetch in destination synchronized transfer Samu Onkalo
@ 2010-07-07 11:48   ` Tony Lindgren
  0 siblings, 0 replies; 3+ messages in thread
From: Tony Lindgren @ 2010-07-07 11:48 UTC (permalink / raw)
  To: linux-omap

This patch has been applied to the linux-omap
by youw fwiendly patch wobot.

Branch in linux-omap: for-next

Initial commit ID (Likely to change): 9a72a8860452681cb455ed164c2913743493b1f0

PatchWorks
http://patchwork.kernel.org/patch/108773/

Git (Likely to change, and takes a while to get mirrored)
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=9a72a8860452681cb455ed164c2913743493b1f0



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

end of thread, other threads:[~2010-07-07 11:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-30  8:47 [PATCH 0/1] Prefetch support for DMA transfer Samu Onkalo
2010-06-30  8:47 ` [PATCH 1/1] omap: dma: Support for prefetch in destination synchronized transfer Samu Onkalo
2010-07-07 11:48   ` [APPLIED] [PATCH 1/1] omap: dma: Support for prefetch in destination 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.