diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2021-02-02 14:35:18 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-02-16 10:33:04 +0100 |
commit | 38d66cab36571de775c395e3831463f7e3f3ab65 (patch) | |
tree | 0fa8fe0cfca16dc121ebcde2927894d2c182a705 /include | |
parent | 082d530591c41323fa91cb8b5cab41e67e0a84db (diff) | |
download | barebox-38d66cab36571de775c395e3831463f7e3f3ab65.tar.gz barebox-38d66cab36571de775c395e3831463f7e3f3ab65.tar.xz |
watchdog: Print seconds to expire
This adds a parameter to the watchdog devices that shows what we think
when the watchdog expires. The watchdog should reset the system once the
counter hits zero. When the system resets earlier or the counter shows
negative values then there might be problems with the watchdog. Useful
for debugging watchdog related problems.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/watchdog.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/watchdog.h b/include/watchdog.h index 4d755a5a79..281885686e 100644 --- a/include/watchdog.h +++ b/include/watchdog.h @@ -22,8 +22,11 @@ struct watchdog { struct device_d dev; unsigned int priority; unsigned int timeout_max; + unsigned int timeout_cur; unsigned int poller_timeout_cur; unsigned int poller_enable; + uint64_t last_ping; + int seconds_to_expire; struct poller_async poller; struct list_head list; int running; /* enum wdog_hw_running */ |