u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Cc: Stefan Roese <sr@denx.de>, Stefano Babic <sbabic@denx.de>,
	Peng Fan <peng.fan@nxp.com>
Subject: [PATCH 17/19] watchdog: Clean up defaults for imx_watchdog / ulp_wdog
Date: Tue, 10 Jan 2023 11:19:44 -0500	[thread overview]
Message-ID: <20230110161946.3816866-17-trini@konsulko.com> (raw)
In-Reply-To: <20230110161946.3816866-1-trini@konsulko.com>

In imx_watchdog, clean up the comment to just note the range now, as we
do not need to set the default here as Kconfig does this for us. For
ulp_wdog, set the default value via Kconfig instead.

Cc: Stefan Roese <sr@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
---
 drivers/watchdog/Kconfig        | 1 +
 drivers/watchdog/imx_watchdog.c | 7 +------
 drivers/watchdog/ulp_wdog.c     | 4 ----
 3 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index f1b1cf63ca3a..b5ac8f7f50dc 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -30,6 +30,7 @@ config WATCHDOG_TIMEOUT_MSECS
 	default 128000 if ARCH_MX7 || ARCH_VF610
 	default 30000 if ARCH_SOCFPGA
 	default 16000 if ARCH_SUNXI
+	default 5376 if ULP_WATCHDOG
 	default 60000
 	help
 	  Watchdog timeout in msec
diff --git a/drivers/watchdog/imx_watchdog.c b/drivers/watchdog/imx_watchdog.c
index 3586246fbfbc..894158b304a7 100644
--- a/drivers/watchdog/imx_watchdog.c
+++ b/drivers/watchdog/imx_watchdog.c
@@ -68,13 +68,8 @@ static void imx_watchdog_init(struct watchdog_regs *wdog, bool ext_reset,
 
 	/*
 	 * The timer watchdog can be set between
-	 * 0.5 and 128 Seconds. If not defined
-	 * in configuration file, sets 128 Seconds
+	 * 0.5 and 128 Seconds.
 	 */
-#ifndef CONFIG_WATCHDOG_TIMEOUT_MSECS
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS 128000
-#endif
-
 	timeout = max_t(u64, timeout, TIMEOUT_MIN);
 	timeout = min_t(u64, timeout, TIMEOUT_MAX);
 	timeout = lldiv(timeout, 500) - 1;
diff --git a/drivers/watchdog/ulp_wdog.c b/drivers/watchdog/ulp_wdog.c
index e08105430485..c21aa3af55fa 100644
--- a/drivers/watchdog/ulp_wdog.c
+++ b/drivers/watchdog/ulp_wdog.c
@@ -25,10 +25,6 @@ struct ulp_wdt_priv {
 	u32 clk_rate;
 };
 
-#ifndef CONFIG_WATCHDOG_TIMEOUT_MSECS
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS 0x1500
-#endif
-
 #define REFRESH_WORD0 0xA602 /* 1st refresh word */
 #define REFRESH_WORD1 0xB480 /* 2nd refresh word */
 
-- 
2.25.1


  parent reply	other threads:[~2023-01-10 16:23 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-10 16:19 [PATCH 01/19] global: Remove unused CONFIG defines Tom Rini
2023-01-10 16:19 ` [PATCH 02/19] arc: Migrate ARC_MMU_VER to Kconfig Tom Rini
2023-01-10 16:19 ` [PATCH 03/19] i2c: fsl_i2c: Rework usage of CONFIG_SYS_IMMR Tom Rini
2023-01-10 16:19 ` [PATCH 04/19] arm: Rework usage of CONFIG_ARMV[78]_SECURE_BASE in linker scripts Tom Rini
2023-01-10 16:19 ` [PATCH 05/19] dm: ns16550: Change how we get UART_REG to be defined Tom Rini
2023-01-11  0:15   ` Simon Glass
2023-01-17 22:10   ` [PATCHv2 05/19] dm: ns16550: Restore how we define UART_REG Tom Rini
2023-01-17 23:34     ` Andre Przywara
2023-01-18 14:15     ` Quentin Schulz
2023-01-10 16:19 ` [PATCH 06/19] arm: lib1funcs.S: Update compatibility with Linux comment slightly Tom Rini
2023-01-10 16:19 ` [PATCH 07/19] autoboot: Rework CONFIG_AUTOBOOT_STOP_STR_* usage Tom Rini
2023-01-10 16:19 ` [PATCH 08/19] spl: sata: Rework the loading case it not use IS_ENABLED(...) Tom Rini
2023-01-10 16:19 ` [PATCH 09/19] common/update: Finish Kconfig migration Tom Rini
2023-01-10 16:19 ` [PATCH 10/19] fpga: Migrate CONFIG_MAX_FPGA_DEVICES to Kconfig Tom Rini
2023-01-11  8:17   ` Michal Simek
2023-01-10 16:19 ` [PATCH 11/19] usb: musb: Rename CONFIG_USB_MUSB_TIMEOUT to MUSB_TIMEOUT Tom Rini
2023-01-10 17:20   ` Marek Vasut
2023-01-10 16:19 ` [PATCH 12/19] fsl-layerscape: Rework usage of CONFIG_CLUSTER_CLK_FREQ Tom Rini
2023-01-10 16:19 ` [PATCH 13/19] net: phy: mv88e61xx: Finish migration of MV88E61XX_FIXED_PORTS Tom Rini
2023-01-10 17:11   ` Ramon Fried
2023-01-10 16:19 ` [PATCH 14/19] nxp: Finish migration of SYS_FSL_IFC_BANK_COUNT to Kconfig Tom Rini
2023-01-10 16:19 ` [PATCH 15/19] nxp: Finish migration of SYS_FSL_SRDS_[12] " Tom Rini
2023-01-10 16:19 ` [PATCH 16/19] usbtty: Remove default CONFIG_USBD_* values Tom Rini
2023-01-10 16:19 ` Tom Rini [this message]
2023-01-10 16:54   ` [PATCH 17/19] watchdog: Clean up defaults for imx_watchdog / ulp_wdog Stefan Roese
2023-01-10 16:19 ` [PATCH 18/19] global: Finish CONFIG -> CFG migration Tom Rini
2023-01-11  0:15   ` Simon Glass
2023-01-10 16:19 ` [PATCH 19/19] CI: Make check for new defined CONFIG symbols even more robust Tom Rini
2023-01-11  0:15   ` Simon Glass
2023-01-20 23:21 ` [PATCH 01/19] global: Remove unused CONFIG defines Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230110161946.3816866-17-trini@konsulko.com \
    --to=trini@konsulko.com \
    --cc=peng.fan@nxp.com \
    --cc=sbabic@denx.de \
    --cc=sr@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).