Kconfig: Finish migration of hashing commands
Currently these (board agnostic) commands cannot be selected using
menuconfig and friends. Fix this the obvious way. As part of this,
don't muddle the meaning of CONFIG_HASH_VERIFY to mean both 'hash -v'
and "we have a hashing command" as this makes the Kconfig logic odd.
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
[trini: Re-apply, add imply for a few cases, run moveconfig.py, also
migrate CRC32_VERIFY]
Signed-off-by: Tom Rini <trini@konsulko.com>
diff --git a/common/hash.c b/common/hash.c
index a0eded9..771d8fa 100644
--- a/common/hash.c
+++ b/common/hash.c
@@ -178,16 +178,9 @@
},
};
-#if defined(CONFIG_SHA256) || defined(CONFIG_CMD_SHA1SUM)
-#define MULTI_HASH
-#endif
-
-#if defined(CONFIG_HASH_VERIFY) || defined(CONFIG_CMD_HASH)
-#define MULTI_HASH
-#endif
-
/* Try to minimize code size for boards that don't want much hashing */
-#ifdef MULTI_HASH
+#if defined(CONFIG_SHA256) || defined(CONFIG_CMD_SHA1SUM) || \
+ defined(CONFIG_CRC32_VERIFY) || defined(CONFIG_CMD_HASH)
#define multi_hash() 1
#else
#define multi_hash() 0
@@ -424,7 +417,8 @@
unmap_sysmem(buf);
/* Try to avoid code bloat when verify is not needed */
-#ifdef CONFIG_HASH_VERIFY
+#if defined(CONFIG_CRC32_VERIFY) || defined(CONFIG_SHA1SUM_VERIFY) || \
+ defined(CONFIG_HASH_VERIFY)
if (flags & HASH_FLAG_VERIFY) {
#else
if (0) {