Heinrich Schuchardt | 451b177 | 2022-03-25 07:01:59 +0100 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0+: |
| 2 | |
Heinrich Schuchardt | 1b0c316 | 2024-01-14 14:53:13 +0100 | [diff] [blame] | 3 | .. index:: |
| 4 | single: wdt (command) |
| 5 | |
Heinrich Schuchardt | 451b177 | 2022-03-25 07:01:59 +0100 | [diff] [blame] | 6 | wdt command |
Heinrich Schuchardt | b72160b | 2023-10-28 11:59:32 +0200 | [diff] [blame] | 7 | =========== |
Heinrich Schuchardt | 451b177 | 2022-03-25 07:01:59 +0100 | [diff] [blame] | 8 | |
| 9 | Synopsis |
| 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 | |
| 21 | Description |
| 22 | ----------- |
| 23 | |
| 24 | The wdt command is used to control watchdog timers. |
| 25 | |
| 26 | The 'wdt list' command shows a list of all watchdog devices. |
| 27 | |
| 28 | The 'wdt dev' command called without argument shows the current watchdog device. |
| 29 | The current device is set when passing the name of the device as argument. |
| 30 | |
| 31 | The 'wdt start' command starts the current watchdog timer. |
| 32 | |
| 33 | The 'wdt stop' command stops the current watchdog timer. |
| 34 | |
| 35 | The 'wdt reset' command resets the current watchdog timer without stopping it. |
| 36 | |
| 37 | The 'wdt expire' command let's the current watchdog timer expire immediately. |
| 38 | This will lead to a reset. |
| 39 | |
| 40 | name |
| 41 | name of the watchdog device |
| 42 | |
| 43 | timeout_ms |
| 44 | timeout interval in milliseconds |
| 45 | |
| 46 | flags |
| 47 | unsigned long value passed to the driver. The usage is driver specific. |
| 48 | The value is ignored by most drivers. |
| 49 | |
| 50 | Example |
| 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 | |
| 72 | Configuration |
| 73 | ------------- |
| 74 | |
| 75 | The command is only available if CONFIG_CMD_WDT=y. |
| 76 | |
| 77 | Return value |
| 78 | ------------ |
| 79 | |
| 80 | The return value $? is 0 if the command succeeds, 1 upon failure. |