From a622f28cb249c9d88751ce2694c83a62c25c221e Mon Sep 17 00:00:00 2001 From: Yidi Lin Date: Fri, 29 Jan 2016 17:25:03 +0800 Subject: mediatek/mt8173: pll: raising the CPU core frequency Runs the LITTLE core at highest freqency to speed up the boot time. Set Vproc to 1.125V and set the freqency to 1.6Ghz for backward compatibility. (The highest frequency for the IC before E3 is 1.6Ghz.) BRANCH=none BUG=chrome-os-partner:47422 TEST=flash the bootloader and measure the boottime by cbmem result Change-Id: Id0b906bf34ac534667eb6e8f576e30942ceb923e Signed-off-by: Patrick Georgi Original-Commit-Id: 5fc38548d158158f07cded8cfc8ea5a0a7952161 Original-Change-Id: I62af26c13d98211974243100c581abcb5408fd63 Original-Signed-off-by: Yidi Lin Original-Reviewed-on: https://chromium-review.googlesource.com/324685 Original-Reviewed-by: Julius Werner Reviewed-on: https://review.coreboot.org/13980 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- src/mainboard/google/oak/romstage.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'src/mainboard/google/oak') diff --git a/src/mainboard/google/oak/romstage.c b/src/mainboard/google/oak/romstage.c index d72693fa4d..3d018a02b1 100644 --- a/src/mainboard/google/oak/romstage.c +++ b/src/mainboard/google/oak/romstage.c @@ -17,7 +17,7 @@ #include #include #include - +#include #include #include #include @@ -25,14 +25,20 @@ #include #include #include +#include #include #include #include +#include +#include #include void main(void) { + int stabilize_usec; + struct stopwatch sw; + timestamp_add_now(TS_START_ROMSTAGE); /* init uart baudrate when pll on */ @@ -41,9 +47,23 @@ void main(void) rtc_boot(); + /* Raise CPU voltage to allow higher frequency */ + stabilize_usec = mt6391_configure_ca53_voltage(1125000); + + stopwatch_init_usecs_expire(&sw, stabilize_usec); + /* init memory */ mt_mem_init(get_sdram_config()); + while (!stopwatch_expired(&sw)) + ; + + /* Set to maximum frequency */ + if (board_id() < 5) + mt_pll_raise_ca53_freq(1600 * MHz); + else + mt_pll_raise_ca53_freq(1700 * MHz); + mt8173_mmu_after_dram(); /* should be called after memory init */ -- cgit v1.2.3