Skip to contentSkip to conversation

crypto: talitos - Add talitos2.c to isolate SEC2 specific functions

PATCH Superseded Christophe Leroy 1 participant 1 message Mar 5, 2015 Crypto API

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 6/17 crypto: talitos - Add talitos2.c to isolate SEC2 specific functions

SEC1 doesn't have IPSec descriptor, so all functions using that descriptor are specific to SEC2. This patch moves them in a new talitos2.c file dedicated to SEC2
We also move to talitos2.c all the functions that will be different for SEC1, like the handling of mapping/unmapping of input/output scatterlists

We move to talitos.h some of the helpers that are used by both talitos.c and talitos2.c

---
 drivers/crypto/Kconfig    |   4 +
 drivers/crypto/Makefile   |   1 +
 drivers/crypto/talitos.c  | 666 +---------------------------------------------
 drivers/crypto/talitos.h  | 135 ++++++++++
 drivers/crypto/talitos2.c | 614 ++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 760 insertions(+), 660 deletions(-)
 create mode 100644 drivers/crypto/talitos2.c
drivers/crypto/Kconfig +4 -0
index 2fb0fdf..4fd6d7e 100644
@@ -211,6 +211,7 @@ config CRYPTO_DEV_TALITOS
 	select CRYPTO_ALGAPI
 	select CRYPTO_AUTHENC
 	select HW_RANDOM
+	select CRYPTO_DEV_TALITOS2
 	depends on FSL_SOC
 	help
 	  Say 'Y' here to use the Freescale Security Engine (SEC)
@@ -222,6 +223,9 @@ config CRYPTO_DEV_TALITOS
 	  To compile this driver as a module, choose M here: the module
 	  will be called talitos.
 
+config CRYPTO_DEV_TALITOS2
+	bool
+
 config CRYPTO_DEV_IXP4XX
 	tristate "Driver for IXP4xx crypto hardware acceleration"
 	depends on ARCH_IXP4XX && IXP4XX_QMGR && IXP4XX_NPE
drivers/crypto/Makefile +1 -0
index 3924f93..f26159f 100644
@@ -22,6 +22,7 @@ obj-$(CONFIG_CRYPTO_DEV_PPC4XX) += amcc/
 obj-$(CONFIG_CRYPTO_DEV_S5P) += s5p-sss.o
 obj-$(CONFIG_CRYPTO_DEV_SAHARA) += sahara.o
 obj-$(CONFIG_CRYPTO_DEV_TALITOS) += talitos.o
+obj-$(CONFIG_CRYPTO_DEV_TALITOS2) += talitos2.o
 obj-$(CONFIG_CRYPTO_DEV_UX500) += ux500/
 obj-$(CONFIG_CRYPTO_DEV_QAT) += qat/
 obj-$(CONFIG_CRYPTO_DEV_QCE) += qce/
drivers/crypto/talitos.c +6 -660

735 lines not on this page · raw message

drivers/crypto/talitos.h +135 -0

146 lines not on this page · raw message

drivers/crypto/talitos2.c new file +614 -0

614 lines not on this page · raw message

Signature · 1 line
2.1.0