summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMary Ruthven <mruthven@chromium.org>2016-06-24 14:24:23 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-06-27 17:13:51 -0700
commite84a71fe67c08dd3d1777c0cd22fd1e35ea1d7e0 (patch)
tree26369c91f55094cfc8d655e3187871715e029e16
parent9a644c429af9f299445962892666685233cb0a1b (diff)
downloadchrome-ec-e84a71fe67c08dd3d1777c0cd22fd1e35ea1d7e0.tar.gz
cr50: enable highsec jittery clock
The highsec jittery clock was breaking the USB peripheral, because it would use bank values that mapped to frequencies less than 15MHz. This change modifies stepx16 to keep the bankvalues mapped to frequencies above 18MHz to ensure the USB peripheral can work with the high security jittery clock. BUG=chrome-os-partner:53952 BRANCH=none TEST=sudo flashrom -p raiden_debug_spi:target=AP -r test_img.bin Change-Id: If8b45583f2cd9272b6d1e79a06556724c25d6495 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/356192 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
-rw-r--r--board/cr50/board.c3
-rw-r--r--chip/g/jitter.c2
2 files changed, 2 insertions, 3 deletions
diff --git a/board/cr50/board.c b/board/cr50/board.c
index 766d971491..3910af7159 100644
--- a/board/cr50/board.c
+++ b/board/cr50/board.c
@@ -130,8 +130,7 @@ static void board_init(void)
init_timers();
init_interrupts();
init_trng();
- /* TODO(crosbug.com/p/53952): enable jittery clock */
- /* init_jittery_clock(1); */
+ init_jittery_clock(1);
init_runlevel(PERMISSION_MEDIUM);
/* Initialize NvMem partitions */
nvmem_init();
diff --git a/chip/g/jitter.c b/chip/g/jitter.c
index 35bf8142c3..b0686bc0bf 100644
--- a/chip/g/jitter.c
+++ b/chip/g/jitter.c
@@ -27,7 +27,7 @@ void init_jittery_clock(int highsec)
int bank;
if (highsec)
- stepx16 = 0xff - trimfast;
+ stepx16 = (delta * 7) >> 1;
else
stepx16 = 2 * (trim48 - trimfast);