u-boot/board/siemens/iot2050/iot2050.env
Jan Kiszka 4578095f1b iot2050: 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
and this to zero by default. Users can then enable the watchdog once the
use and OS which picks it up during boot.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2023-03-29 11:58:26 -04:00

17 lines
395 B
Bash

// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (c) Siemens AG, 2023
*
* Authors:
* Jan Kiszka <jan.kiszka@siemens.com>
*/
usb_pgood_delay=900
watchdog_timeout_ms=CONFIG_WATCHDOG_TIMEOUT_MSECS
start_watchdog=
if test ${watchdog_timeout_ms} -gt 0; then
wdt dev watchdog@40610000;
wdt start ${watchdog_timeout_ms};
echo Watchdog started, timeout ${watchdog_timeout_ms} ms;
fi