Skip to contentSkip to conversation

Crypto: Talitos: Support for Async_tx XOR offload

PATCH New Vishnu Suresh 1 participant 1 message Dec 14, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Crypto: Talitos: Support for Async_tx XOR offload

Expose Talitos's XOR functionality to be used for
RAID Parity calculation via the Async_tx layer.

Thanks to Surender Kumar and Lee Nipper for their help in realising this driver

---
Changes with respect to v0 as per comments received o. Removed ASYNC_XOR selection from Kconfig
o. Use dma_run_dependencies API instead of scheduling directly from release path
o. Change spinlock_irqsave to spin_lock_bh
o. Removed setting async_tx_ack
o. Removed unnecessary initialization.
o. Rebased to linux-next as of 20091214

 drivers/crypto/Kconfig   |    1 +
 drivers/crypto/talitos.c |  397 +++++++++++++++++++++++++++++++++++++++++++++-
 drivers/crypto/talitos.h |    2 +
 3 files changed, 399 insertions(+), 1 deletions(-)
drivers/crypto/Kconfig +1 -0
index b08403d..fe406b2 100644
@@ -192,6 +192,7 @@ config CRYPTO_DEV_TALITOS
 	select CRYPTO_ALGAPI
 	select CRYPTO_AUTHENC
 	select HW_RANDOM
+	select DMA_ENGINE
 	depends on FSL_SOC
 	help
 	  Say 'Y' here to use the Freescale Security Engine (SEC)
drivers/crypto/talitos.c +396 -1

433 lines not on this page · raw message

drivers/crypto/talitos.h +2 -0
index ff5a145..b6197bc 100644
@@ -155,6 +155,7 @@
 /* primary execution unit mode (MODE0) and derivatives */
 #define	DESC_HDR_MODE0_ENCRYPT		cpu_to_be32(0x00100000)
 #define	DESC_HDR_MODE0_AESU_CBC		cpu_to_be32(0x00200000)
+#define	DESC_HDR_MODE0_AESU_XOR		cpu_to_be32(0x0c600000)
 #define	DESC_HDR_MODE0_DEU_CBC		cpu_to_be32(0x00400000)
 #define	DESC_HDR_MODE0_DEU_3DES		cpu_to_be32(0x00200000)
 #define	DESC_HDR_MODE0_MDEU_INIT	cpu_to_be32(0x01000000)
@@ -202,6 +203,7 @@
 #define DESC_HDR_TYPE_IPSEC_ESP			cpu_to_be32(1 << 3)
 #define DESC_HDR_TYPE_COMMON_NONSNOOP_NO_AFEU	cpu_to_be32(2 << 3)
 #define DESC_HDR_TYPE_HMAC_SNOOP_NO_AFEU	cpu_to_be32(4 << 3)
+#define DESC_HDR_TYPE_RAID_XOR			cpu_to_be32(21 << 3)
 
 /* link table extent field bits */
 #define DESC_PTR_LNKTBL_JUMP			0x80
Signature · 1 line
1.6.4.2