Skip to content

Commit 4962ee0

Browse files
ccpalexWim Van Sebroeck
authored andcommitted
watchdog: rti: of: honor timeout-sec property
Currently "timeout-sec" Device Tree property is being silently ignored: even though watchdog_init_timeout() is being used, the driver always passes "heartbeat" == DEFAULT_HEARTBEAT == 60 as argument. Fix this by setting struct watchdog_device::timeout to DEFAULT_HEARTBEAT and passing real module parameter value to watchdog_init_timeout() (which may now be 0 if not specified). Cc: stable@vger.kernel.org Fixes: 2d63908 ("watchdog: Add K3 RTI watchdog support") Signed-off-by: Alexander Sverdlin <alexander.sverdlin@siemens.com> Reviewed-by: Vignesh Raghavendra <vigneshr@ti.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20241107203830.1068456-1-alexander.sverdlin@siemens.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
1 parent a5cb139 commit 4962ee0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/watchdog/rti_wdt.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161

6262
#define MAX_HW_ERROR 250
6363

64-
static int heartbeat = DEFAULT_HEARTBEAT;
64+
static int heartbeat;
6565

6666
/*
6767
* struct to hold data for each WDT device
@@ -252,6 +252,7 @@ static int rti_wdt_probe(struct platform_device *pdev)
252252
wdd->min_timeout = 1;
253253
wdd->max_hw_heartbeat_ms = (WDT_PRELOAD_MAX << WDT_PRELOAD_SHIFT) /
254254
wdt->freq * 1000;
255+
wdd->timeout = DEFAULT_HEARTBEAT;
255256
wdd->parent = dev;
256257

257258
watchdog_set_drvdata(wdd, wdt);

0 commit comments

Comments
 (0)