diff options
author | Mulin Chao <mlchao@nuvoton.com> | 2017-04-25 17:41:32 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-04-26 02:03:31 -0700 |
commit | acb397063002fec38979c56ae6d7219dd04c1412 (patch) | |
tree | 9dac764f8a780a95b4bbc689355aaffc9d55b689 | |
parent | 4123b5861e359318b1caf48b03f4751608a4122a (diff) | |
download | chrome-ec-acb397063002fec38979c56ae6d7219dd04c1412.tar.gz |
npcx: peci: Fixed bug caused by wrong source clock of peci.
On npcx5, the peci speed should be 750K bps but we got 1.5M bps since
selecting wrong source clock of peci. From the peci specification, the
speed range is from 2K bps to 2M bps. That's why we still passed the
peci test on npcx5's evb. This CL corrects the source clock of it from
apb2 to fmclk and make sure the speed is 750K bps by the scope.
BRANCH=none
BUG=none
TEST=Passed peci test on npcx5's evb and make sure the speed of peci is
750K bps.
Change-Id: Ic5c55f7be9be195182e4c4f4ad64b7426afd42db
Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
Reviewed-on: https://chromium-review.googlesource.com/486680
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
-rw-r--r-- | chip/npcx/peci.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chip/npcx/peci.c b/chip/npcx/peci.c index 48920cdea2..0d109adda6 100644 --- a/chip/npcx/peci.c +++ b/chip/npcx/peci.c @@ -206,8 +206,8 @@ DECLARE_HOOK(HOOK_TICK, peci_temp_sensor_poll, HOOK_PRIO_TEMP_SENSOR); static void peci_freq_changed(void) { - /* PECI is under APB2 */ - int freq = clock_get_freq(); + /* PECI's clock source is FMCLK */ + int freq = clock_get_fm_freq(); int baud = 0xF; /* Disable polling while reconfiguring */ |