blob: f48b8840907d253ea05fa106bbae98f728b23264 [file] [log] [blame]
Heinrich Schuchardt451b1772022-03-25 07:01:59 +01001.. SPDX-License-Identifier: GPL-2.0+:
2
Heinrich Schuchardt1b0c3162024-01-14 14:53:13 +01003.. index::
4 single: wdt (command)
5
Heinrich Schuchardt451b1772022-03-25 07:01:59 +01006wdt command
Heinrich Schuchardtb72160b2023-10-28 11:59:32 +02007===========
Heinrich Schuchardt451b1772022-03-25 07:01:59 +01008
9Synopsis
10--------
11
12::
13
14 wdt list
15 wdt dev [<name>]
16 wdt start <timeout_ms> [flags]
17 wdt stop
18 wdt reset
19 wdt expirer [flags]
20
21Description
22-----------
23
24The wdt command is used to control watchdog timers.
25
26The 'wdt list' command shows a list of all watchdog devices.
27
28The 'wdt dev' command called without argument shows the current watchdog device.
29The current device is set when passing the name of the device as argument.
30
31The 'wdt start' command starts the current watchdog timer.
32
33The 'wdt stop' command stops the current watchdog timer.
34
35The 'wdt reset' command resets the current watchdog timer without stopping it.
36
37The 'wdt expire' command let's the current watchdog timer expire immediately.
38This will lead to a reset.
39
40name
41 name of the watchdog device
42
43timeout_ms
44 timeout interval in milliseconds
45
46flags
47 unsigned long value passed to the driver. The usage is driver specific.
48 The value is ignored by most drivers.
49
50Example
51-------
52
53::
54
55 => wdt dev
56 No watchdog timer device set!
57 => wdt list
58 watchdog@1c20ca0 (sunxi_wdt)
59 => wdt dev watchdog@1c20ca0
60 => wdt dev
61 dev: watchdog@1c20ca0
62 => wdt start 3000
63 => wdt reset
64 => wdt stop
65 => wdt expire
66
67 U-Boot SPL 2022.04-rc3 (Mar 25 2022 - 13:48:33 +0000)
68
69 In the example above '(sunxi_wdt)' refers to the driver for the watchdog
70 device.
71
72Configuration
73-------------
74
75The command is only available if CONFIG_CMD_WDT=y.
76
77Return value
78------------
79
80The return value $? is 0 if the command succeeds, 1 upon failure.