summaryrefslogtreecommitdiff
path: root/src/soc/intel/elkhartlake/finalize.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/intel/elkhartlake/finalize.c')
-rw-r--r--src/soc/intel/elkhartlake/finalize.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/src/soc/intel/elkhartlake/finalize.c b/src/soc/intel/elkhartlake/finalize.c
index e9b3f21683..bae8bcf5a8 100644
--- a/src/soc/intel/elkhartlake/finalize.c
+++ b/src/soc/intel/elkhartlake/finalize.c
@@ -9,6 +9,7 @@
#include <device/pci.h>
#include <intelblocks/lpc_lib.h>
#include <intelblocks/pcr.h>
+#include <intelblocks/pmclib.h>
#include <intelblocks/tco.h>
#include <intelblocks/thermal.h>
#include <soc/p2sb.h>
@@ -22,10 +23,7 @@
static void pch_finalize(void)
{
- uint32_t reg32;
- uint8_t *pmcbase;
config_t *config;
- uint8_t reg8;
/* TCO Lock down */
tco_lockdown();
@@ -44,19 +42,12 @@ static void pch_finalize(void)
* returns NULL for PCH_DEV_PMC device.
*/
config = config_of_soc();
- pmcbase = pmc_mmio_regs();
- if (config->PmTimerDisabled) {
- reg8 = read8(pmcbase + PCH_PWRM_ACPI_TMR_CTL);
- reg8 |= (1 << 1);
- write8(pmcbase + PCH_PWRM_ACPI_TMR_CTL, reg8);
- }
+ if (config->PmTimerDisabled)
+ pmc_disable_acpi_timer();
/* Disable XTAL shutdown qualification for low power idle. */
- if (config->s0ix_enable) {
- reg32 = read32(pmcbase + CPPMVRIC);
- reg32 |= XTALSDQDIS;
- write32(pmcbase + CPPMVRIC, reg32);
- }
+ if (config->s0ix_enable)
+ pmc_ignore_xtal_shutdown();
pmc_clear_pmcon_sts();
}