[PATCH v1 03/24] lib: md5: prepare for CONFIG_IS_ENABLED changes
Troy Kisky
troykiskyboundary at gmail.com
Wed Feb 22 02:38:00 CET 2023
We need to include <linux/kconfig.h> in order to include
files that use CONFIG_IS_ENABLED. TO prepare for that
don't pet the watchdog when USE_HOSTCC is defined.
Signed-off-by: Troy Kisky <troykiskyboundary at gmail.com>
---
lib/md5.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/lib/md5.c b/lib/md5.c
index 1636ab93661..bd3d8fa9b2b 100644
--- a/lib/md5.c
+++ b/lib/md5.c
@@ -29,7 +29,12 @@
#ifndef USE_HOSTCC
#include <common.h>
+#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG)
#include <watchdog.h>
+#define PET_WDG
+#endif
+#else
+#include <linux/kconfig.h>
#endif /* USE_HOSTCC */
#include <u-boot/md5.h>
@@ -288,14 +293,14 @@ md5_wd(const unsigned char *input, unsigned int len, unsigned char output[16],
unsigned int chunk_sz)
{
struct MD5Context context;
-#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG)
+#ifdef PET_WDG
const unsigned char *end, *curr;
int chunk;
#endif
MD5Init(&context);
-#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG)
+#ifdef PET_WDG
curr = input;
end = input + len;
while (curr < end) {
--
2.34.1
More information about the U-Boot
mailing list