diff mbox series

[v1,3/5] ixp4xx: Add a ixp4xx hardware crypto kernel module

Message ID 20230619113106.2653595-4-linus.walleij@linaro.org
State Superseded
Headers show
Series Resurrect IXP4xx | expand

Commit Message

Linus Walleij June 19, 2023, 11:31 a.m. UTC
The IXP4xx crypto module must be loaded after the rootfs is
up as it depends on loading some NPE microcode from the file
system.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 package/kernel/linux/modules/crypto.mk | 13 +++++++++++++
 target/linux/ixp4xx/Makefile           |  1 +
 2 files changed, 14 insertions(+)
diff mbox series

Patch

diff --git a/package/kernel/linux/modules/crypto.mk b/package/kernel/linux/modules/crypto.mk
index 248b4d68f9e1..1c83f07330a5 100644
--- a/package/kernel/linux/modules/crypto.mk
+++ b/package/kernel/linux/modules/crypto.mk
@@ -399,6 +399,19 @@  endef
 
 $(eval $(call KernelPackage,crypto-hw-hifn-795x))
 
+define KernelPackage/crypto-hw-ixp4xx
+  TITLE:=Intel IXP4xx crypto accelerator
+  DEPENDS:=@TARGET_ixp4xx +kmod-random-core +kmod-crypto-manager +kmod-crypto-authenc +kmod-crypto-des
+  KCONFIG:= \
+	CONFIG_CRYPTO_HW=y \
+	CONFIG_CRYPTO_DEV_IXP4XX
+  FILES:=$(LINUX_DIR)/drivers/crypto/ixp4xx_crypto.ko
+  AUTOLOAD:=$(call AutoLoad,09,ixp4xx_crypto)
+  $(call AddDepends/crypto)
+endef
+
+$(eval $(call KernelPackage,crypto-hw-ixp4xx))
+
 
 define KernelPackage/crypto-hw-padlock
   TITLE:=VIA PadLock ACE with AES/SHA hw crypto module
diff --git a/target/linux/ixp4xx/Makefile b/target/linux/ixp4xx/Makefile
index 546964a6a876..080576beb237 100644
--- a/target/linux/ixp4xx/Makefile
+++ b/target/linux/ixp4xx/Makefile
@@ -22,6 +22,7 @@  include $(INCLUDE_DIR)/target.mk
 
 DEFAULT_PACKAGES += ixp4xx-microcode \
 	fconfig \
+	kmod-crypto-hw-ixp4xx \
 	kmod-usb-ledtrig-usbport \
 	kmod-leds-gpio