Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 45F07C61DA4 for ; Mon, 13 Mar 2023 21:34:21 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 818FA85E71; Mon, 13 Mar 2023 22:32:33 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="YkFhuOR8"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5D61686168; Mon, 13 Mar 2023 22:32:18 +0100 (CET) Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 684FD85E73 for ; Mon, 13 Mar 2023 22:32:04 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=troykiskyboundary@gmail.com Received: by mail-pl1-x62e.google.com with SMTP id h8so14462688plf.10 for ; Mon, 13 Mar 2023 14:32:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678743122; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZXTZ02VwtB3B+l42oYNr3jv3DkwUbIwL2rgOAIfJPl8=; b=YkFhuOR8jyFij2JuMY/7UJuhtYPFckUgs8w8LpJ1WjflBm+xEoxa6RBWVsfOl2aiqy QCQH/JjJbNiXGtRQ+Sjppe9aNPO+Vm5xj8m635Z1BX42GQfaz3yPPQiu4ekuLzW3LK5S G3rcgSmOSTNA61ji3+vdMXHbPWfpbQhoSQSgqCoFctSaINwlwAgYrexVrFP7BcKKW+1M Pkdu+soBEZxmrHZTRHQYL52hwr8s8Dh2syQ1mAJ66Uzf2vHXeGsP7pCQ0w3FI0uXIVu6 frA+KH8DGf1uqD8crfwkhPdltKvZTPHoQfRlE/wlLrIihiMECejvRTUqy4y1Q7A+vl6b qr7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678743122; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZXTZ02VwtB3B+l42oYNr3jv3DkwUbIwL2rgOAIfJPl8=; b=dprig6VkUW6d8b2BFs4MSt0JkLKgElfaim8dynXokOrXnv6KXW0BFf8zOZy1uxwR/T mP0H/4PcDc25lRpEb4OrgRPL1z4wqwQCjgApyXJddlPT+0g8fYvoqQF9DAHW7CoYaThf dKxTRel2CeZsNfybZO0m0DjndeHiR5pHLvz6/8zO3gLohmlEvb5VQHLKqZDRing8PsIt eOlzAb4dlf8iXKXGH/HfHZVLwQYSBKVouiaDvLq/Zdv9jkuCNfXEi8oYEs+hiw6AeYGI smIS/K65tT42M55ksjnsepjj+kWOajPi8vBL0G7Ar1pVMJlCCMyA+3ZQ47KUGYneTw7a qfCA== X-Gm-Message-State: AO0yUKXn+Ed6trJ/O05Ak1X+cIYG/dIR2sulFeJEF0thuSwU2Ubt7GL3 /bHE8IdZi7uIZcwb2DsJvew= X-Google-Smtp-Source: AK7set+e2kXWpSHdLqZa2kCgKBTPgQ204otw/gpdEdFx7sVfEg8QHKMvo0ucJTHjcZNcNvZDU3ID1g== X-Received: by 2002:a05:6a21:3298:b0:cd:47dc:829e with SMTP id yt24-20020a056a21329800b000cd47dc829emr12662853pzb.12.1678743122410; Mon, 13 Mar 2023 14:32:02 -0700 (PDT) Received: from OS2.boundarydevices.com. (wsip-184-189-120-117.oc.oc.cox.net. [184.189.120.117]) by smtp.gmail.com with ESMTPSA id s24-20020aa78298000000b005d4360ed2bbsm150797pfm.197.2023.03.13.14.32.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 14:32:02 -0700 (PDT) From: Troy Kisky To: sjg@chromium.org, trini@konsulko.com, u-boot@lists.denx.de Cc: gary.bisson@lairdconnect.com, Troy Kisky , Alper Nebi Yasak , Andrew Davis , Angelo Dureghello , Ashok Reddy Soma , Aspeed BMC SW team , Chia-Wei Wang , Daniel Golle , Huan Wang , Joel Stanley , Loic Poulain , Mario Six , Michal Simek , Michal Suchanek , Oleksandr Suvorov , Ovidiu Panait , =?UTF-8?q?Pali=20Roh=C3=A1r?= , Rasmus Villemoes , Ryan Chen , Stefan Roese , Wolfgang Denk , Wolfgang Wegner Subject: [PATCH v3 08/23] watchdog: add and use Kconfig HAS_WATCHDOG_RUNNING Date: Mon, 13 Mar 2023 14:31:30 -0700 Message-Id: <20230313213146.1775650-9-troykiskyboundary@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230313213146.1775650-1-troykiskyboundary@gmail.com> References: <20230313213146.1775650-1-troykiskyboundary@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) is a common pattern. Create an new config symbol HAS_WATCHDOG_RUNNING to express it. Signed-off-by: Troy Kisky --- Changes in v3: new patch to address Tom's concerns arch/arm/mach-omap2/boot-common.c | 5 ++--- arch/m68k/lib/time.c | 7 +++---- arch/powerpc/lib/interrupts.c | 5 ++--- arch/powerpc/lib/ticks.S | 2 +- board/astro/mcf5373l/fpga.c | 10 ++++------ boot/image-board.c | 2 +- cmd/ximg.c | 10 ++++------ common/board_f.c | 4 ++-- common/spl/Kconfig | 4 ++++ drivers/crypto/aspeed/aspeed_hace.c | 2 +- drivers/crypto/hash/hash_sw.c | 2 +- drivers/timer/mpc83xx_timer.c | 5 ++--- drivers/watchdog/Kconfig | 3 +++ fs/cramfs/uncompress.c | 9 ++++----- include/watchdog.h | 7 ++----- lib/bzip2/bzlib.c | 5 ++--- lib/bzip2/bzlib_decompress.c | 20 ++++++++------------ lib/crc32.c | 2 +- lib/md5.c | 2 +- lib/sha1.c | 2 +- lib/sha256.c | 2 +- lib/sha512.c | 2 +- 22 files changed, 51 insertions(+), 61 deletions(-) diff --git a/arch/arm/mach-omap2/boot-common.c b/arch/arm/mach-omap2/boot-common.c index 9a342a1bf95..928a4136781 100644 --- a/arch/arm/mach-omap2/boot-common.c +++ b/arch/arm/mach-omap2/boot-common.c @@ -302,9 +302,8 @@ void spl_board_init(void) #if defined(CONFIG_AM33XX) && defined(CONFIG_SPL_MUSB_NEW) arch_misc_init(); #endif -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) - hw_watchdog_init(); -#endif + if (CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING)) + hw_watchdog_init(); #ifdef CONFIG_AM33XX am33xx_spl_board_init(); #endif diff --git a/arch/m68k/lib/time.c b/arch/m68k/lib/time.c index 2ce69088d94..4a9841667b7 100644 --- a/arch/m68k/lib/time.c +++ b/arch/m68k/lib/time.c @@ -70,11 +70,10 @@ void dtimer_interrupt(void *not_used) timerp->ter = (DTIM_DTER_CAP | DTIM_DTER_REF); timestamp++; - #if defined(CONFIG_WATCHDOG) || defined (CONFIG_HW_WATCHDOG) - if (CFG_SYS_WATCHDOG_FREQ && (timestamp % (CFG_SYS_WATCHDOG_FREQ)) == 0) { + if (CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING) && + CFG_SYS_WATCHDOG_FREQ && + !(timestamp % CFG_SYS_WATCHDOG_FREQ)) schedule(); - } - #endif /* CONFIG_WATCHDOG || CONFIG_HW_WATCHDOG */ return; } } diff --git a/arch/powerpc/lib/interrupts.c b/arch/powerpc/lib/interrupts.c index df312dfa28e..f76b2db9025 100644 --- a/arch/powerpc/lib/interrupts.c +++ b/arch/powerpc/lib/interrupts.c @@ -79,10 +79,9 @@ void timer_interrupt(struct pt_regs *regs) timestamp++; -#if defined(CONFIG_WATCHDOG) || defined (CONFIG_HW_WATCHDOG) - if (CFG_SYS_WATCHDOG_FREQ && (timestamp % (CFG_SYS_WATCHDOG_FREQ)) == 0) + if (CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING) && + CFG_SYS_WATCHDOG_FREQ && !(timestamp % CFG_SYS_WATCHDOG_FREQ)) schedule(); -#endif /* CONFIG_WATCHDOG || CONFIG_HW_WATCHDOG */ #ifdef CONFIG_LED_STATUS status_led_tick(timestamp); diff --git a/arch/powerpc/lib/ticks.S b/arch/powerpc/lib/ticks.S index 8647d77cc9a..dd9afe693df 100644 --- a/arch/powerpc/lib/ticks.S +++ b/arch/powerpc/lib/ticks.S @@ -41,7 +41,7 @@ wait_ticks: addc r14, r4, r14 /* Compute end time lower */ addze r15, r3 /* and end time upper */ -#if defined(CONFIG_WATCHDOG) || defined(CONFIG_HW_WATCHDOG) +#if CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING) bl schedule /* Trigger watchdog, if needed */ #endif 1: bl get_ticks /* Get current time */ diff --git a/board/astro/mcf5373l/fpga.c b/board/astro/mcf5373l/fpga.c index f85737432b3..3e1f507cdfe 100644 --- a/board/astro/mcf5373l/fpga.c +++ b/board/astro/mcf5373l/fpga.c @@ -122,9 +122,8 @@ int altera_write_fn(const void *buf, size_t len, int flush, int cookie) } while (i > 0); if (bytecount % len_40 == 0) { -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) - schedule(); -#endif + if (CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING)) + schedule(); #ifdef CONFIG_SYS_FPGA_PROG_FEEDBACK putc('.'); /* let them know we are alive */ #endif @@ -342,9 +341,8 @@ int xilinx_fastwr_config_fn(void *buf, size_t len, int flush, int cookie) val <<= 1; } if (bytecount % len_40 == 0) { -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) - schedule(); -#endif + if (CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING)) + schedule(); #ifdef CONFIG_SYS_FPGA_PROG_FEEDBACK putc('.'); /* let them know we are alive */ #endif diff --git a/boot/image-board.c b/boot/image-board.c index 25b60ec30b3..48215bdef78 100644 --- a/boot/image-board.c +++ b/boot/image-board.c @@ -173,7 +173,7 @@ void memmove_wd(void *to, void *from, size_t len, ulong chunksz) if (to == from) return; - if (IS_ENABLED(CONFIG_HW_WATCHDOG) || IS_ENABLED(CONFIG_WATCHDOG)) { + if (CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING)) { if (to > from) { from += len; to += len; diff --git a/cmd/ximg.c b/cmd/ximg.c index 60ed2c9f6f9..a42a944ae19 100644 --- a/cmd/ximg.c +++ b/cmd/ximg.c @@ -186,8 +186,7 @@ do_imgextract(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) if (argc > 3) { switch (comp) { case IH_COMP_NONE: -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) - { + if (CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING)) { size_t l = len; size_t tail; void *to = (void *) dest; @@ -203,11 +202,10 @@ do_imgextract(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) from += tail; l -= tail; } + } else { + printf(" Loading part %d ... ", part); + memmove((char *)dest, (char *)data, len); } -#else /* !(CONFIG_HW_WATCHDOG || CONFIG_WATCHDOG) */ - printf(" Loading part %d ... ", part); - memmove((char *) dest, (char *)data, len); -#endif /* CONFIG_HW_WATCHDOG || CONFIG_WATCHDOG */ break; #ifdef CONFIG_GZIP case IH_COMP_GZIP: diff --git a/common/board_f.c b/common/board_f.c index f3c1ab53b1c..54220bc1d3b 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -84,7 +84,7 @@ __weak void blue_led_off(void) {} * a structure... */ -#if defined(CONFIG_WATCHDOG) || defined(CONFIG_HW_WATCHDOG) +#if CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING) static int init_func_watchdog_init(void) { # if defined(CONFIG_HW_WATCHDOG) && \ @@ -106,7 +106,7 @@ int init_func_watchdog_reset(void) return 0; } -#endif /* CONFIG_WATCHDOG */ +#endif /* HAS_WATCHDOG_RUNNING */ __weak void board_add_ram_info(int use_default) { diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 2c042ad3066..8f0edd66225 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -1444,6 +1444,10 @@ config SPL_WATCHDOG detects no activity for a while (such as a software crash). This enables the drivers in drivers/watchdog as part of an SPL build. +config SPL_HAS_WATCHDOG_RUNNING + def_bool y if SPL_WATCHDOG || HW_WATCHDOG + depends on HAS_WATCHDOG_RUNNING + config SPL_YMODEM_SUPPORT bool "Support loading using Ymodem" depends on SPL_SERIAL diff --git a/drivers/crypto/aspeed/aspeed_hace.c b/drivers/crypto/aspeed/aspeed_hace.c index 6b6c8fa6588..28a39e7b599 100644 --- a/drivers/crypto/aspeed/aspeed_hace.c +++ b/drivers/crypto/aspeed/aspeed_hace.c @@ -288,7 +288,7 @@ static int aspeed_hace_digest_wd(struct udevice *dev, enum HASH_ALGO algo, if (rc) return rc; - if (IS_ENABLED(CONFIG_HW_WATCHDOG) || CONFIG_IS_ENABLED(WATCHDOG)) { + if (CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING)) { cur = ibuf; end = ibuf + ilen; diff --git a/drivers/crypto/hash/hash_sw.c b/drivers/crypto/hash/hash_sw.c index d8065d68ea4..51cead45a4f 100644 --- a/drivers/crypto/hash/hash_sw.c +++ b/drivers/crypto/hash/hash_sw.c @@ -244,7 +244,7 @@ static int sw_hash_digest_wd(struct udevice *dev, enum HASH_ALGO algo, if (rc) return rc; - if (IS_ENABLED(CONFIG_HW_WATCHDOG) || CONFIG_IS_ENABLED(WATCHDOG)) { + if (CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING)) { cur = ibuf; end = ibuf + ilen; diff --git a/drivers/timer/mpc83xx_timer.c b/drivers/timer/mpc83xx_timer.c index 7814cb6a5d6..a0858cc49b5 100644 --- a/drivers/timer/mpc83xx_timer.c +++ b/drivers/timer/mpc83xx_timer.c @@ -174,10 +174,9 @@ void timer_interrupt(struct pt_regs *regs) priv->timestamp++; -#if defined(CONFIG_WATCHDOG) || defined(CONFIG_HW_WATCHDOG) - if (CFG_SYS_WATCHDOG_FREQ && (priv->timestamp % (CFG_SYS_WATCHDOG_FREQ)) == 0) + if (CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING) && + CFG_SYS_WATCHDOG_FREQ && !(priv->timestamp % CFG_SYS_WATCHDOG_FREQ)) schedule(); -#endif /* CONFIG_WATCHDOG || CONFIG_HW_WATCHDOG */ #ifdef CONFIG_LED_STATUS status_led_tick(priv->timestamp); diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index b5ac8f7f50d..46c0c1efedf 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -35,6 +35,9 @@ config WATCHDOG_TIMEOUT_MSECS help Watchdog timeout in msec +config HAS_WATCHDOG_RUNNING + def_bool y if WATCHDOG || HW_WATCHDOG + config HW_WATCHDOG bool diff --git a/fs/cramfs/uncompress.c b/fs/cramfs/uncompress.c index 0d071b69f4c..80000110d5d 100644 --- a/fs/cramfs/uncompress.c +++ b/fs/cramfs/uncompress.c @@ -62,11 +62,10 @@ int cramfs_uncompress_init (void) stream.next_in = 0; stream.avail_in = 0; -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) - stream.outcb = (cb_func)cyclic_run; -#else - stream.outcb = Z_NULL; -#endif /* CONFIG_HW_WATCHDOG */ + if (CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING)) + stream.outcb = (cb_func)cyclic_run; + else + stream.outcb = Z_NULL; err = inflateInit (&stream); if (err != Z_OK) { diff --git a/include/watchdog.h b/include/watchdog.h index ac5f11e376f..60086e1ae30 100644 --- a/include/watchdog.h +++ b/include/watchdog.h @@ -20,7 +20,7 @@ */ int init_func_watchdog_reset(void); -#if defined(CONFIG_WATCHDOG) || defined(CONFIG_HW_WATCHDOG) +#if CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING) #define INIT_FUNC_WATCHDOG_INIT init_func_watchdog_init, #define INIT_FUNC_WATCHDOG_RESET init_func_watchdog_reset, #else @@ -35,10 +35,7 @@ int init_func_watchdog_reset(void); /* * Prototypes from $(CPU)/cpu.c. */ - -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) - void hw_watchdog_init(void); -#endif +void hw_watchdog_init(void); #if defined(CONFIG_MPC85xx) void init_85xx_watchdog(void); diff --git a/lib/bzip2/bzlib.c b/lib/bzip2/bzlib.c index bd589aa810c..904ff1332be 100644 --- a/lib/bzip2/bzlib.c +++ b/lib/bzip2/bzlib.c @@ -843,9 +843,8 @@ int BZ_API(BZ2_bzDecompress) ( bz_stream *strm ) if (s->strm != strm) return BZ_PARAM_ERROR; while (True) { -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) - schedule(); -#endif + if (CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING)) + schedule(); if (s->state == BZ_X_IDLE) return BZ_SEQUENCE_ERROR; if (s->state == BZ_X_OUTPUT) { if (s->smallDecompress) diff --git a/lib/bzip2/bzlib_decompress.c b/lib/bzip2/bzlib_decompress.c index 3b417d57b27..51f21d1e7f6 100644 --- a/lib/bzip2/bzlib_decompress.c +++ b/lib/bzip2/bzlib_decompress.c @@ -417,9 +417,8 @@ Int32 BZ2_decompress ( DState* s ) while (True) { -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) - schedule(); -#endif + if (CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING)) + schedule(); if (nextSym == EOB) break; if (nextSym == BZ_RUNA || nextSym == BZ_RUNB) { @@ -502,9 +501,8 @@ Int32 BZ2_decompress ( DState* s ) if (s->mtfbase[0] == 0) { kk = MTFA_SIZE-1; for (ii = 256 / MTFL_SIZE-1; ii >= 0; ii--) { -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) - schedule(); -#endif + if (CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING)) + schedule(); for (jj = MTFL_SIZE-1; jj >= 0; jj--) { s->mtfa[kk] = s->mtfa[s->mtfbase[ii] + jj]; kk--; @@ -567,9 +565,8 @@ Int32 BZ2_decompress ( DState* s ) } while (i != s->origPtr); -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) - schedule(); -#endif + if (CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING)) + schedule(); s->tPos = s->origPtr; s->nblock_used = 0; if (s->blockRandomised) { @@ -582,9 +579,8 @@ Int32 BZ2_decompress ( DState* s ) } else { -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) - schedule(); -#endif + if (CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING)) + schedule(); /*-- compute the T^(-1) vector --*/ for (i = 0; i < nblock; i++) { uc = (UChar)(s->tt[i] & 0xff); diff --git a/lib/crc32.c b/lib/crc32.c index 12c104c62a4..124fadb62b0 100644 --- a/lib/crc32.c +++ b/lib/crc32.c @@ -14,7 +14,7 @@ #else #include #include -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) +#if CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING) #define PET_WDG #endif #endif diff --git a/lib/md5.c b/lib/md5.c index 20d5e87814b..fb1a2b4ef61 100644 --- a/lib/md5.c +++ b/lib/md5.c @@ -29,7 +29,7 @@ #ifndef USE_HOSTCC #include -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) +#if CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING) #include #define PET_WDG #endif diff --git a/lib/sha1.c b/lib/sha1.c index cd5d7aead8d..9661fe487a7 100644 --- a/lib/sha1.c +++ b/lib/sha1.c @@ -19,7 +19,7 @@ #ifndef USE_HOSTCC #include #include -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) +#if CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING) #define PET_WDG #endif #else diff --git a/lib/sha256.c b/lib/sha256.c index 8e1c3992674..5aa7ad7b5c0 100644 --- a/lib/sha256.c +++ b/lib/sha256.c @@ -8,7 +8,7 @@ #ifndef USE_HOSTCC #include #include -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) +#if CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING) #define PET_WDG #endif #else diff --git a/lib/sha512.c b/lib/sha512.c index a504281bf93..389c792bd22 100644 --- a/lib/sha512.c +++ b/lib/sha512.c @@ -13,7 +13,7 @@ #ifndef USE_HOSTCC #include #include -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) +#if CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING) #define PET_WDG #endif #else -- 2.34.1