[PATCH 3/4] dmatest: add dmaengine_slave_config for DMA_MEMCPY

Zhangfei Gao zhangfei.gao at marvell.com
Fri Jul 27 00:46:21 EDT 2012


Set direction to DMA_MEM_TO_MEM
DMA driver may require such configure info

Signed-off-by: Zhangfei Gao <zhangfei.gao at marvell.com>
---
 drivers/dma/dmatest.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c
index 24225f0..73bab68 100644
--- a/drivers/dma/dmatest.c
+++ b/drivers/dma/dmatest.c
@@ -261,6 +261,9 @@ static int dmatest_func(void *data)
 	int			src_cnt;
 	int			dst_cnt;
 	int			i;
+	struct dma_slave_config conf = {
+		.direction = DMA_MEM_TO_MEM,
+	};
 
 	thread_name = current->comm;
 	set_freezable();
@@ -361,6 +364,7 @@ static int dmatest_func(void *data)
 						     DMA_BIDIRECTIONAL);
 		}
 
+		dmaengine_slave_config(chan, &conf);
 
 		if (thread->type == DMA_MEMCPY)
 			tx = dev->device_prep_dma_memcpy(chan,
-- 
1.7.1




More information about the linux-arm-kernel mailing list