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>
This commit is contained in:
Michael Niewöhner
2021-09-27 18:39:41 +02:00
parent 820b9c4676
commit 01b3c40bfe
10 changed files with 45 additions and 45 deletions

View File

@ -57,15 +57,6 @@ static void pch_finalize(void)
/* 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();

View File

@ -152,6 +152,15 @@ static void soc_pmc_init(struct device *dev)
* 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)

View File

@ -29,15 +29,6 @@ static void pch_finalize(void)
/* 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();
}

View File

@ -92,6 +92,15 @@ static void soc_pmc_init(struct device *dev)
* 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)

View File

@ -54,15 +54,6 @@ static void pch_finalize(void)
*/
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();

View File

@ -66,6 +66,15 @@ static void pmc_init(void *unused)
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();
}
/*

View File

@ -51,15 +51,6 @@ static void pch_finalize(void)
/* 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) {
/*

View File

@ -92,6 +92,15 @@ static void soc_pmc_init(struct device *dev)
* 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)

View File

@ -35,15 +35,6 @@ static void pch_finalize(void)
/* 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();
}

View File

@ -151,6 +151,15 @@ static void soc_pmc_init(struct device *dev)
* 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)