From 92055e138f2873034e2dfd7e1308e30c9bbef3b1 Mon Sep 17 00:00:00 2001 From: Alexandru Gagniuc Date: Thu, 2 Sep 2021 19:54:21 -0500 Subject: image: Drop if/elseif hash selection in calculate_hash() calculate_hash() would try to select the appropriate hashing function by a if/elseif contruct. But that is exactly why hash_lookup_algo() exists, so use it instead. This does mean that we now have to 'select HASH' to make sure we get the hash_lookup_algo() symbol. However, the change makes sense because even basic FITs will have to deal with "hash" nodes. My only concern is that the 'select SPL_HASH' might cause some platform to grow above its SPL size allowance Signed-off-by: Alexandru Gagniuc [trini: Make FSL_CAAM be implied only on ARM && SPL] Signed-off-by: Tom Rini --- drivers/crypto/fsl/Kconfig | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers') diff --git a/drivers/crypto/fsl/Kconfig b/drivers/crypto/fsl/Kconfig index 1f5dfb94bb8..94ff5401119 100644 --- a/drivers/crypto/fsl/Kconfig +++ b/drivers/crypto/fsl/Kconfig @@ -1,6 +1,8 @@ config FSL_CAAM bool "Freescale Crypto Driver Support" select SHA_HW_ACCEL + # hw_sha1() under drivers/crypto, and needed with SHA_HW_ACCEL + imply SPL_CRYPTO if (ARM && SPL) imply CMD_HASH help Enables the Freescale's Cryptographic Accelerator and Assurance -- cgit v1.3.1