diff options
author | Sukumar Ghorai <sukumar.ghorai@intel.com> | 2023-07-31 03:09:40 -0700 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2023-08-04 14:05:56 +0000 |
commit | bab976b85817526c8bf358c3af2d5ac410a575a1 (patch) | |
tree | 25d7f7293523155e7afe9473ad36ea05495db64e /src | |
parent | 2d8bc345cbc274aac402df7e5232885074591f38 (diff) |
soc/intel/meteorlake: Hook up UPD for C1 C-state auto-demotion
FSP has a parameter to enable/disable c1-state autodemotion feature.
Boards/Baseboard can choose to use this feature as per requirement.
This patch hooks up this parameter to devicetree.
BUG=b:286328295
TEST=Check code compiles & boot google/rex, and correct value has been
passed to FSP.
Change-Id: I2cc60bd297271fcb3000c0298af71208e3be60fc
Signed-off-by: Sukumar Ghorai <sukumar.ghorai@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76826
Reviewed-by: Sridhar Siricilla <sridhar.siricilla@intel.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/soc/intel/meteorlake/chip.h | 10 | ||||
-rw-r--r-- | src/soc/intel/meteorlake/fsp_params.c | 4 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/soc/intel/meteorlake/chip.h b/src/soc/intel/meteorlake/chip.h index 9ea77737e2..178dd7cda1 100644 --- a/src/soc/intel/meteorlake/chip.h +++ b/src/soc/intel/meteorlake/chip.h @@ -369,6 +369,16 @@ struct soc_intel_meteorlake_config { uint8_t lan_clk; /* + * Enable or Disable C1 C-state Auto Demotion & un-demotion + * The algorithm looks at the behavior of the wake up tracker, how + * often it is waking up, and based on that it demote the c-state. + * Default 0. Set this to 1 in order to disable C1-state auto demotion. + * NOTE: Un-Demotion from Demoted C1 needs to be disabled when + * C1 C-state Auto Demotion is disabled. + */ + bool disable_c1_state_auto_demotion; + + /* * Enable or Disable Package C-state Demotion. * Default is set to 0. * Set this to 1 in order to disable Package C-state demotion. diff --git a/src/soc/intel/meteorlake/fsp_params.c b/src/soc/intel/meteorlake/fsp_params.c index 30800e67a6..58d4cda8fe 100644 --- a/src/soc/intel/meteorlake/fsp_params.c +++ b/src/soc/intel/meteorlake/fsp_params.c @@ -654,6 +654,10 @@ static void fill_fsps_misc_power_params(FSP_S_CONFIG *s_cfg, /* Enable the energy efficient turbo mode */ s_cfg->EnergyEfficientTurbo = 1; s_cfg->PmcLpmS0ixSubStateEnableMask = get_supported_lpm_mask(); + /* Un-Demotion from Demoted C1 need to be disable when + * C1 auto demotion is disabled */ + s_cfg->C1StateUnDemotion = !config->disable_c1_state_auto_demotion; + s_cfg->C1StateAutoDemotion = !config->disable_c1_state_auto_demotion; s_cfg->PkgCStateDemotion = !config->disable_package_c_state_demotion; s_cfg->PmcV1p05PhyExtFetControlEn = 1; |