[PATCH v20 4/4] crypto: spacc - Add SPAcc Kconfig and Makefile
Pavitrakumar Managutte <[email protected]> Wed, 5 Aug 2026 22:18:15 +0530
| Newsgroups | org.kernel.vger.linux-crypto,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
Add Makefile and Kconfig for SPAcc driver. Acked-by: Ross Bannerman <[email protected]> Signed-off-by: Pavitrakumar Managutte <[email protected]> --- drivers/crypto/Kconfig | 1 + drivers/crypto/Makefile | 1 + drivers/crypto/dwc-spacc/Kconfig | 64 +++++++++++++++++++++++++++++++ drivers/crypto/dwc-spacc/Makefile | 7 ++++ 4 files changed, 73 insertions(+) create mode 100644 drivers/crypto/dwc-spacc/Kconfig create mode 100644 drivers/crypto/dwc-spacc/Makefile diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig index 0189dfdcbbe11..e0a8de643d6fa 100644 --- a/drivers/crypto/Kconfig +++ b/drivers/crypto/Kconfig @@ -734,6 +734,7 @@ config CRYPTO_DEV_BCM_SPU ahash, and aead algorithms with the kernel cryptographic API. source "drivers/crypto/stm32/Kconfig" +source "drivers/crypto/dwc-spacc/Kconfig" config CRYPTO_DEV_SAFEXCEL tristate "Inside Secure's SafeXcel cryptographic engine driver" diff --git a/drivers/crypto/Makefile b/drivers/crypto/Makefile index 2c33b83f3cfa6..b80f211598bbc 100644 --- a/drivers/crypto/Makefile +++ b/drivers/crypto/Makefile @@ -40,6 +40,7 @@ obj-$(CONFIG_CRYPTO_DEV_BCM_SPU) += bcm/ obj-y += inside-secure/ obj-$(CONFIG_CRYPTO_DEV_ARTPEC6) += axis/ obj-y += xilinx/ +obj-y += dwc-spacc/ obj-y += hisilicon/ obj-$(CONFIG_CRYPTO_DEV_AMLOGIC_GXL) += amlogic/ obj-y += intel/ diff --git a/drivers/crypto/dwc-spacc/Kconfig b/drivers/crypto/dwc-spacc/Kconfig new file mode 100644 index 0000000000000..40f7190d7980e --- /dev/null +++ b/drivers/crypto/dwc-spacc/Kconfig @@ -0,0 +1,64 @@ +# SPDX-License-Identifier: GPL-2.0-only + +config CRYPTO_DEV_SPACC + tristate "Support for dwc_spacc Security Protocol Accelerator" + depends on HAS_DMA + depends on HAS_IOMEM + select CRYPTO_ENGINE + select CRYPTO_HASH if CRYPTO_DEV_SPACC_HASH + select CRYPTO_SHA1 if CRYPTO_DEV_SPACC_HASH + select CRYPTO_MD5 if CRYPTO_DEV_SPACC_HASH + select CRYPTO_SHA256 if CRYPTO_DEV_SPACC_HASH + select CRYPTO_SHA512 if CRYPTO_DEV_SPACC_HASH + select CRYPTO_HMAC if CRYPTO_DEV_SPACC_HASH + select CRYPTO_CMAC if CRYPTO_DEV_SPACC_HASH + select CRYPTO_XCBC if CRYPTO_DEV_SPACC_HASH + select CRYPTO_AES if CRYPTO_DEV_SPACC_HASH + select CRYPTO_SM4_GENERIC if CRYPTO_DEV_SPACC_HASH + default n + + help + This enables support for SPAcc Hardware Accelerator. + +if CRYPTO_DEV_SPACC + +config CRYPTO_DEV_SPACC_HASH + bool "Enable HASH functionality" + default CRYPTO_DEV_SPACC + help + Say y to enable Hash functionality of SPAcc. + +config CRYPTO_DEV_SPACC_AUTODETECT + bool "Enable Autodetect functionality" + default n + help + Say y to enable Autodetect functionality of SPAcc. + +config CRYPTO_DEV_SPACC_DEBUG_TRACE_IO + bool "Enable Trace MMIO reads/writes stats" + default n + help + Say y to enable Trace MMIO reads/writes stats. + To Debug and trace IO register read/write operations. + +config CRYPTO_DEV_SPACC_DEBUG_TRACE_DDT + bool "Enable Trace DDT entries stats" + default n + help + Say y to enable Enable DDT entry stats. + To Debug and trace DDT operation + +config CRYPTO_DEV_SPACC_SECURE_MODE + bool "Enable Spacc secure mode stats" + default n + help + Say y to enable SPAcc secure modes stats. + +config CRYPTO_DEV_SPACC_CONFIG_DEBUG + bool "Enable SPAcc debug logs" + default n + help + Say y to enable additional debug prints and diagnostics in the + SPAcc driver. Disable this for production builds. + +endif # CRYPTO_DEV_SPACC diff --git a/drivers/crypto/dwc-spacc/Makefile b/drivers/crypto/dwc-spacc/Makefile new file mode 100644 index 0000000000000..b7125a7797ba0 --- /dev/null +++ b/drivers/crypto/dwc-spacc/Makefile @@ -0,0 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only +obj-$(CONFIG_CRYPTO_DEV_SPACC) += snps-spacc.o + +snps-spacc-y := spacc_hal.o spacc_core.o \ +spacc_manager.o spacc_interrupt.o spacc_device.o + +snps-spacc-$(CONFIG_CRYPTO_DEV_SPACC_HASH) += spacc_ahash.o -- 2.25.1