summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2017-05-15 12:17:49 -0400
committerTom Rini <trini@konsulko.com>2017-05-22 08:36:58 -0400
commit089df18bfe9dd6e98f34807247ec77e0e1b5f7a2 (patch)
treeb8e2a2fa03586d1f08bf58eea9645d0f9a3b50fd
parent0db7f6859fef41c1e95bcef75761054a01782d1b (diff)
lib: move hash CONFIG options to Kconfig
Commit 94e3c8c4fd7b ("crypto/fsl - Add progressive hashing support using hardware acceleration.") created entries for CONFIG_SHA1, CONFIG_SHA256, CONFIG_SHA_HW_ACCEL, and CONFIG_SHA_PROG_HW_ACCEL. However, no defconfig has migrated to it. Complete the move by first adding additional logic to various Kconfig files to select this when required and then use the moveconfig tool. In many cases we can select these because they are required to implement other drivers. We also correct how we include the various hashing algorithms in SPL. This commit was generated as follows (after Kconfig additions): [1] tools/moveconfig.py -y SHA1 SHA256 SHA_HW_ACCEL [2] tools/moveconfig.py -y SHA_PROG_HW_ACCEL Note: We cannot move SHA_HW_ACCEL and SHA_PROG_HW_ACCEL simultaneously because there is dependency between them. Cc: Poonam Aggrwal <poonam.aggrwal@freescale.com> Cc: Naveen Burmi <NaveenBurmi@freescale.com> Cc: Po Liu <po.liu@freescale.com> Cc: Shengzhou Liu <Shengzhou.Liu@freescale.com> Cc: Priyanka Jain <Priyanka.Jain@freescale.com> Cc: Shaohui Xie <Shaohui.Xie@freescale.com> Cc: Chunhe Lan <Chunhe.Lan@freescale.com> Cc: Chander Kashyap <k.chander@samsung.com> Cc: Steve Rae <steve.rae@raedomain.com> Cc: Dirk Eibach <eibach@gdsys.de> Cc: Feng Li <feng.li_2@nxp.com> Cc: Alison Wang <alison.wang@freescale.com> Cc: Sumit Garg <sumit.garg@nxp.com> Cc: Mingkai Hu <Mingkai.Hu@freescale.com> Cc: York Sun <york.sun@nxp.com> Cc: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com> Cc: Jaehoon Chung <jh80.chung@samsung.com> Cc: Akshay Saraswat <akshay.s@samsung.com> Cc: Heiko Schocher <hs@denx.de> Cc: Jagan Teki <jagan@amarulasolutions.com> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
-rw-r--r--Kconfig2
-rw-r--r--README13
-rw-r--r--arch/arm/include/asm/fsl_secure_boot.h2
-rw-r--r--arch/arm/mach-exynos/Kconfig1
-rw-r--r--arch/powerpc/include/asm/fsl_secure_boot.h1
-rw-r--r--board/freescale/common/Kconfig2
-rw-r--r--common/spl/Kconfig4
-rw-r--r--configs/bcm911360_entphn-ns_defconfig2
-rw-r--r--configs/bcm911360_entphn_defconfig2
-rw-r--r--configs/bcm911360k_defconfig2
-rw-r--r--configs/bcm958300k-ns_defconfig2
-rw-r--r--configs/bcm958300k_defconfig2
-rw-r--r--configs/bcm958305k_defconfig2
-rw-r--r--configs/bcm958622hr_defconfig2
-rw-r--r--configs/controlcenterd_TRAILBLAZER_DEVELOP_defconfig1
-rw-r--r--configs/controlcenterd_TRAILBLAZER_defconfig1
-rw-r--r--drivers/crypto/fsl/Kconfig1
-rw-r--r--include/configs/B4860QDS.h1
-rw-r--r--include/configs/BSC9131RDB.h1
-rw-r--r--include/configs/BSC9132QDS.h1
-rw-r--r--include/configs/C29XPCIE.h1
-rw-r--r--include/configs/P1010RDB.h1
-rw-r--r--include/configs/P2041RDB.h1
-rw-r--r--include/configs/T102xQDS.h1
-rw-r--r--include/configs/T102xRDB.h1
-rw-r--r--include/configs/T1040QDS.h1
-rw-r--r--include/configs/T104xRDB.h1
-rw-r--r--include/configs/T208xQDS.h1
-rw-r--r--include/configs/T208xRDB.h1
-rw-r--r--include/configs/T4240QDS.h1
-rw-r--r--include/configs/T4240RDB.h1
-rw-r--r--include/configs/bcm_ep_board.h2
-rw-r--r--include/configs/controlcenterd.h2
-rw-r--r--include/configs/corenet_ds.h1
-rw-r--r--include/configs/exynos5-common.h3
-rw-r--r--include/configs/ids8313.h2
-rw-r--r--include/configs/imx6qdl_icore.h2
-rw-r--r--include/configs/imx6qdl_icore_rqs.h2
-rw-r--r--include/configs/imx6ul_geam.h2
-rw-r--r--include/configs/imx6ul_isiot.h2
-rw-r--r--include/configs/ls1021aiot.h5
-rw-r--r--include/configs/ls1021aqds.h1
-rw-r--r--include/configs/ls1021atwr.h1
-rw-r--r--include/configs/ls1043a_common.h1
-rw-r--r--include/configs/ls1046a_common.h1
-rw-r--r--include/configs/ls2080a_common.h1
-rw-r--r--include/configs/sandbox.h2
-rw-r--r--include/image.h5
-rw-r--r--lib/Makefile6
49 files changed, 31 insertions, 66 deletions
diff --git a/Kconfig b/Kconfig
index 0a445313f62..1b19b7b76c7 100644
--- a/Kconfig
+++ b/Kconfig
@@ -145,6 +145,7 @@ menu "Boot images"
config FIT
bool "Support Flattened Image Tree"
select MD5
+ select SHA1
help
This option allows you to boot the new uImage structure,
Flattened Image Tree. FIT is formally a FDT, which can include
@@ -159,6 +160,7 @@ if FIT
config FIT_ENABLE_SHA256_SUPPORT
bool "Support SHA256 checksum of FIT image contents"
+ select SHA256
default y
help
Enable this to support SHA256 checksum of FIT image contents. A
diff --git a/README b/README
index 15ef469e6c5..121d44a0c1f 100644
--- a/README
+++ b/README
@@ -2756,19 +2756,6 @@ The following options need to be configured:
Enable the hash verify command (hash -v). This adds to code
size a little.
- CONFIG_SHA1 - This option enables support of hashing using SHA1
- algorithm. The hash is calculated in software.
- CONFIG_SHA256 - This option enables support of hashing using
- SHA256 algorithm. The hash is calculated in software.
- CONFIG_SHA_HW_ACCEL - This option enables hardware acceleration
- for SHA1/SHA256 hashing.
- This affects the 'hash' command and also the
- hash_lookup_algo() function.
- CONFIG_SHA_PROG_HW_ACCEL - This option enables
- hardware-acceleration for SHA1/SHA256 progressive hashing.
- Data can be streamed in a block at a time and the hashing
- is performed in hardware.
-
Note: There is also a sha1sum command, which should perhaps
be deprecated in favour of 'hash sha1'.
diff --git a/arch/arm/include/asm/fsl_secure_boot.h b/arch/arm/include/asm/fsl_secure_boot.h
index c20a3c348d4..bd39b6e267a 100644
--- a/arch/arm/include/asm/fsl_secure_boot.h
+++ b/arch/arm/include/asm/fsl_secure_boot.h
@@ -10,8 +10,6 @@
#ifdef CONFIG_CHAIN_OF_TRUST
#define CONFIG_CMD_ESBC_VALIDATE
#define CONFIG_FSL_SEC_MON
-#define CONFIG_SHA_HW_ACCEL
-#define CONFIG_SHA_PROG_HW_ACCEL
#ifdef CONFIG_SPL_BUILD
/*
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index 46981a5933b..24cb99e466b 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -17,6 +17,7 @@ config ARCH_EXYNOS5
bool "Exynos5 SoC family"
select CPU_V7
select BOARD_EARLY_INIT_F
+ select SHA_HW_ACCEL
help
Samsung Exynos5 SoC family are based on ARM Cortex-A15 CPU (and
Cortex-A7 CPU in big.LITTLE configuration). There are multiple SoCs
diff --git a/arch/powerpc/include/asm/fsl_secure_boot.h b/arch/powerpc/include/asm/fsl_secure_boot.h
index 62ce816b135..8f66fc5182d 100644
--- a/arch/powerpc/include/asm/fsl_secure_boot.h
+++ b/arch/powerpc/include/asm/fsl_secure_boot.h
@@ -101,7 +101,6 @@
#define CONFIG_CMD_ESBC_VALIDATE
#define CONFIG_FSL_SEC_MON
-#define CONFIG_SHA_PROG_HW_ACCEL
#ifndef CONFIG_SPL_BUILD
/*
diff --git a/board/freescale/common/Kconfig b/board/freescale/common/Kconfig
index a5e302f9240..540885786b8 100644
--- a/board/freescale/common/Kconfig
+++ b/board/freescale/common/Kconfig
@@ -3,5 +3,7 @@ config CHAIN_OF_TRUST
imply CMD_BLOB
select FSL_CAAM
select SPL_BOARD_INIT if (ARM && SPL)
+ select SHA_HW_ACCEL
+ select SHA_PROG_HW_ACCEL
bool
default y
diff --git a/common/spl/Kconfig b/common/spl/Kconfig
index 92b476e945d..eabb2d02ec4 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -187,6 +187,7 @@ config SPL_MD5_SUPPORT
config SPL_SHA1_SUPPORT
bool "Support SHA1"
depends on SPL_FIT
+ select SHA1
help
Enable this to support SHA1 in FIT images within SPL. A SHA1
checksum is a 160-bit (20-byte) hash value used to check that the
@@ -198,6 +199,7 @@ config SPL_SHA1_SUPPORT
config SPL_SHA256_SUPPORT
bool "Support SHA256"
depends on SPL_FIT
+ select SHA256
help
Enable this to support SHA256 in FIT images within SPL. A SHA256
checksum is a 256-bit (32-byte) hash value used to check that the
@@ -229,6 +231,8 @@ config SPL_CRYPTO_SUPPORT
config SPL_HASH_SUPPORT
bool "Support hashing drivers"
+ select SHA1
+ select SHA256
depends on SPL
help
Enable hashing drivers in SPL. These drivers can be used to
diff --git a/configs/bcm911360_entphn-ns_defconfig b/configs/bcm911360_entphn-ns_defconfig
index 4f045903bfc..61336d38f0d 100644
--- a/configs/bcm911360_entphn-ns_defconfig
+++ b/configs/bcm911360_entphn-ns_defconfig
@@ -18,4 +18,6 @@ CONFIG_CMD_TIME=y
CONFIG_CMD_FAT=y
# CONFIG_MMC is not set
CONFIG_SYS_NS16550=y
+CONFIG_SHA1=y
+CONFIG_SHA256=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/bcm911360_entphn_defconfig b/configs/bcm911360_entphn_defconfig
index 2469792f68b..cbef3d83650 100644
--- a/configs/bcm911360_entphn_defconfig
+++ b/configs/bcm911360_entphn_defconfig
@@ -18,4 +18,6 @@ CONFIG_CMD_TIME=y
CONFIG_CMD_FAT=y
# CONFIG_MMC is not set
CONFIG_SYS_NS16550=y
+CONFIG_SHA1=y
+CONFIG_SHA256=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/bcm911360k_defconfig b/configs/bcm911360k_defconfig
index 83afce41d60..b1242063619 100644
--- a/configs/bcm911360k_defconfig
+++ b/configs/bcm911360k_defconfig
@@ -18,4 +18,6 @@ CONFIG_CMD_TIME=y
CONFIG_CMD_FAT=y
# CONFIG_MMC is not set
CONFIG_SYS_NS16550=y
+CONFIG_SHA1=y
+CONFIG_SHA256=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/bcm958300k-ns_defconfig b/configs/bcm958300k-ns_defconfig
index b21fea4331e..f271fa06e5c 100644
--- a/configs/bcm958300k-ns_defconfig
+++ b/configs/bcm958300k-ns_defconfig
@@ -18,4 +18,6 @@ CONFIG_CMD_TIME=y
CONFIG_CMD_FAT=y
# CONFIG_MMC is not set
CONFIG_SYS_NS16550=y
+CONFIG_SHA1=y
+CONFIG_SHA256=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/bcm958300k_defconfig b/configs/bcm958300k_defconfig
index 83afce41d60..b1242063619 100644
--- a/configs/bcm958300k_defconfig
+++ b/configs/bcm958300k_defconfig
@@ -18,4 +18,6 @@ CONFIG_CMD_TIME=y
CONFIG_CMD_FAT=y
# CONFIG_MMC is not set
CONFIG_SYS_NS16550=y
+CONFIG_SHA1=y
+CONFIG_SHA256=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/bcm958305k_defconfig b/configs/bcm958305k_defconfig
index 83afce41d60..b1242063619 100644
--- a/configs/bcm958305k_defconfig
+++ b/configs/bcm958305k_defconfig
@@ -18,4 +18,6 @@ CONFIG_CMD_TIME=y
CONFIG_CMD_FAT=y
# CONFIG_MMC is not set
CONFIG_SYS_NS16550=y
+CONFIG_SHA1=y
+CONFIG_SHA256=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/bcm958622hr_defconfig b/configs/bcm958622hr_defconfig
index a639336d94a..9ffbe4b673b 100644
--- a/configs/bcm958622hr_defconfig
+++ b/configs/bcm958622hr_defconfig
@@ -16,4 +16,6 @@ CONFIG_CMD_TIME=y
CONFIG_CMD_FAT=y
# CONFIG_MMC is not set
CONFIG_SYS_NS16550=y
+CONFIG_SHA1=y
+CONFIG_SHA256=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/controlcenterd_TRAILBLAZER_DEVELOP_defconfig b/configs/controlcenterd_TRAILBLAZER_DEVELOP_defconfig
index bc2e7b43310..e85da506fef 100644
--- a/configs/controlcenterd_TRAILBLAZER_DEVELOP_defconfig
+++ b/configs/controlcenterd_TRAILBLAZER_DEVELOP_defconfig
@@ -19,3 +19,4 @@ CONFIG_DM=y
CONFIG_SYS_NS16550=y
CONFIG_TPM_AUTH_SESSIONS=y
CONFIG_TPM=y
+CONFIG_SHA1=y
diff --git a/configs/controlcenterd_TRAILBLAZER_defconfig b/configs/controlcenterd_TRAILBLAZER_defconfig
index 7ec77a1102d..061dd171a98 100644
--- a/configs/controlcenterd_TRAILBLAZER_defconfig
+++ b/configs/controlcenterd_TRAILBLAZER_defconfig
@@ -19,3 +19,4 @@ CONFIG_DM=y
CONFIG_SYS_NS16550=y
CONFIG_TPM_AUTH_SESSIONS=y
CONFIG_TPM=y
+CONFIG_SHA1=y
diff --git a/drivers/crypto/fsl/Kconfig b/drivers/crypto/fsl/Kconfig
index 31889598e8e..3ccd196714a 100644
--- a/drivers/crypto/fsl/Kconfig
+++ b/drivers/crypto/fsl/Kconfig
@@ -1,5 +1,6 @@
config FSL_CAAM
bool "Freescale Crypto Driver Support"
+ select SHA_HW_ACCEL
help
Enables the Freescale's Cryptographic Accelerator and Assurance
Module (CAAM), also known as the SEC version 4 (SEC4). The driver uses
diff --git a/include/configs/B4860QDS.h b/include/configs/B4860QDS.h
index 2041b7bb3e5..e94ac5ea2c0 100644
--- a/include/configs/B4860QDS.h
+++ b/include/configs/B4860QDS.h
@@ -714,7 +714,6 @@ unsigned long get_board_ddr_clk(void);
/* Hash command with SHA acceleration supported in hardware */
#ifdef CONFIG_FSL_CAAM
#define CONFIG_CMD_HASH
-#define CONFIG_SHA_HW_ACCEL
#endif
/*
diff --git a/include/configs/BSC9131RDB.h b/include/configs/BSC9131RDB.h
index 72dc8ba7104..bce6229496f 100644
--- a/include/configs/BSC9131RDB.h
+++ b/include/configs/BSC9131RDB.h
@@ -331,7 +331,6 @@ extern unsigned long get_sdram_size(void);
/* Hash command with SHA acceleration supported in hardware */
#ifdef CONFIG_FSL_CAAM
#define CONFIG_CMD_HASH
-#define CONFIG_SHA_HW_ACCEL
#endif
#ifdef CONFIG_USB_EHCI_HCD
diff --git a/include/configs/BSC9132QDS.h b/include/configs/BSC9132QDS.h
index 1b956fc7da6..b303b4b51b6 100644
--- a/include/configs/BSC9132QDS.h
+++ b/include/configs/BSC9132QDS.h
@@ -528,7 +528,6 @@ combinations. this should be removed later
/* Hash command with SHA acceleration supported in hardware */
#ifdef CONFIG_FSL_CAAM
#define CONFIG_CMD_HASH
-#define CONFIG_SHA_HW_ACCEL
#endif
/*
diff --git a/include/configs/C29XPCIE.h b/include/configs/C29XPCIE.h
index f95c3b9eebb..b8c823cc566 100644
--- a/include/configs/C29XPCIE.h
+++ b/include/configs/C29XPCIE.h
@@ -444,7 +444,6 @@
/* Hash command with SHA acceleration supported in hardware */
#ifdef CONFIG_FSL_CAAM
#define CONFIG_CMD_HASH
-#define CONFIG_SHA_HW_ACCEL
#endif
/*
diff --git a/include/configs/P1010RDB.h b/include/configs/P1010RDB.h
index 867004fb489..ce32f431fcb 100644
--- a/include/configs/P1010RDB.h
+++ b/include/configs/P1010RDB.h
@@ -738,7 +738,6 @@ extern unsigned long get_sdram_size(void);
/* Hash command with SHA acceleration supported in hardware */
#ifdef CONFIG_FSL_CAAM
#define CONFIG_CMD_HASH
-#define CONFIG_SHA_HW_ACCEL
#endif
/*
diff --git a/include/configs/P2041RDB.h b/include/configs/P2041RDB.h
index 7629fe8eb49..66c1bba2f4b 100644
--- a/include/configs/P2041RDB.h
+++ b/include/configs/P2041RDB.h
@@ -607,7 +607,6 @@ unsigned long get_board_sys_clk(unsigned long dummy);
/* Hash command with SHA acceleration supported in hardware */
#ifdef CONFIG_FSL_CAAM
#define CONFIG_CMD_HASH
-#define CONFIG_SHA_HW_ACCEL
#endif
/*
diff --git a/include/configs/T102xQDS.h b/include/configs/T102xQDS.h
index 42e692c4a02..94828931ae8 100644
--- a/include/configs/T102xQDS.h
+++ b/include/configs/T102xQDS.h
@@ -868,7 +868,6 @@ unsigned long get_board_ddr_clk(void);
/* Hash command with SHA acceleration supported in hardware */
#ifdef CONFIG_FSL_CAAM
#define CONFIG_CMD_HASH
-#define CONFIG_SHA_HW_ACCEL
#endif
#include <asm/fsl_secure_boot.h>
diff --git a/include/configs/T102xRDB.h b/include/configs/T102xRDB.h
index c2175bda345..373cb2a81c9 100644
--- a/include/configs/T102xRDB.h
+++ b/include/configs/T102xRDB.h
@@ -887,7 +887,6 @@ unsigned long get_board_ddr_clk(void);
/* Hash command with SHA acceleration supported in hardware */
#ifdef CONFIG_FSL_CAAM
#define CONFIG_CMD_HASH
-#define CONFIG_SHA_HW_ACCEL
#endif
#include <asm/fsl_secure_boot.h>
diff --git a/include/configs/T1040QDS.h b/include/configs/T1040QDS.h
index 25658871e47..0ae9eda463d 100644
--- a/include/configs/T1040QDS.h
+++ b/include/configs/T1040QDS.h
@@ -671,7 +671,6 @@ unsigned long get_board_ddr_clk(void);
/* Hash command with SHA acceleration supported in hardware */
#ifdef CONFIG_FSL_CAAM
#define CONFIG_CMD_HASH
-#define CONFIG_SHA_HW_ACCEL
#endif
/*
diff --git a/include/configs/T104xRDB.h b/include/configs/T104xRDB.h
index d2ece40d4ac..b3d595709ec 100644
--- a/include/configs/T104xRDB.h
+++ b/include/configs/T104xRDB.h
@@ -783,7 +783,6 @@ $(SRCTREE)/board/freescale/t104xrdb/t1042d4_sd_rcw.cfg
/* Hash command with SHA acceleration supported in hardware */
#ifdef CONFIG_FSL_CAAM
#define CONFIG_CMD_HASH
-#define CONFIG_SHA_HW_ACCEL
#endif
/*
diff --git a/include/configs/T208xQDS.h b/include/configs/T208xQDS.h
index 02fd37d5cb3..a426da40d79 100644
--- a/include/configs/T208xQDS.h
+++ b/include/configs/T208xQDS.h
@@ -755,7 +755,6 @@ unsigned long get_board_ddr_clk(void);
/* Hash command with SHA acceleration supported in hardware */
#ifdef CONFIG_FSL_CAAM
#define CONFIG_CMD_HASH
-#define CONFIG_SHA_HW_ACCEL
#endif
/*
diff --git a/include/configs/T208xRDB.h b/include/configs/T208xRDB.h
index faa1111e9f1..315067332b8 100644
--- a/include/configs/T208xRDB.h
+++ b/include/configs/T208xRDB.h
@@ -700,7 +700,6 @@ unsigned long get_board_ddr_clk(void);
/* Hash command with SHA acceleration supported in hardware */
#ifdef CONFIG_FSL_CAAM
#define CONFIG_CMD_HASH
-#define CONFIG_SHA_HW_ACCEL
#endif
/*
diff --git a/include/configs/T4240QDS.h b/include/configs/T4240QDS.h
index 5d030d11796..28476c4f2f4 100644
--- a/include/configs/T4240QDS.h
+++ b/include/configs/T4240QDS.h
@@ -501,7 +501,6 @@ unsigned long get_board_ddr_clk(void);
/* Hash command with SHA acceleration supported in hardware */
#ifdef CONFIG_FSL_CAAM
#define CONFIG_CMD_HASH
-#define CONFIG_SHA_HW_ACCEL
#endif
/*
diff --git a/include/configs/T4240RDB.h b/include/configs/T4240RDB.h
index 8ebfde19f93..ba725d21e56 100644
--- a/include/configs/T4240RDB.h
+++ b/include/configs/T4240RDB.h
@@ -699,7 +699,6 @@ unsigned long get_board_ddr_clk(void);
/* Hash command with SHA acceleration supported in hardware */
#ifdef CONFIG_FSL_CAAM
#define CONFIG_CMD_HASH
-#define CONFIG_SHA_HW_ACCEL
#endif
diff --git a/include/configs/bcm_ep_board.h b/include/configs/bcm_ep_board.h
index d9b88fa2d31..d264e1c77b5 100644
--- a/include/configs/bcm_ep_board.h
+++ b/include/configs/bcm_ep_board.h
@@ -69,8 +69,6 @@
/* SHA hashing */
#define CONFIG_CMD_HASH
#define CONFIG_HASH_VERIFY
-#define CONFIG_SHA1
-#define CONFIG_SHA256
/* Enable Time Command */
diff --git a/include/configs/controlcenterd.h b/include/configs/controlcenterd.h
index 7535ad5a62d..809e70dbf03 100644
--- a/include/configs/controlcenterd.h
+++ b/include/configs/controlcenterd.h
@@ -199,8 +199,6 @@
#define CONFIG_SF_DEFAULT_MODE 0
#endif
-#define CONFIG_SHA1
-
/*
* MMC
*/
diff --git a/include/configs/corenet_ds.h b/include/configs/corenet_ds.h
index 7e606cd794c..e92327f8ef0 100644
--- a/include/configs/corenet_ds.h
+++ b/include/configs/corenet_ds.h
@@ -621,7 +621,6 @@
/* Hash command with SHA acceleration supported in hardware */
#ifdef CONFIG_FSL_CAAM
#define CONFIG_CMD_HASH
-#define CONFIG_SHA_HW_ACCEL
#endif
/*
diff --git a/include/configs/exynos5-common.h b/include/configs/exynos5-common.h
index 5411e5ff49f..f893b2e3478 100644
--- a/include/configs/exynos5-common.h
+++ b/include/configs/exynos5-common.h
@@ -26,7 +26,6 @@
/* Enable ACE acceleration for SHA1 and SHA256 */
#define CONFIG_EXYNOS_ACE_SHA
-#define CONFIG_SHA_HW_ACCEL
/* Power Down Modes */
#define S5P_CHECK_SLEEP 0x00000BAD
@@ -139,8 +138,6 @@
/* SHA hashing */
#define CONFIG_CMD_HASH
#define CONFIG_HASH_VERIFY
-#define CONFIG_SHA1
-#define CONFIG_SHA256
/* Enable Time Command */
diff --git a/include/configs/ids8313.h b/include/configs/ids8313.h
index 7ffc9d1dd98..17944a90581 100644
--- a/include/configs/ids8313.h
+++ b/include/configs/ids8313.h
@@ -542,7 +542,5 @@
#define CONFIG_IMAGE_FORMAT_LEGACY
#define CONFIG_CMD_HASH
-#define CONFIG_SHA1
-#define CONFIG_SHA256
#endif /* __CONFIG_H */
diff --git a/include/configs/imx6qdl_icore.h b/include/configs/imx6qdl_icore.h
index f783eac5dba..741bdfa8075 100644
--- a/include/configs/imx6qdl_icore.h
+++ b/include/configs/imx6qdl_icore.h
@@ -126,8 +126,6 @@
/* FIT */
#ifdef CONFIG_FIT
# define CONFIG_HASH_VERIFY
-# define CONFIG_SHA1
-# define CONFIG_SHA256
# define CONFIG_IMAGE_FORMAT_LEGACY
#endif
diff --git a/include/configs/imx6qdl_icore_rqs.h b/include/configs/imx6qdl_icore_rqs.h
index a6394681d99..f52865b5a07 100644
--- a/include/configs/imx6qdl_icore_rqs.h
+++ b/include/configs/imx6qdl_icore_rqs.h
@@ -108,8 +108,6 @@
/* FIT */
#ifdef CONFIG_FIT
# define CONFIG_HASH_VERIFY
-# define CONFIG_SHA1
-# define CONFIG_SHA256
# define CONFIG_IMAGE_FORMAT_LEGACY
#endif
diff --git a/include/configs/imx6ul_geam.h b/include/configs/imx6ul_geam.h
index 9f66dd324f9..2e12b977676 100644
--- a/include/configs/imx6ul_geam.h
+++ b/include/configs/imx6ul_geam.h
@@ -125,8 +125,6 @@
/* FIT */
#ifdef CONFIG_FIT
# define CONFIG_HASH_VERIFY
-# define CONFIG_SHA1
-# define CONFIG_SHA256
# define CONFIG_IMAGE_FORMAT_LEGACY
#endif
diff --git a/include/configs/imx6ul_isiot.h b/include/configs/imx6ul_isiot.h
index 5ce70ae4669..76ae159da3c 100644
--- a/include/configs/imx6ul_isiot.h
+++ b/include/configs/imx6ul_isiot.h
@@ -125,8 +125,6 @@
/* FIT */
#ifdef CONFIG_FIT
# define CONFIG_HASH_VERIFY
-# define CONFIG_SHA1
-# define CONFIG_SHA256
# define CONFIG_IMAGE_FORMAT_LEGACY
#endif
diff --git a/include/configs/ls1021aiot.h b/include/configs/ls1021aiot.h
index 35d17b96f4a..1b165157f7e 100644
--- a/include/configs/ls1021aiot.h
+++ b/include/configs/ls1021aiot.h
@@ -306,13 +306,8 @@
#define CONFIG_MISC_INIT_R
/* Hash command with SHA acceleration supported in hardware */
-
#ifdef CONFIG_FSL_CAAM
-
#define CONFIG_CMD_HASH
-
-#define CONFIG_SHA_HW_ACCEL
-
#endif
#include <asm/fsl_secure_boot.h>
diff --git a/include/configs/ls1021aqds.h b/include/configs/ls1021aqds.h
index 333bb266238..2de01444814 100644
--- a/include/configs/ls1021aqds.h
+++ b/include/configs/ls1021aqds.h
@@ -573,7 +573,6 @@ unsigned long get_board_ddr_clk(void);
/* Hash command with SHA acceleration supported in hardware */
#ifdef CONFIG_FSL_CAAM
#define CONFIG_CMD_HASH
-#define CONFIG_SHA_HW_ACCEL
#endif
#include <asm/fsl_secure_boot.h>
diff --git a/include/configs/ls1021atwr.h b/include/configs/ls1021atwr.h
index 81f38a30a47..14534ecd1b0 100644
--- a/include/configs/ls1021atwr.h
+++ b/include/configs/ls1021atwr.h
@@ -437,7 +437,6 @@
/* Hash command with SHA acceleration supported in hardware */
#ifdef CONFIG_FSL_CAAM
#define CONFIG_CMD_HASH
-#define CONFIG_SHA_HW_ACCEL
#endif
#include <asm/fsl_secure_boot.h>
diff --git a/include/configs/ls1043a_common.h b/include/configs/ls1043a_common.h
index e26924877d1..0522d1e9d72 100644
--- a/include/configs/ls1043a_common.h
+++ b/include/configs/ls1043a_common.h
@@ -304,7 +304,6 @@
/* Hash command with SHA acceleration supported in hardware */
#ifdef CONFIG_FSL_CAAM
#define CONFIG_CMD_HASH
-#define CONFIG_SHA_HW_ACCEL
#endif
#endif /* __LS1043A_COMMON_H */
diff --git a/include/configs/ls1046a_common.h b/include/configs/ls1046a_common.h
index 957ffd36347..da1e860de33 100644
--- a/include/configs/ls1046a_common.h
+++ b/include/configs/ls1046a_common.h
@@ -233,7 +233,6 @@
/* Hash command with SHA acceleration supported in hardware */
#ifdef CONFIG_FSL_CAAM
#define CONFIG_CMD_HASH
-#define CONFIG_SHA_HW_ACCEL
#endif
#endif /* __LS1046A_COMMON_H */
diff --git a/include/configs/ls2080a_common.h b/include/configs/ls2080a_common.h
index 427f623e8c5..512eed8bdca 100644
--- a/include/configs/ls2080a_common.h
+++ b/include/configs/ls2080a_common.h
@@ -233,7 +233,6 @@ unsigned long long get_qixis_addr(void);
/* Hash command with SHA acceleration supported in hardware */
#ifdef CONFIG_FSL_CAAM
#define CONFIG_CMD_HASH
-#define CONFIG_SHA_HW_ACCEL
#endif
#endif /* __LS2_COMMON_H */
diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h
index 37c6132b8af..8ba37fc2455 100644
--- a/include/configs/sandbox.h
+++ b/include/configs/sandbox.h
@@ -104,8 +104,6 @@
#define CONFIG_CMD_HASH
#define CONFIG_HASH_VERIFY
-#define CONFIG_SHA1
-#define CONFIG_SHA256
#define CONFIG_CMD_SANDBOX
diff --git a/include/image.h b/include/image.h
index 800426d51f9..8d380e0e848 100644
--- a/include/image.h
+++ b/include/image.h
@@ -30,6 +30,8 @@ struct lmb;
#define IMAGE_ENABLE_OF_LIBFDT 1
#define CONFIG_FIT_VERBOSE 1 /* enable fit_format_{error,warning}() */
#define CONFIG_FIT_ENABLE_SHA256_SUPPORT
+#define CONFIG_SHA1
+#define CONFIG_SHA256
#define IMAGE_ENABLE_IGNORE 0
#define IMAGE_INDENT_STRING ""
@@ -65,8 +67,6 @@ struct lmb;
# endif
# else
# define CONFIG_CRC32 /* FIT images need CRC32 support */
-# define CONFIG_SHA1 /* and SHA1 */
-# define CONFIG_SHA256 /* and SHA256 */
# define IMAGE_ENABLE_CRC32 1
# define IMAGE_ENABLE_MD5 1
# define IMAGE_ENABLE_SHA1 1
@@ -86,7 +86,6 @@ struct lmb;
#if defined(CONFIG_FIT_ENABLE_SHA256_SUPPORT) || \
defined(CONFIG_SPL_SHA256_SUPPORT)
-#define CONFIG_SHA256
#define IMAGE_ENABLE_SHA256 1
#else
#define IMAGE_ENABLE_SHA256 0
diff --git a/lib/Makefile b/lib/Makefile
index 23e9f1ef11d..328b4a25c3a 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -44,9 +44,9 @@ obj-$(CONFIG_BITREVERSE) += bitrev.o
obj-y += list_sort.o
endif
-obj-$(CONFIG_$(SPL_)RSA) += rsa/
-obj-$(CONFIG_$(SPL_)SHA1) += sha1.o
-obj-$(CONFIG_$(SPL_)SHA256) += sha256.o
+obj-$(CONFIG_RSA) += rsa/
+obj-$(CONFIG_SHA1) += sha1.o
+obj-$(CONFIG_SHA256) += sha256.o
obj-$(CONFIG_SPL_SAVEENV) += qsort.o
obj-$(CONFIG_$(SPL_)OF_LIBFDT) += libfdt/