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