On Fri, 2012-01-06 at 18:17 +0530, Ravi Kumar V wrote:We are using DMA-Engine framework for both SG mode and BOX mode of our HW.what do you plan to pass here. Please keep in mind this is a generic
diff --git a/include/asm-generic/scatterlist.h b/include/asm-generic/scatterlist.h
index 5de0735..e66dfcb 100644
--- a/include/asm-generic/scatterlist.h
+++ b/include/asm-generic/scatterlist.h
@@ -14,6 +14,7 @@ struct scatterlist {
#ifdef CONFIG_NEED_SG_DMA_LENGTH
unsigned int dma_length;
#endif
+ unsigned long private_data;
scatterlist structure, and modifying it for your purposes doesn't seem
to be a great one!
Also why can't you pass this as addition argument in your new "BOX API"?
Yes this interleaved pattern.
};again a private data here?
/*
+
+struct dma_box_list {
+ dma_addr_t dma_row_address;
+ unsigned int dma_row_len;
+ unsigned int dma_row_num;
+ unsigned int dma_row_offset;
+ unsigned long private_data;
+};
is this some kind of interleaved pattern?
We are doing interleaved pattern of data transfer between source and destination boxs, num_list is number of box mode commands+still not clean what kind of transfer do you want to do here
/**
* struct dma_device - info on the entity supplying DMA services
* @chancnt: how many DMA channels are supported
@@ -497,6 +507,11 @@ struct dma_device {
struct dma_async_tx_descriptor *(*device_prep_dma_cyclic)(
struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len,
size_t period_len, enum dma_data_direction direction);
+ struct dma_async_tx_descriptor *(*device_prep_dma_box)(
+ struct dma_chan *chan, struct dma_box_list *dst_box,
+ struct dma_box_list *src_box, unsigned int num_list,
+ unsigned long flags);
+
int (*device_control)(struct dma_chan *chan, enum dma_ctrl_cmd cmd,
unsigned long arg);