drivers: watchdog: rti_wdt: allow device specific timeout configuration
The source of the timeout value for an inactive watchdog is now evaluated in the following order: 1. "timeout-sec" from the Device Tree (per-watchdog) 2. Module parameter (global) 3. Default value (60 s) (global) This reordering ensures that device-specific configuration takes precedence over global defaults, improving flexibility for systems with multiple watchdogs. Signed-off-by: Peter Galka <peter.galka@wago.com>
This commit is contained in:
@@ -886,6 +886,14 @@
|
||||
};
|
||||
};
|
||||
|
||||
/*
|
||||
* This system watchdog is reserved for internal use and is not user-configurable.
|
||||
* It must not be modified or deleted to ensure consistent behavior!
|
||||
*/
|
||||
&main_rti1 { // watchdog@e010000
|
||||
timeout-sec = <120>;
|
||||
};
|
||||
|
||||
/*
|
||||
* AM6232 does not have main_rti2, main_rti3, and main_rti15
|
||||
* https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1218039/am623-stuck-in-sd-card-after-boot-up
|
||||
|
||||
@@ -335,7 +335,9 @@ static int rti_wdt_probe(struct platform_device *pdev)
|
||||
memunmap(vaddr);
|
||||
}
|
||||
|
||||
watchdog_init_timeout(wdd, heartbeat, dev);
|
||||
// grab timeout from DTS first
|
||||
wdd->timeout = heartbeat;
|
||||
watchdog_init_timeout(wdd, 0, dev);
|
||||
|
||||
ret = watchdog_register_device(wdd);
|
||||
if (ret) {
|
||||
|
||||
Reference in New Issue
Block a user