summaryrefslogtreecommitdiff
path: root/include/watchdog.h
diff options
context:
space:
mode:
authorVincent Palatin <vpalatin@chromium.org>2012-01-25 23:38:16 +0000
committerVincent Palatin <vpalatin@chromium.org>2012-01-26 01:29:48 +0000
commit4cca2932efc82208b93c7b02fae4ea6c2e4944cd (patch)
tree5164f354ac39b5bf5db3c81acbe850b59fc1162d /include/watchdog.h
parent9a465855f899b42d91b0ca0b8d3baeabfccce6cf (diff)
downloadchrome-ec-4cca2932efc82208b93c7b02fae4ea6c2e4944cd.tar.gz
Move SoC-independant headers to another directory
Preparatory work to introduce a second SoC : 2nd series 1/4 The atomic operations are SoC independant since they are only using LDREX/STREX instructions which are just core specific ARMv7-M). The watchdog header defines the API which is common to all platforms. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=None TEST=run EC firmware on BDS and check a few console commands
Diffstat (limited to 'include/watchdog.h')
-rw-r--r--include/watchdog.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/watchdog.h b/include/watchdog.h
new file mode 100644
index 0000000000..75a5e0b4a5
--- /dev/null
+++ b/include/watchdog.h
@@ -0,0 +1,21 @@
+/* Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+/* Watchdog driver */
+
+#ifndef _WATCHDOG_H
+#define _WATCHDOG_H
+
+/* Reload the watchdog counter */
+void watchdog_reload(void);
+
+/**
+ * Initialize the watchdog
+ * with a reloading period of <period_ms> milliseconds.
+ * It reboots the CPU if the counter has not been reloaded for twice the period.
+ */
+int watchdog_init(int period_ms);
+
+#endif /* _WATCHDOG_H */