summaryrefslogtreecommitdiff
path: root/src/soc/intel/skylake/finalize.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/intel/skylake/finalize.c')
-rw-r--r--src/soc/intel/skylake/finalize.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/soc/intel/skylake/finalize.c b/src/soc/intel/skylake/finalize.c
index 13df7ccdaf..5eef66dbbb 100644
--- a/src/soc/intel/skylake/finalize.c
+++ b/src/soc/intel/skylake/finalize.c
@@ -38,6 +38,7 @@
#define PCH_P2SB_EPMASK(mask_number) PCH_P2SB_EPMASK0 + (mask_number * 4)
#define PCH_P2SB_E0 0xE0
+#define PCH_PWRM_ACPI_TMR_CTL 0xFC
static void pch_configure_endpoints(device_t dev, int epmask_id, uint32_t mask)
{
@@ -92,6 +93,7 @@ static void pch_finalize_script(void)
uint8_t *pmcbase;
config_t *config;
u32 pmsyncreg;
+ u8 reg8;
/* Set SPI opcode menu */
write16(spibar + SPIBAR_PREOP, SPI_OPPREFIX);
@@ -126,6 +128,21 @@ static void pch_finalize_script(void)
/* we should disable Heci1 based on the devicetree policy */
config = dev->chip_info;
+
+ /*
+ * 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->PmTimerDisabled) {
+ reg8 = read8(pmcbase + PCH_PWRM_ACPI_TMR_CTL);
+ reg8 |= (1 << 1);
+ write8(pmcbase + PCH_PWRM_ACPI_TMR_CTL, reg8);
+ }
+
+ /* we should disable Heci1 based on the devicetree policy */
if (config->HeciEnabled == 0)
pch_disable_heci();
}