Skip to content

Commit 06f751b

Browse files
montjoieherbertx
authored andcommitted
crypto: allwinner - Add sun8i-ce Crypto Engine
The Crypto Engine is an hardware cryptographic offloader present on all recent Allwinner SoCs H2+, H3, R40, A64, H5, H6 This driver supports AES cipher in CBC/ECB mode. Acked-by: Maxime Ripard <[email protected]> Signed-off-by: Corentin Labbe <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent 3914b93 commit 06f751b

File tree

6 files changed

+1394
-0
lines changed

6 files changed

+1394
-0
lines changed

drivers/crypto/allwinner/Kconfig

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,30 @@ config CRYPTO_DEV_ALLWINNER
44
default y if ARCH_SUNXI
55
help
66
Say Y here to get to see options for Allwinner hardware crypto devices
7+
8+
config CRYPTO_DEV_SUN8I_CE
9+
tristate "Support for Allwinner Crypto Engine cryptographic offloader"
10+
select CRYPTO_BLKCIPHER
11+
select CRYPTO_ENGINE
12+
select CRYPTO_ECB
13+
select CRYPTO_CBC
14+
select CRYPTO_AES
15+
select CRYPTO_DES
16+
depends on CRYPTO_DEV_ALLWINNER
17+
depends on PM
18+
help
19+
Select y here to have support for the crypto Engine availlable on
20+
Allwinner SoC H2+, H3, H5, H6, R40 and A64.
21+
The Crypto Engine handle AES/3DES ciphers in ECB/CBC mode.
22+
23+
To compile this driver as a module, choose M here: the module
24+
will be called sun8i-ce.
25+
26+
config CRYPTO_DEV_SUN8I_CE_DEBUG
27+
bool "Enable sun8i-ce stats"
28+
depends on CRYPTO_DEV_SUN8I_CE
29+
depends on DEBUG_FS
30+
help
31+
Say y to enable sun8i-ce debug stats.
32+
This will create /sys/kernel/debug/sun8i-ce/stats for displaying
33+
the number of requests per flow and per algorithm.

drivers/crypto/allwinner/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
obj-$(CONFIG_CRYPTO_DEV_SUN8I_CE) += sun8i-ce/
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
obj-$(CONFIG_CRYPTO_DEV_SUN8I_CE) += sun8i-ce.o
2+
sun8i-ce-y += sun8i-ce-core.o sun8i-ce-cipher.o

0 commit comments

Comments
 (0)