linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] watchdog: Fix OMAP watchdog early handling
@ 2021-10-14 10:22 Walter Stoll
  2021-10-14 20:18 ` Guenter Roeck
  0 siblings, 1 reply; 2+ messages in thread
From: Walter Stoll @ 2021-10-14 10:22 UTC (permalink / raw)
  To: linux, wim; +Cc: linux-watchdog


TI's implementation does not service the watchdog even if the kernel
command line parameter omap_wdt.early_enable is set to 1. This patch
fixes the issue.

Signed-off-by: Walter Stoll <walter.stoll@duagon.com>
---
 drivers/watchdog/omap_wdt.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
index 1616f93dfad7..74d785b2b478 100644
--- a/drivers/watchdog/omap_wdt.c
+++ b/drivers/watchdog/omap_wdt.c
@@ -268,8 +268,12 @@ static int omap_wdt_probe(struct platform_device *pdev)
 			wdev->wdog.bootstatus = WDIOF_CARDRESET;
 	}
 
-	if (!early_enable)
+	if (early_enable) {
+		omap_wdt_start(&wdev->wdog);
+		set_bit(WDOG_HW_RUNNING, &wdev->wdog.status);
+	} else {
 		omap_wdt_disable(wdev);
+	}
 
 	ret = watchdog_register_device(&wdev->wdog);
 	if (ret) {
-- 
2.33.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] watchdog: Fix OMAP watchdog early handling
  2021-10-14 10:22 [PATCH] watchdog: Fix OMAP watchdog early handling Walter Stoll
@ 2021-10-14 20:18 ` Guenter Roeck
  0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2021-10-14 20:18 UTC (permalink / raw)
  To: 06eba290-1794-854a-f999-86668211dcaf; +Cc: wim, linux-watchdog

On Thu, Oct 14, 2021 at 12:22:29PM +0200, Walter Stoll wrote:
> 
> TI's implementation does not service the watchdog even if the kernel
> command line parameter omap_wdt.early_enable is set to 1. This patch
> fixes the issue.
> 
> Signed-off-by: Walter Stoll <walter.stoll@duagon.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  drivers/watchdog/omap_wdt.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
> index 1616f93dfad7..74d785b2b478 100644
> --- a/drivers/watchdog/omap_wdt.c
> +++ b/drivers/watchdog/omap_wdt.c
> @@ -268,8 +268,12 @@ static int omap_wdt_probe(struct platform_device *pdev)
>  			wdev->wdog.bootstatus = WDIOF_CARDRESET;
>  	}
>  
> -	if (!early_enable)
> +	if (early_enable) {
> +		omap_wdt_start(&wdev->wdog);
> +		set_bit(WDOG_HW_RUNNING, &wdev->wdog.status);
> +	} else {
>  		omap_wdt_disable(wdev);
> +	}
>  
>  	ret = watchdog_register_device(&wdev->wdog);
>  	if (ret) {
> -- 
> 2.33.0
> 
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-14 20:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-14 10:22 [PATCH] watchdog: Fix OMAP watchdog early handling Walter Stoll
2021-10-14 20:18 ` Guenter Roeck

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).