summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-08-26 09:48:05 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2015-08-27 21:37:06 +0200
commit8f4cf30903cf6daaed0be1e8911363a3984abf72 (patch)
tree187bf0c5adc9753da483a8100070af98f8c481fc /include
parent83b0a5ae055bc084938dac96b3ea1c796d99d86c (diff)
downloadbarebox-8f4cf30903cf6daaed0be1e8911363a3984abf72.tar.gz
barebox-8f4cf30903cf6daaed0be1e8911363a3984abf72.tar.xz
watchdog: Allow multiple watchdogs
Put watchdogs on a list to allow multiple watchdogs. Add a priority field to be able to pick the highest priority watchdog. This patch also provides a of_get_watchdog_priority() function to allow configuring the watchdog priority from the device tree. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/watchdog.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/watchdog.h b/include/watchdog.h
index 7e37b7c22a..a833aeae8c 100644
--- a/include/watchdog.h
+++ b/include/watchdog.h
@@ -15,6 +15,8 @@
struct watchdog {
int (*set_timeout)(struct watchdog *, unsigned);
+ unsigned int priority;
+ struct list_head list;
};
#ifdef CONFIG_WATCHDOG
@@ -38,4 +40,8 @@ int watchdog_set_timeout(unsigned t)
}
#endif
+#define WATCHDOG_DEFAULT_PRIORITY 100
+
+unsigned int of_get_watchdog_priority(struct device_node *node);
+
#endif /* INCLUDE_WATCHDOG_H */