aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/dma.c
diff options
context:
space:
mode:
authorSamu Onkalo <samu.p.onkalo@nokia.com>2010-08-02 07:21:40 -0400
committerTony Lindgren <tony@atomide.com>2010-08-02 07:21:40 -0400
commit72a1179ed41e0fc6bd5eb58e02e8d230eba10e24 (patch)
treebfb28f4becca1ed753c2c0d10d14c4280b9f66b3 /arch/arm/plat-omap/dma.c
parent5ebc0d526af51d84b3d6fbf27b69f8d44f277064 (diff)
omap: dma: Support for prefetch in destination synchronizedtransfer
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> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/plat-omap/dma.c')
-rw-r--r--arch/arm/plat-omap/dma.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index f7f571e7987e..ec7eddf9e525 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,
290 val = dma_read(CCR(lch)); 290 val = dma_read(CCR(lch));
291 291
292 /* DMA_SYNCHRO_CONTROL_UPPER depends on the channel number */ 292 /* DMA_SYNCHRO_CONTROL_UPPER depends on the channel number */
293 val &= ~((3 << 19) | 0x1f); 293 val &= ~((1 << 23) | (3 << 19) | 0x1f);
294 val |= (dma_trigger & ~0x1f) << 14; 294 val |= (dma_trigger & ~0x1f) << 14;
295 val |= dma_trigger & 0x1f; 295 val |= dma_trigger & 0x1f;
296 296
@@ -304,11 +304,14 @@ void omap_set_dma_transfer_params(int lch, int data_type, int elem_count,
304 else 304 else
305 val &= ~(1 << 18); 305 val &= ~(1 << 18);
306 306
307 if (src_or_dst_synch) 307 if (src_or_dst_synch == OMAP_DMA_DST_SYNC_PREFETCH) {
308 val &= ~(1 << 24); /* dest synch */
309 val |= (1 << 23); /* Prefetch */
310 } else if (src_or_dst_synch) {
308 val |= 1 << 24; /* source synch */ 311 val |= 1 << 24; /* source synch */
309 else 312 } else {
310 val &= ~(1 << 24); /* dest synch */ 313 val &= ~(1 << 24); /* dest synch */
311 314 }
312 dma_write(val, CCR(lch)); 315 dma_write(val, CCR(lch));
313 } 316 }
314 317