kernel: crypto: add atmel i2c hw accelerator support
authorTianling Shen <cnsztl@immortalwrt.org>
Wed, 16 Oct 2024 08:05:40 +0000 (16:05 +0800)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 22 Dec 2024 17:19:16 +0000 (18:19 +0100)
Add support for Microchip / Atmel ECC/SHA/RNG hw accelerator.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/17253
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
package/kernel/linux/modules/crypto.mk

index 2257a36c802cdaf576c535758e7b2d0ba877d589..78c971217646858632a87aa6eb777fe5ce24cfdc 100644 (file)
@@ -366,6 +366,26 @@ endef
 $(eval $(call KernelPackage,crypto-hmac))
 
 
+define KernelPackage/crypto-hw-atmel
+  TITLE:=Microchip / Atmel ECC/SHA/RNG hw accelerator
+  DEPENDS:=+kmod-i2c-core +kmod-crypto-ecdh +kmod-crypto-sha1 \
+       +kmod-crypto-sha256 +kmod-lib-crc16 +kmod-random-core
+  KCONFIG:= \
+       CONFIG_CRYPTO_HW=y \
+       CONFIG_CRYPTO_DEV_ATMEL_I2C \
+       CONFIG_CRYPTO_DEV_ATMEL_ECC \
+       CONFIG_CRYPTO_DEV_ATMEL_SHA204A
+  FILES:= \
+       $(LINUX_DIR)/drivers/crypto/atmel-i2c.ko \
+       $(LINUX_DIR)/drivers/crypto/atmel-ecc.ko \
+       $(LINUX_DIR)/drivers/crypto/atmel-sha204a.ko
+  AUTOLOAD:=$(call AutoLoad,09,atmel-i2c atmel-ecc atmel-sha204a)
+  $(call AddDepends/crypto)
+endef
+
+$(eval $(call KernelPackage,crypto-hw-atmel))
+
+
 define KernelPackage/crypto-hw-ccp
   TITLE:=AMD Cryptographic Coprocessor
   DEPENDS:= \