soc/intel/block/pmc: Move pmc_set_acpi_mode() to pmc_lib.c
pmc.c mostly contains a PCI driver, while this function just calls into SMM. Change-Id: I9a93a5079b526da5d0f95f773f2860e43b327edf Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/47755 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
parent
778c4f8c96
commit
08c646c060
|
@ -48,7 +48,4 @@ void pmc_soc_init(struct device *dev);
|
||||||
*/
|
*/
|
||||||
int pmc_soc_get_resources(struct pmc_resource_config *cfg);
|
int pmc_soc_get_resources(struct pmc_resource_config *cfg);
|
||||||
|
|
||||||
/* API to set ACPI mode */
|
|
||||||
void pmc_set_acpi_mode(void);
|
|
||||||
|
|
||||||
#endif /* SOC_INTEL_COMMON_BLOCK_PMC_H */
|
#endif /* SOC_INTEL_COMMON_BLOCK_PMC_H */
|
||||||
|
|
|
@ -232,4 +232,7 @@ uint8_t get_pm_pwr_cyc_dur(uint8_t slp_s4_min_assert, uint8_t slp_s3_min_assert,
|
||||||
/* Disabling ACPI PM timer to ensure switches off TCO and necessary of XTAL OSC shutdown */
|
/* Disabling ACPI PM timer to ensure switches off TCO and necessary of XTAL OSC shutdown */
|
||||||
void pmc_disable_acpi_timer(void);
|
void pmc_disable_acpi_timer(void);
|
||||||
|
|
||||||
|
/* API to set ACPI mode */
|
||||||
|
void pmc_set_acpi_mode(void);
|
||||||
|
|
||||||
#endif /* SOC_INTEL_COMMON_BLOCK_PMCLIB_H */
|
#endif /* SOC_INTEL_COMMON_BLOCK_PMCLIB_H */
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
#include <acpi/acpi.h>
|
#include <acpi/acpi.h>
|
||||||
#include <device/pci_ops.h>
|
#include <device/pci_ops.h>
|
||||||
#include <console/console.h>
|
#include <console/console.h>
|
||||||
#include <cpu/x86/smm.h>
|
|
||||||
#include <device/pci.h>
|
#include <device/pci.h>
|
||||||
#include <device/pci_ids.h>
|
#include <device/pci_ids.h>
|
||||||
#include <intelblocks/pmc.h>
|
#include <intelblocks/pmc.h>
|
||||||
|
@ -90,13 +89,6 @@ static void pch_pmc_read_resources(struct device *dev)
|
||||||
pch_pmc_add_io_resources(dev, config);
|
pch_pmc_add_io_resources(dev, config);
|
||||||
}
|
}
|
||||||
|
|
||||||
void pmc_set_acpi_mode(void)
|
|
||||||
{
|
|
||||||
if (!acpi_is_wakeup_s3()) {
|
|
||||||
apm_control(APM_CNT_ACPI_DISABLE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct device_operations device_ops = {
|
static struct device_operations device_ops = {
|
||||||
.read_resources = pch_pmc_read_resources,
|
.read_resources = pch_pmc_read_resources,
|
||||||
.set_resources = pci_dev_set_resources,
|
.set_resources = pci_dev_set_resources,
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
#include <bootmode.h>
|
#include <bootmode.h>
|
||||||
#include <device/mmio.h>
|
#include <device/mmio.h>
|
||||||
#include <cbmem.h>
|
#include <cbmem.h>
|
||||||
|
#include <cpu/x86/smm.h>
|
||||||
#include <console/console.h>
|
#include <console/console.h>
|
||||||
#include <halt.h>
|
#include <halt.h>
|
||||||
#include <intelblocks/pmclib.h>
|
#include <intelblocks/pmclib.h>
|
||||||
|
@ -709,3 +710,10 @@ void pmc_disable_acpi_timer(void)
|
||||||
setbits8(pmcbase + PCH_PWRM_ACPI_TMR_CTL, ACPI_TIM_DIS);
|
setbits8(pmcbase + PCH_PWRM_ACPI_TMR_CTL, ACPI_TIM_DIS);
|
||||||
}
|
}
|
||||||
#endif /* PMC_LOW_POWER_MODE_PROGRAM */
|
#endif /* PMC_LOW_POWER_MODE_PROGRAM */
|
||||||
|
|
||||||
|
void pmc_set_acpi_mode(void)
|
||||||
|
{
|
||||||
|
if (!acpi_is_wakeup_s3()) {
|
||||||
|
apm_control(APM_CNT_ACPI_DISABLE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue