summaryrefslogtreecommitdiff
path: root/src/soc/intel/skylake/pmutil.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/intel/skylake/pmutil.c')
-rw-r--r--src/soc/intel/skylake/pmutil.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/soc/intel/skylake/pmutil.c b/src/soc/intel/skylake/pmutil.c
index fe26ebfe37..ded44dc85c 100644
--- a/src/soc/intel/skylake/pmutil.c
+++ b/src/soc/intel/skylake/pmutil.c
@@ -265,3 +265,18 @@ void pmc_soc_set_afterg3_en(const bool on)
reg8 |= SLEEP_AFTER_POWER_FAIL;
pci_write_config8(dev, GEN_PMCON_B, reg8);
}
+
+void pmc_clear_pmcon_sts(void)
+{
+ uint32_t reg_val;
+ const pci_devfn_t dev = PCH_DEV_PMC;
+
+ reg_val = pci_read_config32(dev, GEN_PMCON_A);
+ /*
+ * Clear SUS_PWR_FLR, GBL_RST_STS, HOST_RST_STS, PWR_FLR bits
+ * while retaining MS4V write-1-to-clear bit
+ */
+ reg_val &= ~(MS4V);
+
+ pci_write_config32(dev, GEN_PMCON_A, reg_val);
+}