summaryrefslogtreecommitdiff
path: root/include/wdt.h
diff options
context:
space:
mode:
authorRasmus Villemoes <rasmus.villemoes@prevas.dk>2021-08-19 12:57:01 +0300
committerStefan Roese <sr@denx.de>2021-08-31 13:04:03 +0300
commit90555dc83e886250f029711728939a219c225f2d (patch)
treef8af297850a3777eacdd92827303df26b29064d3 /include/wdt.h
parent815529ebe183cc9773b2e51f754daba5b6906d32 (diff)
downloadu-boot-90555dc83e886250f029711728939a219c225f2d.tar.xz
watchdog: wdt-uclass.c: add wdt_stop_all() helper
Since the watchdog_dev member of struct global_data is going away in favor of the wdt-uclass handling all watchdog devices, prepare for that by adding a helper to call wdt_stop() on all known devices. If an error is encountered, still do wdt_stop() on remaining devices, but remember and return the first error seen. Initially, this will only be used in one single place (board/alliedtelesis/x530/x530.c). Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Diffstat (limited to 'include/wdt.h')
-rw-r--r--include/wdt.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/wdt.h b/include/wdt.h
index bc242c2eb2..baaa9db08a 100644
--- a/include/wdt.h
+++ b/include/wdt.h
@@ -38,6 +38,14 @@ int wdt_start(struct udevice *dev, u64 timeout_ms, ulong flags);
int wdt_stop(struct udevice *dev);
/*
+ * Stop all registered watchdog devices.
+ *
+ * @return: 0 if ok, first error encountered otherwise (but wdt_stop()
+ * is still called on following devices)
+ */
+int wdt_stop_all(void);
+
+/*
* Reset the timer, typically restoring the counter to
* the value configured by start()
*