diff options
author | Dino Li <dino.li@ite.com.tw> | 2015-11-03 01:40:09 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2015-11-05 11:10:30 -0800 |
commit | 032846bc3264a4d5ae82ad1efac9fc21ee64e88f (patch) | |
tree | 60a72bab040c326dd80707d44c802fe3ce954c0b /chip/it83xx/hwtimer_chip.h | |
parent | f9ffa951c1eda17f6aa5cea66b1842b0bbf5d75f (diff) | |
download | chrome-ec-032846bc3264a4d5ae82ad1efac9fc21ee64e88f.tar.gz |
it8380dev: modify hwtimer and LPC wake up
1. In combinational mode and clock source is 8MHz,
if timer 3 counter register always equals to 7, then timer 4 will be a
32-bit MHz free-running counter.
2. Fix TIMER_32P768K_CNT_TO_US(), each count should be 30.5175 us,
not 32.768us.
3. Fix TIMER_CNT_8M_32P768K().
4. Make sure LPC wake up interrupt is enabled before entering doze /
deep doze mode.
Signed-off-by: Dino Li <dino.li@ite.com.tw>
BRANCH=none
BUG=none
TEST=1. Console commands: 'gettime', 'timerinfo', 'waitms', and 'forcetime'.
2. Enabled Hook debug, no warning message received (48hrs).
3. Tested ectool command 'version' x 2000.
Change-Id: I796d985361d3c18bc5813c58705b41923e28c5b1
Reviewed-on: https://chromium-review.googlesource.com/310039
Commit-Ready: Dino Li <dino.li@ite.com.tw>
Tested-by: Dino Li <dino.li@ite.com.tw>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'chip/it83xx/hwtimer_chip.h')
-rw-r--r-- | chip/it83xx/hwtimer_chip.h | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/chip/it83xx/hwtimer_chip.h b/chip/it83xx/hwtimer_chip.h index 18ee3f0f13..e2e9cdffda 100644 --- a/chip/it83xx/hwtimer_chip.h +++ b/chip/it83xx/hwtimer_chip.h @@ -10,22 +10,11 @@ #define TIMER_COUNT_1US_SHIFT 3 -/* Combinational mode, microseconds to timer counter setting register */ -#define TIMER_H_US_TO_COUNT(us) ((us) >> (24 - TIMER_COUNT_1US_SHIFT)) -#define TIMER_L_US_TO_COUNT(us) (((us) << TIMER_COUNT_1US_SHIFT) & 0x00ffffff) - -/* Free running timer counter observation value to microseconds */ -#define TIMER_H_COUNT_TO_US(cnt) ((~(cnt)) << (24 - TIMER_COUNT_1US_SHIFT)) -#define TIMER_L_COUNT_TO_US(cnt) (((cnt) & 0x00ffffff) >> TIMER_COUNT_1US_SHIFT) - /* Microseconds to event timer counter setting register */ #define EVENT_TIMER_US_TO_COUNT(us) ((us) << TIMER_COUNT_1US_SHIFT) /* Event timer counter observation value to microseconds */ #define EVENT_TIMER_COUNT_TO_US(cnt) ((cnt) >> TIMER_COUNT_1US_SHIFT) -#define TIMER_H_CNT_COMP TIMER_H_US_TO_COUNT(0xffffffff) -#define TIMER_L_CNT_COMP TIMER_L_US_TO_COUNT(0xffffffff) - #define FREE_EXT_TIMER_L EXT_TIMER_3 #define FREE_EXT_TIMER_H EXT_TIMER_4 #define FAN_CTRL_EXT_TIMER EXT_TIMER_5 |