linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ravi Kumar V <kumarrav@codeaurora.org>
To: vinod.koul@intel.com, dan.j.williams@intel.com
Cc: arnd@arndb.de, linux-arch@vger.kernel.org, davidb@codeaurora.org,
	dwalker@fifo99.com, bryanh@codeaurora.org,
	linux@arm.linux.org.uk, tsoni@qualcomm.com,
	johlstei@qualcomm.com, Ravi Kumar V <kumarrav@codeaurora.org>,
	linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/2] dmaengine: Add support for per xfer specific privatedata & box dma
Date: Fri,  6 Jan 2012 18:17:31 +0530	[thread overview]
Message-ID: <1325854052-21402-2-git-send-email-kumarrav@codeaurora.org> (raw)
In-Reply-To: <1325854052-21402-1-git-send-email-kumarrav@codeaurora.org>

Qualcomm MSM have a feature to pass command configuration and
control data along with source,destination and length of transfer
for every transaction, as of now struct scatterlist has no support
to send private data related to each transaction we added private_data
variable for supporting this type of archictures.

Qualcomm MSM also supports BOX mode of dma, currently as there is no
API in dmaengine to support this type of dma we added new API.

Change-Id: Ia9ee19f2c253e68b8e5ff254a57478dcc51014ca
Signed-off-by: Ravi Kumar V <kumarrav@codeaurora.org>
---
 include/asm-generic/scatterlist.h |    1 +
 include/linux/dmaengine.h         |   17 ++++++++++++++++-
 2 files changed, 17 insertions(+), 1 deletions(-)

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;
 };
 
 /*
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index 75f53f8..ea29e73 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -72,10 +72,11 @@ enum dma_transaction_type {
 	DMA_ASYNC_TX,
 	DMA_SLAVE,
 	DMA_CYCLIC,
+	DMA_BOX,
 };
 
 /* last transaction type for creation of the capabilities mask */
-#define DMA_TX_TYPE_END (DMA_CYCLIC + 1)
+#define DMA_TX_TYPE_END (DMA_BOX + 1)
 
 
 /**
@@ -404,6 +405,15 @@ struct dma_tx_state {
 	u32 residue;
 };
 
+
+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;
+};
+
 /**
  * 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);
 
-- 
Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.


  reply	other threads:[~2012-01-06 12:48 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-06 12:47 [PATCH v2 0/2] Add Qualcomm MSM ADM DMAEngine driver Ravi Kumar V
2012-01-06 12:47 ` Ravi Kumar V [this message]
2012-01-07  0:02   ` [PATCH v2 1/2] dmaengine: Add support for per xfer specific privatedata & box dma David Brown
2012-01-17 13:53   ` Vinod Koul
2012-01-20 12:33     ` Ravi Kumar V
2012-01-06 12:47 ` [PATCH v2 2/2] msm: DMAEngine: Add DMAEngine driver based on old MSM DMA APIs Ravi Kumar V
2012-01-07  1:59   ` Daniel Walker
2012-01-07 18:54     ` David Brown
2012-01-07 19:21       ` Russell King - ARM Linux
2012-01-08  0:13         ` Daniel Walker
2012-01-08  0:21           ` Russell King - ARM Linux
2012-01-09 11:11     ` Ravi Kumar V
2012-01-17  6:26       ` Ravi Kumar V
2012-01-17  6:32       ` Ravi Kumar V
2012-01-17 14:35     ` Vinod Koul
2012-01-20 12:47       ` Ravi Kumar V
2012-01-17 14:31   ` Vinod Koul
2012-01-20 12:46     ` Ravi Kumar V
2012-01-17 13:45 ` [PATCH v2 0/2] Add Qualcomm MSM ADM DMAEngine driver Vinod Koul
2012-01-20 12:30   ` Ravi Kumar V
2012-01-20 13:31     ` Vinod Koul
2012-01-23 11:11       ` Ravi Kumar V
2012-01-23 13:51         ` Vinod Koul
2012-01-25 13:11           ` Ravi Kumar V
2012-01-30  7:53             ` Ravi Kumar V
2012-01-30  8:15             ` Vinod Koul
2012-01-31  5:59               ` Ravi Kumar V
2012-01-31  6:09                 ` Vinod Koul
2012-02-01  6:16                   ` Ravi Kumar V
2012-02-01  8:29                     ` Vinod Koul
2012-02-01  8:38                       ` Ravi Kumar V
     [not found]                       ` <4F28F9D5.6020801@codeaurora.org>
     [not found]                         ` <1328086017.1610.13.camel@vkoul-udesk3>
2012-02-01  9:08                           ` Ravi Kumar V

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1325854052-21402-2-git-send-email-kumarrav@codeaurora.org \
    --to=kumarrav@codeaurora.org \
    --cc=arnd@arndb.de \
    --cc=bryanh@codeaurora.org \
    --cc=dan.j.williams@intel.com \
    --cc=davidb@codeaurora.org \
    --cc=dwalker@fifo99.com \
    --cc=johlstei@qualcomm.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=tsoni@qualcomm.com \
    --cc=vinod.koul@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).