summaryrefslogtreecommitdiff
path: root/include/env
diff options
context:
space:
mode:
authorWadim Egorov <[email protected]>2025-07-30 17:42:14 +0200
committerTom Rini <[email protected]>2025-08-11 14:53:56 -0600
commitd27b7a1c777abe1bc103c983d0af082345457e7d (patch)
tree519d02414055f5a926e1c885e28e94d6fe9dc410 /include/env
parentdcc85e9aba41c82e9b54d2d925f83233842285a1 (diff)
board: phytec: phycore-am62x: Add watchdog start to bootcmd
Allows run-time control over watchdog auto-start and the timeout via setting the environment variable watchdog_timeout_ms. A value of zero means "do not start". Use CONFIG_WATCHDOG_TIMEOUT_MSECS as initial value. Users can enable the watchdog to monitor the boot process until userspace or OS takes over to serve the watchdog. Signed-off-by: Wadim Egorov <[email protected]>
Diffstat (limited to 'include/env')
-rw-r--r--include/env/phytec/watchdog.env11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/env/phytec/watchdog.env b/include/env/phytec/watchdog.env
new file mode 100644
index 00000000000..f2e65baf1e9
--- /dev/null
+++ b/include/env/phytec/watchdog.env
@@ -0,0 +1,11 @@
+watchdog_timeout_ms=CONFIG_WATCHDOG_TIMEOUT_MSECS
+start_watchdog=
+ if test ${watchdog_timeout_ms} -gt 0; then;
+ if test -z "${watchdog}"; then;
+ echo No watchdog device set, skipping watchdog start;
+ else;
+ wdt dev ${watchdog};
+ wdt start ${watchdog_timeout_ms};
+ echo Watchdog started, timeout ${watchdog_timeout_ms} ms;
+ fi;
+ fi;