summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAamir Bohra <aamir.bohra@intel.com>2019-07-25 11:52:35 +0530
committerSubrata Banik <subrata.banik@intel.com>2019-08-02 04:55:24 +0000
commite5269a8fd975fa0cba0655cd41f7f8cc99a1feb8 (patch)
treec185e9698c8cd1edff2c59671adbc2ddd83689a8
parentc47c6405e8a0213df4f48925b1acca4910d7a123 (diff)
downloadcoreboot-e5269a8fd975fa0cba0655cd41f7f8cc99a1feb8.tar.xz
soc/intel/cannonlake: Enable ACPI timer emulation if PM timer is disabled
Add a check to enable ACPI timer emulation only when the APCI PM timer is disabled. Change-Id: I21c0b89218d0df9336e0b0e15f1b575b8508fb96 Signed-off-by: Aamir Bohra <aamir.bohra@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/34563 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Subrata Banik <subrata.banik@intel.com>
-rw-r--r--src/soc/intel/cannonlake/cpu.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/soc/intel/cannonlake/cpu.c b/src/soc/intel/cannonlake/cpu.c
index b0eaa5dd34..6682cdc7b9 100644
--- a/src/soc/intel/cannonlake/cpu.c
+++ b/src/soc/intel/cannonlake/cpu.c
@@ -384,8 +384,14 @@ static void configure_thermal_target(void)
*/
static void enable_pm_timer_emulation(void)
{
- /* ACPI PM timer emulation */
+ const struct soc_intel_cannonlake_config *config;
msr_t msr;
+
+ config = config_of_path(SA_DEVFN_ROOT);
+
+ /* Enable PM timer emulation only if ACPI PM timer is disabled */
+ if (!config->PmTimerDisabled)
+ return;
/*
* The derived frequency is calculated as follows:
* (CTC_FREQ * msr[63:32]) >> 32 = target frequency.