diff options
author | Simon Glass <sjg@chromium.org> | 2012-06-01 21:43:25 -0700 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2012-06-05 09:30:21 -0700 |
commit | fb425cf11f5a0f9ea2a1a7dc19789b328b3bc859 (patch) | |
tree | 7af3ade8e5bf3820b288ad7bd7ddc0a9db7f40da /include/watchdog.h | |
parent | 76abf8f8cc3003fa3bb00d5c4902335a933707e8 (diff) | |
download | chrome-ec-fb425cf11f5a0f9ea2a1a7dc19789b328b3bc859.tar.gz |
Unify the watchdog API over stm32 and lm4
Use the same prototype for watchdog_init() everywhere. One version takes
a parameters and one doesn't. We don't need the parameter since we have
a #define. Tidy this up.
Also move watchdog defines into watchdog.h.
BUG=chrome-os-partner:10145
TEST=build for all boards
Change-Id: I38ae63d7cc137b93017c850e767703d5f90f56ad
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/24394
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'include/watchdog.h')
-rw-r--r-- | include/watchdog.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/watchdog.h b/include/watchdog.h index 68ac7b917e..b4d0a1e2f6 100644 --- a/include/watchdog.h +++ b/include/watchdog.h @@ -8,9 +8,17 @@ #ifndef __CROS_EC_WATCHDOG_H #define __CROS_EC_WATCHDOG_H +#define WATCHDOG_PERIOD_MS 1100 /* Watchdog period in ms */ + +/* + * Interval in ms between reloads of the watchdog timer. Should be less + * than half of the watchdog period. + */ +#define WATCHDOG_RELOAD_MS 500 + /* Initialize the watchdog. This will cause the CPU to reboot if it has been * more than 2 watchdog periods since watchdog_reload() has been called. */ -int watchdog_init(int period_ms); +int watchdog_init(void); /* Reload the watchdog counter */ void watchdog_reload(void); |