diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2021-04-26 13:34:08 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-05-03 12:38:19 +0200 |
commit | 7702961ce8dceed94f3efe401e39dc62ccac0e70 (patch) | |
tree | 2eba6b936620fc7d2cc998904f6584cdcb6399e0 /Documentation | |
parent | 17bedd93623f27e773775b7164d27b7e9edfdf4b (diff) | |
download | barebox-7702961ce8dceed94f3efe401e39dc62ccac0e70.tar.gz barebox-7702961ce8dceed94f3efe401e39dc62ccac0e70.tar.xz |
Documentation: user: watchdog: sync with current state
Since most of the documentation was written, the watchdog framework
has gained three more device parameters. Document them.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20210426113408.24903-2-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/user/watchdog.rst | 36 |
1 files changed, 32 insertions, 4 deletions
diff --git a/Documentation/user/watchdog.rst b/Documentation/user/watchdog.rst index 02bd576a89..ff400317a0 100644 --- a/Documentation/user/watchdog.rst +++ b/Documentation/user/watchdog.rst @@ -57,6 +57,9 @@ measured in seconds: barebox@DPTechnics DPT-Module:/ devinfo wdog0 Parameters: autoping: 1 (type: bool) + priority: 100 (type: uint32) + running: 1 (type: enum) (values: "unknown", "1", "0") + seconds_to_expire: 7 (type: uint32) timeout_cur: 7 (type: uint32) timeout_max: 10 (type: uint32) @@ -67,6 +70,34 @@ Use barebox' environment to persist these changes between reboots: nv dev.wdog0.autoping=1 nv dev.wdog0.timeout_cur=7 +Watchdog State +~~~~~~~~~~~~~~ + +To check whether a watchdog is currently running, the ``running`` device +parameter can be consulted. Not all watchdog devices (or their drivers) +provide the information whether a watchdog was running prior to barebox. +In that case, the parameter will contain the value ``unknown``. + +Watchdogs started by barebox can be monitored using the +``seconds_to_expire`` parameter. A well-behaving system of watchdog +device, watchdog driver and clocksource should reset as soon as the +count down reaches zero. + +To manually start a watchdog, :ref:`command_wd` can be used. + +Default Watchdog +~~~~~~~~~~~~~~~~ + +barebox supports multiple concurrent watchdogs. The default watchdog used +with :ref:`command_wd`, ``boot.watchdog_timeout`` and :ref:`command_boot`'s +``-w`` option is the one with the highest positive priority. +If multiple watchdogs share the same priority, only one will be affected. + +The priority is initially set by drivers and can be overridden in the +device tree or via the ``priority`` device parameter. Normally, watchdogs +that have a wider effect should be given the higher priority (e.g. +PMIC watchdog resetting the board vs. SoC's watchdog resetting only itself). + Boot Watchdog Timeout ~~~~~~~~~~~~~~~~~~~~~ @@ -85,7 +116,4 @@ or persistently by nv boot.watchdog_timeout=10 where the used value again is measured in seconds. - -On a system with multiple watchdogs, the watchdog with the highest positive -priority is the one affected by the ``boot.watchdog_timeout`` parameter. If -multiple watchdogs share the same priority, only one will be started. +Only the default watchdog will be started. |