Michael Niewöhner has submitted this change. ( https://review.coreboot.org/c/coreboot/+/58019 )
Change subject: soc/intel: move disabling of PM Timer to SoC PMC code ......................................................................
soc/intel: move disabling of PM Timer to SoC PMC code
Move disabling of PM Timer to SoC PMC code.
The original reason for placing that in `finalize` [1] was FSP hanging due to use of the PM timer without enabling timer emulation first in coreboot, which was added later [2].
[1] commit 6c1bf27dae (intel/skylake: disable ACPI PM Timer to enable XTAL OSC shutdown)
[2] commit f004f66ca7 (soc/intel/skylake: Enable ACPI PM timer emulation on all CPUs)
Change-Id: I354c3aea0c8c1f8ff3d698e0636932b7b76125f7 Signed-off-by: Michael Niewöhner foss@mniewoehner.de Reviewed-on: https://review.coreboot.org/c/coreboot/+/58019 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Nico Huber nico.h@gmx.de --- M src/soc/intel/alderlake/finalize.c M src/soc/intel/alderlake/pmc.c M src/soc/intel/elkhartlake/finalize.c M src/soc/intel/elkhartlake/pmc.c M src/soc/intel/icelake/finalize.c M src/soc/intel/icelake/pmc.c M src/soc/intel/jasperlake/finalize.c M src/soc/intel/jasperlake/pmc.c M src/soc/intel/tigerlake/finalize.c M src/soc/intel/tigerlake/pmc.c 10 files changed, 45 insertions(+), 45 deletions(-)
Approvals: build bot (Jenkins): Verified Nico Huber: Looks good to me, approved
diff --git a/src/soc/intel/alderlake/finalize.c b/src/soc/intel/alderlake/finalize.c index 4ef572b..aa136d4 100644 --- a/src/soc/intel/alderlake/finalize.c +++ b/src/soc/intel/alderlake/finalize.c @@ -57,15 +57,6 @@
/* TODO: Add Thermal Configuration */
- /* - * Disable ACPI PM timer based on Kconfig - * - * Disabling ACPI PM timer is necessary for XTAL OSC shutdown. - * Disabling ACPI PM timer also switches off TCO - */ - if (!CONFIG(USE_PM_ACPI_TIMER)) - pmc_disable_acpi_timer(); - pch_handle_sideband(config);
pmc_clear_pmcon_sts(); diff --git a/src/soc/intel/alderlake/pmc.c b/src/soc/intel/alderlake/pmc.c index 6f9b03b..4251cd6 100644 --- a/src/soc/intel/alderlake/pmc.c +++ b/src/soc/intel/alderlake/pmc.c @@ -152,6 +152,15 @@ * done from the "ops->init" callback. */ pmc_set_acpi_mode(); + + /* + * Disable ACPI PM timer based on Kconfig + * + * Disabling ACPI PM timer is necessary for XTAL OSC shutdown. + * Disabling ACPI PM timer also switches off TCO + */ + if (!CONFIG(USE_PM_ACPI_TIMER)) + pmc_disable_acpi_timer(); }
static void pm1_enable_pwrbtn_smi(void *unused) diff --git a/src/soc/intel/elkhartlake/finalize.c b/src/soc/intel/elkhartlake/finalize.c index ad3b4ef..d415a1d 100644 --- a/src/soc/intel/elkhartlake/finalize.c +++ b/src/soc/intel/elkhartlake/finalize.c @@ -29,15 +29,6 @@
/* TODO: Add Thermal Configuration */
- /* - * Disable ACPI PM timer based on Kconfig - * - * Disabling ACPI PM timer is necessary for XTAL OSC shutdown. - * Disabling ACPI PM timer also switches off TCO - */ - if (!CONFIG(USE_PM_ACPI_TIMER)) - pmc_disable_acpi_timer(); - pmc_clear_pmcon_sts(); }
diff --git a/src/soc/intel/elkhartlake/pmc.c b/src/soc/intel/elkhartlake/pmc.c index bcc8c8b..dd6e616 100644 --- a/src/soc/intel/elkhartlake/pmc.c +++ b/src/soc/intel/elkhartlake/pmc.c @@ -92,6 +92,15 @@ * done from the "ops->init" callback. */ pmc_set_acpi_mode(); + + /* + * Disable ACPI PM timer based on Kconfig + * + * Disabling ACPI PM timer is necessary for XTAL OSC shutdown. + * Disabling ACPI PM timer also switches off TCO + */ + if (!CONFIG(USE_PM_ACPI_TIMER)) + pmc_disable_acpi_timer(); }
static void pmc_fill_ssdt(const struct device *dev) diff --git a/src/soc/intel/icelake/finalize.c b/src/soc/intel/icelake/finalize.c index f828cc4..eb7ac10 100644 --- a/src/soc/intel/icelake/finalize.c +++ b/src/soc/intel/icelake/finalize.c @@ -54,15 +54,6 @@ */ pch_thermal_configuration();
- /* - * Disable ACPI PM timer based on Kconfig - * - * Disabling ACPI PM timer is necessary for XTAL OSC shutdown. - * Disabling ACPI PM timer also switches off TCO - */ - if (!CONFIG(USE_PM_ACPI_TIMER)) - pmc_disable_acpi_timer(); - pch_handle_sideband(config);
pmc_clear_pmcon_sts(); diff --git a/src/soc/intel/icelake/pmc.c b/src/soc/intel/icelake/pmc.c index ee40fee..7886c1b 100644 --- a/src/soc/intel/icelake/pmc.c +++ b/src/soc/intel/icelake/pmc.c @@ -66,6 +66,15 @@ config_deep_s3(config->deep_s3_enable_ac, config->deep_s3_enable_dc); config_deep_s5(config->deep_s5_enable_ac, config->deep_s5_enable_dc); config_deep_sx(config->deep_sx_config); + + /* + * Disable ACPI PM timer based on Kconfig + * + * Disabling ACPI PM timer is necessary for XTAL OSC shutdown. + * Disabling ACPI PM timer also switches off TCO + */ + if (!CONFIG(USE_PM_ACPI_TIMER)) + pmc_disable_acpi_timer(); }
/* diff --git a/src/soc/intel/jasperlake/finalize.c b/src/soc/intel/jasperlake/finalize.c index 9aef9eb..40b5294 100644 --- a/src/soc/intel/jasperlake/finalize.c +++ b/src/soc/intel/jasperlake/finalize.c @@ -51,15 +51,6 @@
/* TODO: Add Thermal Configuration */
- /* - * Disable ACPI PM timer based on Kconfig - * - * Disabling ACPI PM timer is necessary for XTAL OSC shutdown. - * Disabling ACPI PM timer also switches off TCO - */ - if (!CONFIG(USE_PM_ACPI_TIMER)) - pmc_disable_acpi_timer(); - pmcbase = pmc_mmio_regs(); if (config->s0ix_enable) { /* diff --git a/src/soc/intel/jasperlake/pmc.c b/src/soc/intel/jasperlake/pmc.c index a9fc525..d3607dc 100644 --- a/src/soc/intel/jasperlake/pmc.c +++ b/src/soc/intel/jasperlake/pmc.c @@ -92,6 +92,15 @@ * done from the "ops->init" callback. */ pmc_set_acpi_mode(); + + /* + * Disable ACPI PM timer based on Kconfig + * + * Disabling ACPI PM timer is necessary for XTAL OSC shutdown. + * Disabling ACPI PM timer also switches off TCO + */ + if (!CONFIG(USE_PM_ACPI_TIMER)) + pmc_disable_acpi_timer(); }
static void pm1_enable_pwrbtn_smi(void *unused) diff --git a/src/soc/intel/tigerlake/finalize.c b/src/soc/intel/tigerlake/finalize.c index 26cba96..3bbd002 100644 --- a/src/soc/intel/tigerlake/finalize.c +++ b/src/soc/intel/tigerlake/finalize.c @@ -35,15 +35,6 @@
/* TODO: Add Thermal Configuration */
- /* - * Disable ACPI PM timer based on dt policy - * - * Disabling ACPI PM timer is necessary for XTAL OSC shutdown. - * Disabling ACPI PM timer also switches off TCO - */ - if (!CONFIG(USE_PM_ACPI_TIMER)) - pmc_disable_acpi_timer(); - pmc_clear_pmcon_sts(); }
diff --git a/src/soc/intel/tigerlake/pmc.c b/src/soc/intel/tigerlake/pmc.c index ce37007..01891e1 100644 --- a/src/soc/intel/tigerlake/pmc.c +++ b/src/soc/intel/tigerlake/pmc.c @@ -151,6 +151,15 @@ * done from the "ops->init" callback. */ pmc_set_acpi_mode(); + + /* + * Disable ACPI PM timer based on Kconfig + * + * Disabling ACPI PM timer is necessary for XTAL OSC shutdown. + * Disabling ACPI PM timer also switches off TCO + */ + if (!CONFIG(USE_PM_ACPI_TIMER)) + pmc_disable_acpi_timer(); }
static void pm1_enable_pwrbtn_smi(void *unused)
17 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one.