summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/soc/intel/apollolake/include/soc/pm.h1
-rw-r--r--src/soc/intel/apollolake/pmutil.c10
2 files changed, 11 insertions, 0 deletions
diff --git a/src/soc/intel/apollolake/include/soc/pm.h b/src/soc/intel/apollolake/include/soc/pm.h
index 5641e54c50..7eb593002e 100644
--- a/src/soc/intel/apollolake/include/soc/pm.h
+++ b/src/soc/intel/apollolake/include/soc/pm.h
@@ -173,6 +173,7 @@ uint16_t clear_pm1_status(void);
uint32_t clear_tco_status(void);
uint32_t clear_gpe_status(void);
void clear_pmc_status(void);
+void clear_gpi_gpe_sts(void);
uint32_t get_smi_en(void);
void enable_smi(uint32_t mask);
void disable_smi(uint32_t mask);
diff --git a/src/soc/intel/apollolake/pmutil.c b/src/soc/intel/apollolake/pmutil.c
index aaa4018683..39edc45886 100644
--- a/src/soc/intel/apollolake/pmutil.c
+++ b/src/soc/intel/apollolake/pmutil.c
@@ -246,6 +246,16 @@ void disable_all_gpe(void)
disable_gpe(~0);
}
+/* Clear the gpio gpe0 status bits in ACPI registers */
+void clear_gpi_gpe_sts(void)
+{
+ int i;
+
+ for (i = 1; i < GPE0_REG_MAX; i++) {
+ uint32_t gpe_sts = inl(ACPI_PMIO_BASE + GPE0_STS(i));
+ outl(gpe_sts, ACPI_PMIO_BASE + GPE0_STS(i));
+ }
+}
static uint32_t reset_gpe_status(void)
{