From: Rameshwar Prasad Sahu <rsahu@apm.com>
To: vinod.koul@intel.com, dan.j.williams@intel.com,
herbert@gondor.apana.org.au, davem@davemloft.net
Cc: linux-crypto@vger.kernel.org, dmaengine@vger.kernel.org,
arnd@arndb.de, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
jcm@redhat.com, patches@apm.com,
Rameshwar Prasad Sahu <rsahu@apm.com>
Subject: [PATCH v1 1/4] dmaengine: Add support for new feature CRC32C
Date: Thu, 30 Jul 2015 17:41:05 +0530 [thread overview]
Message-ID: <1438258268-3099-2-git-send-email-rsahu@apm.com> (raw)
In-Reply-To: <1438258268-3099-1-git-send-email-rsahu@apm.com>
This patch adds support for new feature CRC32C calculation in
dmaengine framework.
Signed-of-by: Rameshwar Prasad Sahu<rsahu@apm.com>
---
drivers/dma/dmaengine.c | 2 ++
include/linux/dmaengine.h | 5 +++++
2 files changed, 7 insertions(+)
diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c
index 4a4cce1..55ba799 100644
--- a/drivers/dma/dmaengine.c
+++ b/drivers/dma/dmaengine.c
@@ -853,6 +853,8 @@ int dma_async_device_register(struct dma_device *device)
!device->device_prep_dma_cyclic);
BUG_ON(dma_has_cap(DMA_INTERLEAVE, device->cap_mask) &&
!device->device_prep_interleaved_dma);
+ BUG_ON(dma_has_cap(DMA_CRC32C, device->cap_mask) &&
+ !device->device_prep_dma_crc32c);
BUG_ON(!device->device_tx_status);
BUG_ON(!device->device_issue_pending);
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index e2f5eb4..9da70b6 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -73,6 +73,7 @@ enum dma_transaction_type {
DMA_SLAVE,
DMA_CYCLIC,
DMA_INTERLEAVE,
+ DMA_CRC32C,
/* last transaction type for creation of the capabilities mask */
DMA_TX_TYPE_END,
};
@@ -622,6 +623,7 @@ struct dma_tx_state {
* The function takes a buffer of size buf_len. The callback function will
* be called after period_len bytes have been transferred.
* @device_prep_interleaved_dma: Transfer expression in a generic way.
+ * @device_prep_dma_crc32c: prepares a crc32c operation
* @device_config: Pushes a new configuration to a channel, return 0 or an error
* code
* @device_pause: Pauses any transfer happening on a channel. Returns
@@ -701,6 +703,9 @@ struct dma_device {
struct dma_async_tx_descriptor *(*device_prep_interleaved_dma)(
struct dma_chan *chan, struct dma_interleaved_template *xt,
unsigned long flags);
+ struct dma_async_tx_descriptor *(*device_prep_dma_crc32c)(
+ struct dma_chan *chan, struct scatterlist *src_sg, size_t len,
+ unsigned int seed, u8 *result, unsigned long flags);
int (*device_config)(struct dma_chan *chan,
struct dma_slave_config *config);
--
1.8.2.1
next prev parent reply other threads:[~2015-07-30 12:11 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-30 12:11 [PATCH v1 0/4] Crypto: tcrypt: Add test case for APM X-Gene SoC CRC32C algo Rameshwar Prasad Sahu
2015-07-30 12:11 ` Rameshwar Prasad Sahu [this message]
2015-08-20 5:26 ` [PATCH v1 1/4] dmaengine: Add support for new feature CRC32C Vinod Koul
2015-08-20 6:29 ` Rameshwar Sahu
2015-08-20 7:08 ` Vinod Koul
2015-08-20 7:48 ` Rameshwar Sahu
2015-07-30 12:11 ` [PATCH v1 2/4] dmaengine: xgene-dma: Add support for CRC32C calculation via DMA engine Rameshwar Prasad Sahu
2015-08-20 5:40 ` Vinod Koul
2015-08-20 6:53 ` Rameshwar Sahu
2015-08-20 7:09 ` Vinod Koul
2015-07-30 12:11 ` [PATCH v1 3/4] Crypto: Add support for APM X-Gene SoC CRC32C h/w accelerator driver Rameshwar Prasad Sahu
2015-07-31 7:13 ` Herbert Xu
[not found] ` <20150731071358.GA25228-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org>
2015-07-31 9:12 ` Rameshwar Sahu
2015-08-20 5:48 ` Vinod Koul
2015-08-20 7:01 ` Rameshwar Sahu
2015-08-20 7:10 ` Vinod Koul
2015-07-30 12:11 ` [PATCH v1 4/4] Crypto: tcrypt: Add test case for APM X-Gene SoC CRC32C algo Rameshwar Prasad Sahu
2015-07-30 12:20 ` [PATCH v1 0/4] " Rameshwar Sahu
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=1438258268-3099-2-git-send-email-rsahu@apm.com \
--to=rsahu@apm.com \
--cc=arnd@arndb.de \
--cc=dan.j.williams@intel.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=herbert@gondor.apana.org.au \
--cc=jcm@redhat.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@apm.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).