soc/intel/common: Clean up PMC library GPE handling API
1. Update gpe handling function names to explicitly mention if they
are operating on:
a. STD GPE events
b. GPIO GPE events
c. Both
2. Update comment block in pmclib.h to use generic names for STD and
GPIO GPE registers instead of using any one platform specific names.
BUG=b:67712608
Change-Id: I03349fe85ac31d4215418b884afd8c4b531e68d3
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://review.coreboot.org/21968
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/src/soc/intel/skylake/pmutil.c b/src/soc/intel/skylake/pmutil.c
index 9dd22e9..4cb4a20 100644
--- a/src/soc/intel/skylake/pmutil.c
+++ b/src/soc/intel/skylake/pmutil.c
@@ -107,7 +107,7 @@
* GPE0
*/
-const char *const *soc_gpe_sts_array(size_t *gpe_arr)
+const char *const *soc_std_gpe_sts_array(size_t *gpe_arr)
{
static const char *const gpe_sts_bits[] = {
[1] = "HOTPLUG",
@@ -208,7 +208,7 @@
return (uintptr_t) (pmc_mmio_regs());
}
-void soc_get_gpe_configs(uint8_t *dw0, uint8_t *dw1, uint8_t *dw2)
+void soc_get_gpi_gpe_configs(uint8_t *dw0, uint8_t *dw1, uint8_t *dw2)
{
DEVTREE_CONST struct soc_intel_skylake_config *config;
diff --git a/src/soc/intel/skylake/smi.c b/src/soc/intel/skylake/smi.c
index 23b8ce8..f11a9d8 100644
--- a/src/soc/intel/skylake/smi.c
+++ b/src/soc/intel/skylake/smi.c
@@ -49,7 +49,7 @@
pmc_clear_smi_status();
pmc_clear_pm1_status();
pmc_clear_tco_status();
- pmc_clear_gpe_status();
+ pmc_clear_all_gpe_status();
}
void southbridge_smm_enable_smi(void)
@@ -57,7 +57,7 @@
printk(BIOS_DEBUG, "Enabling SMIs.\n");
/* Configure events */
pmc_enable_pm1(GBL_EN);
- pmc_disable_gpe(PME_B0_EN);
+ pmc_disable_std_gpe(PME_B0_EN);
/*
* Enable SMI generation:
diff --git a/src/soc/intel/skylake/smihandler.c b/src/soc/intel/skylake/smihandler.c
index dc4237a..daf8e0e 100644
--- a/src/soc/intel/skylake/smihandler.c
+++ b/src/soc/intel/skylake/smihandler.c
@@ -153,7 +153,7 @@
elog_add_event_byte(ELOG_TYPE_ACPI_ENTER, slp_typ);
/* Clear pending GPE events */
- pmc_clear_gpe_status();
+ pmc_clear_all_gpe_status();
/* Next, do the deed. */
switch (slp_typ) {
@@ -360,7 +360,7 @@
static void southbridge_smi_gpe0(void)
{
- pmc_clear_gpe_status();
+ pmc_clear_all_gpe_status();
}
void __attribute__((weak))