summaryrefslogtreecommitdiff
path: root/src/soc
diff options
context:
space:
mode:
authorMichael Niewöhner <foss@mniewoehner.de>2021-09-27 18:45:10 +0200
committerMichael Niewöhner <foss@mniewoehner.de>2021-10-17 13:57:53 +0000
commit6eaffcdbb13b13aad20a4ea0f06f361432daf713 (patch)
tree2ffbb6a747f34f86088f6acf3eab48200366e687 /src/soc
parent01b3c40bfef5f5789a8521da766be8792eeb06c2 (diff)
soc/intel: implement ACPI timer disabling per SoC and drop common code
Since it's just a one-liner, implement disabling of the ACPI timer in soc code. This reduces complexity. Change-Id: I434ea87d00f6e919983d9229f79d4adb352fbf27 Signed-off-by: Michael Niewöhner <foss@mniewoehner.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/58020 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'src/soc')
-rw-r--r--src/soc/intel/alderlake/Kconfig1
-rw-r--r--src/soc/intel/alderlake/pmc.c2
-rw-r--r--src/soc/intel/common/block/include/intelblocks/pmclib.h3
-rw-r--r--src/soc/intel/common/block/pmc/Kconfig6
-rw-r--r--src/soc/intel/common/block/pmc/pmclib.c9
-rw-r--r--src/soc/intel/elkhartlake/Kconfig1
-rw-r--r--src/soc/intel/elkhartlake/pmc.c2
-rw-r--r--src/soc/intel/icelake/Kconfig1
-rw-r--r--src/soc/intel/icelake/pmc.c2
-rw-r--r--src/soc/intel/jasperlake/Kconfig1
-rw-r--r--src/soc/intel/jasperlake/pmc.c2
-rw-r--r--src/soc/intel/tigerlake/Kconfig1
-rw-r--r--src/soc/intel/tigerlake/pmc.c2
13 files changed, 5 insertions, 28 deletions
diff --git a/src/soc/intel/alderlake/Kconfig b/src/soc/intel/alderlake/Kconfig
index e98878f14e..a57d05e660 100644
--- a/src/soc/intel/alderlake/Kconfig
+++ b/src/soc/intel/alderlake/Kconfig
@@ -43,7 +43,6 @@ config CPU_SPECIFIC_OPTIONS
select PLATFORM_USES_FSP2_2
select PM_ACPI_TIMER_OPTIONAL
select PMC_GLOBAL_RESET_ENABLE_LOCK
- select PMC_LOW_POWER_MODE_PROGRAM
select SOC_INTEL_COMMON
select SOC_INTEL_COMMON_ACPI_WAKE_SOURCE
select SOC_INTEL_COMMON_BLOCK
diff --git a/src/soc/intel/alderlake/pmc.c b/src/soc/intel/alderlake/pmc.c
index 4251cd66bd..0d523686d8 100644
--- a/src/soc/intel/alderlake/pmc.c
+++ b/src/soc/intel/alderlake/pmc.c
@@ -160,7 +160,7 @@ static void soc_pmc_init(struct device *dev)
* Disabling ACPI PM timer also switches off TCO
*/
if (!CONFIG(USE_PM_ACPI_TIMER))
- pmc_disable_acpi_timer();
+ setbits8(pmc_mmio_regs() + PCH_PWRM_ACPI_TMR_CTL, ACPI_TIM_DIS);
}
static void pm1_enable_pwrbtn_smi(void *unused)
diff --git a/src/soc/intel/common/block/include/intelblocks/pmclib.h b/src/soc/intel/common/block/include/intelblocks/pmclib.h
index 4972a09f8b..bb38204718 100644
--- a/src/soc/intel/common/block/include/intelblocks/pmclib.h
+++ b/src/soc/intel/common/block/include/intelblocks/pmclib.h
@@ -251,9 +251,6 @@ void pmc_set_power_failure_state(bool target_on);
uint8_t get_pm_pwr_cyc_dur(uint8_t slp_s4_min_assert, uint8_t slp_s3_min_assert,
uint8_t slp_a_min_assert, uint8_t pm_pwr_cyc_dur);
-/* Disabling ACPI PM timer to ensure switches off TCO and necessary of XTAL OSC shutdown */
-void pmc_disable_acpi_timer(void);
-
/* API to set ACPI mode */
void pmc_set_acpi_mode(void);
diff --git a/src/soc/intel/common/block/pmc/Kconfig b/src/soc/intel/common/block/pmc/Kconfig
index 5e5e8d6184..f60dc69692 100644
--- a/src/soc/intel/common/block/pmc/Kconfig
+++ b/src/soc/intel/common/block/pmc/Kconfig
@@ -50,12 +50,6 @@ config PMC_GLOBAL_RESET_ENABLE_LOCK
Note that the reset register is still at 0xCF9 this only
controls the enable and lock feature.
-config PMC_LOW_POWER_MODE_PROGRAM
- bool
- help
- Enable this for PMC devices to perform registers programming
- to ensure low power in active idle scenario.
-
config PM_ACPI_TIMER_OPTIONAL
bool
default n
diff --git a/src/soc/intel/common/block/pmc/pmclib.c b/src/soc/intel/common/block/pmc/pmclib.c
index 6c756b1590..f7efeb78da 100644
--- a/src/soc/intel/common/block/pmc/pmclib.c
+++ b/src/soc/intel/common/block/pmc/pmclib.c
@@ -711,15 +711,6 @@ uint8_t get_pm_pwr_cyc_dur(uint8_t slp_s4_min_assert, uint8_t slp_s3_min_assert,
return PCH_PM_PWR_CYC_DUR;
}
-#if CONFIG(PMC_LOW_POWER_MODE_PROGRAM)
-void pmc_disable_acpi_timer(void)
-{
- uint8_t *pmcbase = pmc_mmio_regs();
-
- setbits8(pmcbase + PCH_PWRM_ACPI_TMR_CTL, ACPI_TIM_DIS);
-}
-#endif /* PMC_LOW_POWER_MODE_PROGRAM */
-
void pmc_set_acpi_mode(void)
{
if (!CONFIG(NO_SMM) && !acpi_is_wakeup_s3()) {
diff --git a/src/soc/intel/elkhartlake/Kconfig b/src/soc/intel/elkhartlake/Kconfig
index 07af2faf66..e3fbfddb24 100644
--- a/src/soc/intel/elkhartlake/Kconfig
+++ b/src/soc/intel/elkhartlake/Kconfig
@@ -33,7 +33,6 @@ config CPU_SPECIFIC_OPTIONS
select PLATFORM_USES_FSP2_1
select PM_ACPI_TIMER_OPTIONAL
select PMC_GLOBAL_RESET_ENABLE_LOCK
- select PMC_LOW_POWER_MODE_PROGRAM
select SOC_INTEL_COMMON
select SOC_INTEL_COMMON_ACPI_WAKE_SOURCE
select SOC_INTEL_COMMON_BLOCK
diff --git a/src/soc/intel/elkhartlake/pmc.c b/src/soc/intel/elkhartlake/pmc.c
index dd6e6160ec..53193ea11e 100644
--- a/src/soc/intel/elkhartlake/pmc.c
+++ b/src/soc/intel/elkhartlake/pmc.c
@@ -100,7 +100,7 @@ static void soc_pmc_init(struct device *dev)
* Disabling ACPI PM timer also switches off TCO
*/
if (!CONFIG(USE_PM_ACPI_TIMER))
- pmc_disable_acpi_timer();
+ setbits8(pmc_mmio_regs() + PCH_PWRM_ACPI_TMR_CTL, ACPI_TIM_DIS);
}
static void pmc_fill_ssdt(const struct device *dev)
diff --git a/src/soc/intel/icelake/Kconfig b/src/soc/intel/icelake/Kconfig
index 74bae9c433..fd05f2ec48 100644
--- a/src/soc/intel/icelake/Kconfig
+++ b/src/soc/intel/icelake/Kconfig
@@ -33,7 +33,6 @@ config CPU_SPECIFIC_OPTIONS
select PLATFORM_USES_FSP2_1
select PM_ACPI_TIMER_OPTIONAL
select PMC_GLOBAL_RESET_ENABLE_LOCK
- select PMC_LOW_POWER_MODE_PROGRAM
select CPU_INTEL_COMMON
select SOC_INTEL_COMMON
select SOC_INTEL_COMMON_ACPI_WAKE_SOURCE
diff --git a/src/soc/intel/icelake/pmc.c b/src/soc/intel/icelake/pmc.c
index 7886c1b28f..fd91cde57d 100644
--- a/src/soc/intel/icelake/pmc.c
+++ b/src/soc/intel/icelake/pmc.c
@@ -74,7 +74,7 @@ static void pmc_init(void *unused)
* Disabling ACPI PM timer also switches off TCO
*/
if (!CONFIG(USE_PM_ACPI_TIMER))
- pmc_disable_acpi_timer();
+ setbits8(pmc_mmio_regs() + PCH_PWRM_ACPI_TMR_CTL, ACPI_TIM_DIS);
}
/*
diff --git a/src/soc/intel/jasperlake/Kconfig b/src/soc/intel/jasperlake/Kconfig
index 690df0cf2d..43697602a2 100644
--- a/src/soc/intel/jasperlake/Kconfig
+++ b/src/soc/intel/jasperlake/Kconfig
@@ -34,7 +34,6 @@ config CPU_SPECIFIC_OPTIONS
select PLATFORM_USES_FSP2_2
select PM_ACPI_TIMER_OPTIONAL
select PMC_GLOBAL_RESET_ENABLE_LOCK
- select PMC_LOW_POWER_MODE_PROGRAM
select SOC_INTEL_COMMON
select SOC_INTEL_COMMON_ACPI_WAKE_SOURCE
select SOC_INTEL_COMMON_BLOCK
diff --git a/src/soc/intel/jasperlake/pmc.c b/src/soc/intel/jasperlake/pmc.c
index d3607dcb57..47c3bb104b 100644
--- a/src/soc/intel/jasperlake/pmc.c
+++ b/src/soc/intel/jasperlake/pmc.c
@@ -100,7 +100,7 @@ static void soc_pmc_init(struct device *dev)
* Disabling ACPI PM timer also switches off TCO
*/
if (!CONFIG(USE_PM_ACPI_TIMER))
- pmc_disable_acpi_timer();
+ setbits8(pmc_mmio_regs() + PCH_PWRM_ACPI_TMR_CTL, ACPI_TIM_DIS);
}
static void pm1_enable_pwrbtn_smi(void *unused)
diff --git a/src/soc/intel/tigerlake/Kconfig b/src/soc/intel/tigerlake/Kconfig
index fe7805ae70..1e9a85179f 100644
--- a/src/soc/intel/tigerlake/Kconfig
+++ b/src/soc/intel/tigerlake/Kconfig
@@ -42,7 +42,6 @@ config CPU_SPECIFIC_OPTIONS
select PLATFORM_USES_FSP2_2
select PM_ACPI_TIMER_OPTIONAL
select PMC_GLOBAL_RESET_ENABLE_LOCK
- select PMC_LOW_POWER_MODE_PROGRAM
select SOC_INTEL_COMMON
select SOC_INTEL_COMMON_ACPI_WAKE_SOURCE
select SOC_INTEL_COMMON_BLOCK
diff --git a/src/soc/intel/tigerlake/pmc.c b/src/soc/intel/tigerlake/pmc.c
index 01891e1be9..8788170368 100644
--- a/src/soc/intel/tigerlake/pmc.c
+++ b/src/soc/intel/tigerlake/pmc.c
@@ -159,7 +159,7 @@ static void soc_pmc_init(struct device *dev)
* Disabling ACPI PM timer also switches off TCO
*/
if (!CONFIG(USE_PM_ACPI_TIMER))
- pmc_disable_acpi_timer();
+ setbits8(pmc_mmio_regs() + PCH_PWRM_ACPI_TMR_CTL, ACPI_TIM_DIS);
}
static void pm1_enable_pwrbtn_smi(void *unused)