summaryrefslogtreecommitdiff
path: root/include/hwtimer.h
diff options
context:
space:
mode:
authorVincent Palatin <vpalatin@chromium.org>2012-08-05 20:47:54 -0700
committerGerrit <chrome-bot@google.com>2012-08-06 18:55:00 -0700
commitdbc861c5f0115ec673be2a7c6837d19dc9e3c4c1 (patch)
tree5f1082ee2e4c0a6bc7e75c70ea42a92c1cd5dcd7 /include/hwtimer.h
parentd8e04f0db75a0088121981df3bd57c3dccb10945 (diff)
downloadchrome-ec-dbc861c5f0115ec673be2a7c6837d19dc9e3c4c1.tar.gz
add a function to fast forward system timer
When we wake up from a deep sleep mode, the system timer clock might have been stopped. We need to be able to set using another time source (e.g. the RTC). Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=chrome-os-partner:8866 TEST=make BOARD=snow && make BOARD=link on Snow, on a software implementing STOP mode, check the system time is still accurate by comparing it to the wall clock. Change-Id: Ieddbb423d052c7aceb398470866b25b25a74c0a0 Reviewed-on: https://gerrit.chromium.org/gerrit/29314 Reviewed-by: Randall Spangler <rspangler@chromium.org> Commit-Ready: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'include/hwtimer.h')
-rw-r--r--include/hwtimer.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/hwtimer.h b/include/hwtimer.h
index fdf1d94852..b9b2270fd6 100644
--- a/include/hwtimer.h
+++ b/include/hwtimer.h
@@ -52,6 +52,9 @@ void __hw_clock_event_clear(void);
/* Returns the value of the free-running counter used as clock. */
uint32_t __hw_clock_source_read(void);
+/* Override the current value of the hardware counter */
+void __hw_clock_source_set(uint32_t ts);
+
/**
* Initializes the hardware timer used to provide clock services, using the
* specified start timer value.