[PATCH 2/9] crypto: aes: allow DM AES in SPL

Simon Glass sjg at chromium.org
Thu Jul 2 22:01:35 CEST 2026


Hi James,

On 2026-07-02T01:46:51, James Hilliard <james.hilliard1 at gmail.com> wrote:
> crypto: aes: allow DM AES in SPL
>
> The AES uclass Makefile is already keyed by CONFIG_$(PHASE_)DM_AES,
> but there is no SPL_DM_AES symbol to build it for SPL.
>
> Add the SPL variant so SPL code can use UCLASS_AES providers, for example
> when decrypting FIT images before loading U-Boot proper.
>
> Signed-off-by: James Hilliard <james.hilliard1 at gmail.com>
>
> drivers/crypto/aes/Kconfig | 7 +++++++
>  1 file changed, 7 insertions(+)

> diff --git a/drivers/crypto/aes/Kconfig b/drivers/crypto/aes/Kconfig
> @@ -4,6 +4,13 @@ config DM_AES
> +config SPL_DM_AES
> +     bool "Enable Driver Model for AES crypto operations in SPL"
> +     depends on SPL_DM

This symbol on its own does not build the uclass into SPL, since
drivers/Makefile only descends into crypto/ for SPL builds under
CONFIG_SPL_CRYPTO:

    obj-$(CONFIG_SPL_CRYPTO) += crypto/

Without SPL_CRYPTO, aes-uclass.o is missing and anything using
dm_aes_*() in SPL fails to link. The series only works because the
sun8i-ce driver in patch 7 selects SPL_CRYPTO itself, but the
requirement belongs with this symbol. Please can you add
'select SPL_CRYPTO' (or 'depends on SPL_CRYPTO') here, so SPL_DM_AES
is usable with other drivers too?

Regards,
Simon


More information about the U-Boot mailing list