Skip to content

Commit

Permalink
crypto: amlogic - Add crypto accelerator for amlogic GXL
Browse files Browse the repository at this point in the history
This patch adds support for the amlogic GXL cryptographic offloader present
on GXL SoCs.

This driver supports AES cipher in CBC/ECB mode.

Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
Corentin Labbe authored and Herbert Xu committed Oct 25, 2019
1 parent f1fb7ea commit 48fe583
Show file tree
Hide file tree
Showing 7 changed files with 911 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/crypto/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -808,4 +808,6 @@ config CRYPTO_DEV_CCREE

source "drivers/crypto/hisilicon/Kconfig"

source "drivers/crypto/amlogic/Kconfig"

endif # CRYPTO_HW
1 change: 1 addition & 0 deletions drivers/crypto/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,4 @@ obj-$(CONFIG_CRYPTO_DEV_BCM_SPU) += bcm/
obj-$(CONFIG_CRYPTO_DEV_SAFEXCEL) += inside-secure/
obj-$(CONFIG_CRYPTO_DEV_ARTPEC6) += axis/
obj-y += hisilicon/
obj-$(CONFIG_CRYPTO_DEV_AMLOGIC_GXL) += amlogic/
24 changes: 24 additions & 0 deletions drivers/crypto/amlogic/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
config CRYPTO_DEV_AMLOGIC_GXL
tristate "Support for amlogic cryptographic offloader"
default y if ARCH_MESON
select CRYPTO_BLKCIPHER
select CRYPTO_ENGINE
select CRYPTO_ECB
select CRYPTO_CBC
select CRYPTO_AES
help
Select y here to have support for the cryptographic offloader
available on Amlogic GXL SoC.
This hardware handles AES ciphers in ECB/CBC mode.

To compile this driver as a module, choose M here: the module
will be called amlogic-gxl-crypto.

config CRYPTO_DEV_AMLOGIC_GXL_DEBUG
bool "Enable amlogic stats"
depends on CRYPTO_DEV_AMLOGIC_GXL
depends on DEBUG_FS
help
Say y to enable amlogic-crypto debug stats.
This will create /sys/kernel/debug/gxl-crypto/stats for displaying
the number of requests per flow and per algorithm.
2 changes: 2 additions & 0 deletions drivers/crypto/amlogic/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
obj-$(CONFIG_CRYPTO_DEV_AMLOGIC_GXL) += amlogic-gxl-crypto.o
amlogic-gxl-crypto-y := amlogic-gxl-core.o amlogic-gxl-cipher.o
Loading

0 comments on commit 48fe583

Please sign in to comment.