diff options
author | Vincent Palatin <vpalatin@chromium.org> | 2014-11-13 14:28:22 -0800 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-11-14 03:03:39 +0000 |
commit | aad897775a77319e458be15a4d1d5a80a01359a1 (patch) | |
tree | 3b0907d3ce97fe0d7fe9d74de9a0a1d1b31f5df7 | |
parent | 9157dd93daf0500c4f8f0768b00dafb324d633ec (diff) | |
download | chrome-ec-aad897775a77319e458be15a4d1d5a80a01359a1.tar.gz |
zinger: (re-)enable the flash prefetch buffer
At 48Mhz, due to the flash accessing requiring 1 Wait-State, we need to
enable the flash prefetch buffer to get the full CPU execution speed.
The bit used to enable flash prefetching was fixed :
crosreview.com/219921 , but the change was overriden by the CL enabling
the STOP mode : crosreview.com/219933
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BRANCH=samus
BUG=chrome-os-partner:28335
TEST=plug Zinger into a PD power sink, with the Twinkie protocol
analyzer observe how long Zinger takes to send back GoodCRC after the
Request and SinkCap messages. With the patch, the average delay is going
from 160us to 50us.
Change-Id: I9de1bc10e14485919046c841eea16de3c3b3c800
Reviewed-on: https://chromium-review.googlesource.com/229671
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r-- | board/zinger/runtime.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/board/zinger/runtime.c b/board/zinger/runtime.c index e7fb421f49..407daa5c54 100644 --- a/board/zinger/runtime.c +++ b/board/zinger/runtime.c @@ -93,8 +93,11 @@ static void config_hispeed_clock(void) void runtime_init(void) { - /* put 1 Wait-State for flash access to ensure proper reads at 48Mhz */ - STM32_FLASH_ACR = 0x1001; /* 1 WS / Prefetch enabled */ + /* + * put 1 Wait-State for flash access to ensure proper reads at 48Mhz + * and enable prefetch buffer. + */ + STM32_FLASH_ACR = STM32_FLASH_ACR_LATENCY | STM32_FLASH_ACR_PRFTEN; config_hispeed_clock(); |