summaryrefslogtreecommitdiff
path: root/chip/lm4/watchdog.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2012-06-01 21:43:25 -0700
committerGerrit <chrome-bot@google.com>2012-06-05 09:30:21 -0700
commitfb425cf11f5a0f9ea2a1a7dc19789b328b3bc859 (patch)
tree7af3ade8e5bf3820b288ad7bd7ddc0a9db7f40da /chip/lm4/watchdog.c
parent76abf8f8cc3003fa3bb00d5c4902335a933707e8 (diff)
downloadchrome-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 'chip/lm4/watchdog.c')
-rw-r--r--chip/lm4/watchdog.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/chip/lm4/watchdog.c b/chip/lm4/watchdog.c
index 6591de64ac..915c7e3489 100644
--- a/chip/lm4/watchdog.c
+++ b/chip/lm4/watchdog.c
@@ -16,6 +16,7 @@
#include "timer.h"
#include "uart.h"
#include "util.h"
+#include "watchdog.h"
/*
* We use watchdog 0 which is clocked on the system clock
@@ -25,11 +26,6 @@
/* magic value to unlock the watchdog registers */
#define LM4_WATCHDOG_MAGIC_WORD 0x1ACCE551
-#define WATCHDOG_PERIOD_MS 1100 /* Watchdog period in ms */
-#define WATCHDOG_RELOAD_MS 500 /* Interval in ms between reloads of the
- * watchdog timer. Should be less than half
- * of the watchdog period. */
-
static uint32_t watchdog_period; /* Watchdog counter initial value */
/* Watchdog debug trace. This is triggered if the watchdog has not been