diff options
author | Barnali Sarkar <barnali.sarkar@intel.com> | 2017-05-23 18:17:14 +0530 |
---|---|---|
committer | Aaron Durbin <adurbin@chromium.org> | 2017-06-09 20:01:26 +0200 |
commit | 66fe0c43be7d886bec8c8aef55c406a53e65642e (patch) | |
tree | e220be03cbba401f8ad1ceed61d20c4a22a2f906 /src/soc/intel/apollolake/romstage.c | |
parent | 1517bab69303dba1166a2f78b84f647618bbd003 (diff) |
soc/intel/apollolake: Use CPU common library code
This patch makes SOC files to use common/block/cpu/cpulib.c
file's helper functions.
Change-Id: I529c67cf20253cf819d1c13849300788104b083c
Signed-off-by: Barnali Sarkar <barnali.sarkar@intel.com>
Reviewed-on: https://review.coreboot.org/19827
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel/apollolake/romstage.c')
-rw-r--r-- | src/soc/intel/apollolake/romstage.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/soc/intel/apollolake/romstage.c b/src/soc/intel/apollolake/romstage.c index 6d04878d7c..79b3cfd7f9 100644 --- a/src/soc/intel/apollolake/romstage.c +++ b/src/soc/intel/apollolake/romstage.c @@ -31,6 +31,7 @@ #include <fsp/api.h> #include <fsp/memmap.h> #include <fsp/util.h> +#include <intelblocks/cpulib.h> #include <intelblocks/systemagent.h> #include <reset.h> #include <soc/cpu.h> @@ -188,6 +189,27 @@ static bool punit_init(void) return true; } +void set_max_freq(void) +{ + if (cpu_get_burst_mode_state() == BURST_MODE_UNAVAILABLE) { + /* Burst Mode has been factory configured as disabled + * and is not available in this physical processor + * package. + */ + printk(BIOS_DEBUG, "Burst Mode is factory disabled\n"); + return; + } + + /* Enable burst mode */ + cpu_enable_burst_mode(); + + /* Enable speed step. */ + cpu_enable_eist(); + + /* Set P-State ratio */ + cpu_set_p_state_to_turbo_ratio(); +} + asmlinkage void car_stage_entry(void) { struct postcar_frame pcf; |