Re: [PATCH v14 4/4] crypto: spacc - Add SPAcc Kconfig and Makefile

From: Julian Braha

Date: Tue Jun 23 2026 - 12:10:26 EST


Hi Pavitrakumar,

On 6/19/26 15:45, Pavitrakumar Managutte wrote:

> diff --git a/drivers/crypto/dwc-spacc/Kconfig b/drivers/crypto/dwc-spacc/Kconfig
> new file mode 100644
> index 0000000000000..b253f8dc539c1
> --- /dev/null
> +++ b/drivers/crypto/dwc-spacc/Kconfig
> @@ -0,0 +1,87 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +
> +config CRYPTO_DEV_SPACC
> + tristate "Support for dwc_spacc Security Protocol Accelerator"
> + depends on HAS_DMA
> + select CRYPTO_ENGINE
> + default n
> +
> + help
> + This enables support for SPAcc Hardware Accelerator.
> +
> +config CRYPTO_DEV_SPACC_HASH
> + bool "Enable HASH functionality"
> + depends on CRYPTO_DEV_SPACC
> + default y
> + select CRYPTO_HASH
> + select CRYPTO_SHA1
> + select CRYPTO_MD5
> + select CRYPTO_SHA256
> + select CRYPTO_SHA512
> + select CRYPTO_HMAC
> + select CRYPTO_SM3
> + select CRYPTO_CMAC
> + select CRYPTO_XCBC
> + select CRYPTO_AES
> + select CRYPTO_SM4_GENERIC
> +
> + help
> + Say y to enable Hash functionality of SPAcc.
> +
> +config CRYPTO_DEV_SPACC_AUTODETECT
> + bool "Enable Autodetect functionality"
> + depends on CRYPTO_DEV_SPACC
> + default y
> + help
> + Say y to enable Autodetect functionality of SPAcc.
> +
> +config CRYPTO_DEV_SPACC_DEBUG_TRACE_IO
> + bool "Enable Trace MMIO reads/writes stats"
> + depends on CRYPTO_DEV_SPACC
> + default n
> + help
> + Say y to enable Trace MMIO reads/writes stats.
> + To Debug and trace IO register read/write oprations.
> +
> +config CRYPTO_DEV_SPACC_DEBUG_TRACE_DDT
> + bool "Enable Trace DDT entries stats"
> + default n
> + depends on CRYPTO_DEV_SPACC
> + help
> + Say y to enable Enable DDT entry stats.
> + To Debug and trace DDT opration
> +
> +config CRYPTO_DEV_SPACC_SECURE_MODE
> + bool "Enable Spacc secure mode stats"
> + default n
> + depends on CRYPTO_DEV_SPACC
> + help
> + Say y to enable SPAcc secure modes stats.
> +
> +config CRYPTO_DEV_SPACC_PRIORITY
> + int "VSPACC priority value"
> + depends on CRYPTO_DEV_SPACC
> + range 0 15
> + default 1
> + help
> + Default arbitration priority weight for this Virtual SPAcc instance.
> + Hardware resets this to 1. Higher values means higher priority.
> +
> +config CRYPTO_DEV_SPACC_INTERNAL_COUNTER
> + int "SPAcc internal counter value"
> + depends on CRYPTO_DEV_SPACC
> + range 100000 1048575
> + default 100000
> + help
> + This value configures a hardware watchdog counter in the SPAcc engine.
> + The counter starts ticking when a completed cryptographic job is
> + sitting in the STATUS FIFO. If the job remains unprocessed for the
> + configured duration, an interrupt is triggered to ensure it is serviced.
> +
> +config CRYPTO_DEV_SPACC_CONFIG_DEBUG
> + bool "Enable SPAcc debug logs"
> + default n
> + depends on CRYPTO_DEV_SPACC
Just a kconfig style thing, it would be a bit cleaner to factor out the
repeated 'depends on CRYPTO_DEV_SPACC' by wrapping the options
in:
`if CRYPTO_DEV_SPACC .. endif`

- Julian Braha