Message ID | 20230110161946.3816866-17-trini@konsulko.com |
---|---|
State | Accepted |
Commit | ad242344681f6a0076a6bf100aa83ac9ecbea355 |
Delegated to: | Tom Rini |
Headers | show |
Series | [01/19] global: Remove unused CONFIG defines | expand |
On 1/10/23 17:19, Tom Rini wrote: > 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> Reviewed-by: Stefan Roese <sr@denx.de> Thanks, Stefan > --- > 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 */ > Viele Grüße, Stefan Roese
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 */
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(-)