summaryrefslogtreecommitdiff
path: root/include/watchdog.h
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2013-06-10 11:04:01 -0700
committerChromeBot <chrome-bot@google.com>2013-06-10 13:59:34 -0700
commit0b8f5a3a6ca9722e4c7bc931577b08616e31d72a (patch)
tree4ccd00f8bb3a6b95a95506a8c1494a19c4e15096 /include/watchdog.h
parentcbee574e6487e2f7dd12c4ed5f2bef8ae7c4b9cb (diff)
downloadchrome-ec-0b8f5a3a6ca9722e4c7bc931577b08616e31d72a.tar.gz
Define watchdog_reload() to nothing if not CONFIG_WATCHDOG
Currently, we need to have #ifdefs everywhere watchdog_reload() is called. With this fix we don't. Also don't bother including unused hardware timer watchdog code if the watchdog isn't defined. No change when CONFIG_WATCHDOG is defined (which it is for all normal builds). BUG=chrome-os-partner:20056 BRANCH=none TEST=build all platforms with CONFIG_WATCHDOG commented out in config.h Change-Id: Id3ce33af1a497eda127a4892e13651d9d2534d92 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/58094 Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/watchdog.h')
-rw-r--r--include/watchdog.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/watchdog.h b/include/watchdog.h
index ca88094e6a..02c603ca40 100644
--- a/include/watchdog.h
+++ b/include/watchdog.h
@@ -32,6 +32,10 @@ int watchdog_init(void);
void watchdog_trace(uint32_t excep_lr, uint32_t excep_sp);
/* Reload the watchdog counter */
+#ifdef CONFIG_WATCHDOG
void watchdog_reload(void);
+#else
+static inline void watchdog_reload(void) { }
+#endif
#endif /* __CROS_EC_WATCHDOG_H */