diff options
author | Dino Li <Dino.Li@ite.com.tw> | 2021-09-08 12:01:31 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-09-27 06:44:09 +0000 |
commit | 4e2d1981915533a3f214b4075babd49c8ca6c0ef (patch) | |
tree | 5626aeec1fb410c9c540892de1323e2519cfae5a /common | |
parent | 8e132f7c5b61466bcca6d7ab7403f44611cbd032 (diff) | |
download | chrome-ec-4e2d1981915533a3f214b4075babd49c8ca6c0ef.tar.gz |
it83xx: clock: fix sequence to set PLL control register
We change event timer's clock to 32.768kHz before entering low power
mode. And will restore the clock to 8MHz (by checking PLL control
register's setting in ISR) when chip wake up from the low power mode.
So we need to ensure the setting is taken into PLL control register
before wfi instruction. The original implementation can't ensure event
timer’s clock is restored to 8MHz when chip wake up. So we fix it.
This also fix wfi (wait for interrupt) instruction fail issue on RISV-V
core chips when a timer count down to zero (MTIP@mip is set to 1 until
HW reload timer counter).
Once CPU executed wfi instruction, CPU should stay there until interrupt
is fired or MEIP@mip is non-zero. But currently, HW checks entire mip
value (should check MEIP@mip only) to decide whether or not to ignore
wfi instruction.
The issue will cause EC premature wake from idle task even there is no
interrupt fired.
BRANCH=asurada, icarus
BUG=none
TEST=-On asurada, increase CPU clock to 96mhz.
Plug out/in type-c adapter to wake chip up from low power mode,
no pre-watchdog warning fired. (x100)
-buildall
Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
Change-Id: I72bb2566c5b22bc132ab304a38a5a1b5b968e463
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3168672
Reviewed-by: Eric Yilun Lin <yllin@google.com>
Commit-Queue: Eric Yilun Lin <yllin@google.com>
Diffstat (limited to 'common')
0 files changed, 0 insertions, 0 deletions