wdt.rst 1.6 KB

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