diff options
author | Ewout van Bekkum <ewout@google.com> | 2016-01-14 15:20:21 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-01-28 00:02:02 -0800 |
commit | 347f516d8444a95e0506640f116e102828b89527 (patch) | |
tree | 4912ed4c293297c54402b703f3315ab72ddfc3c9 /chip/g/watchdog.c | |
parent | 7d0152a78b8b6947dd103c01d9fe380f5b55edf6 (diff) | |
download | chrome-ec-347f516d8444a95e0506640f116e102828b89527.tar.gz |
cr50: updates watchdog and hw clock to use hw regdefs
This commit updates the cr50 watchdog and hwtimer drivers to use the
hardware header specified regdefs to determine the frequencies for
the cr50 device.
BRANCH=None
TEST=Verified gettime and watchdog behavior on cr51
BUG=chrome-os-partner:46737
Change-Id: Iec7dc56b160dbec1b71077cecfd5561436d6f3ab
Signed-off-by: Ewout van Bekkum <ewout@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/321867
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'chip/g/watchdog.c')
-rw-r--r-- | chip/g/watchdog.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/chip/g/watchdog.c b/chip/g/watchdog.c index 0568e27161..84ef15cd76 100644 --- a/chip/g/watchdog.c +++ b/chip/g/watchdog.c @@ -16,8 +16,9 @@ /* magic value to unlock the watchdog registers */ #define WATCHDOG_MAGIC_WORD 0x1ACCE551 -/* Watchdog expiration : assume 30 Mhz clock for now */ -#define WATCHDOG_PERIOD (CONFIG_WATCHDOG_PERIOD_MS * (30000000 / 1000)) +/* Watchdog expiration */ +#define WATCHDOG_PERIOD (CONFIG_WATCHDOG_PERIOD_MS * \ + ((GC_CONST_FPGA_JITTER_FIXED_FREQ * 1000000) / 1000)) void trace_and_reset(uint32_t excep_lr, uint32_t excep_sp) { |