diff options
author | Subrata Banik <subrata.banik@intel.com> | 2020-09-28 18:43:47 +0530 |
---|---|---|
committer | Subrata Banik <subrata.banik@intel.com> | 2020-10-03 06:58:07 +0000 |
commit | 0359d9dde37b7cce3009cfe630713042601ac5d8 (patch) | |
tree | d4d177be70a8db07b58159cbda768d12059f2222 /src/soc/intel/tigerlake/finalize.c | |
parent | 3e959d8e2a05a50ca16430dcacfd4794db1e49fc (diff) | |
download | coreboot-0359d9dde37b7cce3009cfe630713042601ac5d8.tar.xz |
soc/intel: Make use of PMC low power program from common block
List of changes:
1. Select PMC_LOW_POWER_MODE_PROGRAM from applicable SoC directory
2. Remove redundant PMC programming from SoC and refer to common
code block
3. Remove unused 'reg8' and 'reg32' variable as applicable from SoC
function.
Change-Id: I18894c49cfc6e88675b5fb71bca0412e5639fb4b
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45796
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel/tigerlake/finalize.c')
-rw-r--r-- | src/soc/intel/tigerlake/finalize.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/src/soc/intel/tigerlake/finalize.c b/src/soc/intel/tigerlake/finalize.c index 5bf01de7f0..2cc9671c30 100644 --- a/src/soc/intel/tigerlake/finalize.c +++ b/src/soc/intel/tigerlake/finalize.c @@ -15,6 +15,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 <spi-generic.h> @@ -28,10 +29,7 @@ static void pch_finalize(void) { - uint32_t reg32; - uint8_t *pmcbase; config_t *config; - uint8_t reg8; /* TCO Lock down */ tco_lockdown(); @@ -50,19 +48,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(); } |