Skip to content

Commit f63601f

Browse files
Boris BREZILLONherbertx
authored andcommitted
crypto: marvell/cesa - add a new driver for Marvell's CESA
The existing mv_cesa driver supports some features of the CESA IP but is quite limited, and reworking it to support new features (like involving the TDMA engine to offload the CPU) is almost impossible. This driver has been rewritten from scratch to take those new features into account. This commit introduce the base infrastructure allowing us to add support for DMA optimization. It also includes support for one hash (SHA1) and one cipher (AES) algorithm, and enable those features on the Armada 370 SoC. Other algorithms and platforms will be added later on. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Arnaud Ebalard <arno@natisbad.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent 1fa2e9a commit f63601f

File tree

7 files changed

+2040
-0
lines changed

7 files changed

+2040
-0
lines changed

drivers/crypto/Kconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,21 @@ config CRYPTO_DEV_MV_CESA
173173

174174
Currently the driver supports AES in ECB and CBC mode without DMA.
175175

176+
config CRYPTO_DEV_MARVELL_CESA
177+
tristate "New Marvell's Cryptographic Engine driver"
178+
depends on (PLAT_ORION || ARCH_MVEBU || COMPILE_TEST) && HAS_DMA && HAS_IOMEM
179+
select CRYPTO_AES
180+
select CRYPTO_DES
181+
select CRYPTO_BLKCIPHER
182+
select CRYPTO_HASH
183+
select SRAM
184+
help
185+
This driver allows you to utilize the Cryptographic Engines and
186+
Security Accelerator (CESA) which can be found on the Armada 370.
187+
188+
This driver is aimed at replacing the mv_cesa driver. This will only
189+
happen once it has received proper testing.
190+
176191
config CRYPTO_DEV_NIAGARA2
177192
tristate "Niagara2 Stream Processing Unit driver"
178193
select CRYPTO_DES

drivers/crypto/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ obj-$(CONFIG_CRYPTO_DEV_HIFN_795X) += hifn_795x.o
99
obj-$(CONFIG_CRYPTO_DEV_IMGTEC_HASH) += img-hash.o
1010
obj-$(CONFIG_CRYPTO_DEV_IXP4XX) += ixp4xx_crypto.o
1111
obj-$(CONFIG_CRYPTO_DEV_MV_CESA) += mv_cesa.o
12+
obj-$(CONFIG_CRYPTO_DEV_MARVELL_CESA) += marvell/
1213
obj-$(CONFIG_CRYPTO_DEV_MXS_DCP) += mxs-dcp.o
1314
obj-$(CONFIG_CRYPTO_DEV_NIAGARA2) += n2_crypto.o
1415
n2_crypto-y := n2_core.o n2_asm.o

drivers/crypto/marvell/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
obj-$(CONFIG_CRYPTO_DEV_MARVELL_CESA) += marvell-cesa.o
2+
marvell-cesa-objs := cesa.o cipher.o hash.o

0 commit comments

Comments
 (0)