elog: rename ELOG_WAKE_SOURCE_GPIO to ELOG_WAKE_SOURCE_GPE

The wake source macro for GPE events was using 'GPIO'. However,
current usage is really all GPEs. Therefore, provide clarity
in the naming in order to allow for proper GPIO wake events
that are separate from the ACPI GPE block.

BUG=b:159947207

Change-Id: I27d0ab439c58b1658ed39158eddb1213c24d328f
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44527
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
This commit is contained in:
Aaron Durbin 2020-08-17 09:37:13 -06:00
parent 819d676fed
commit aa902036d0
13 changed files with 16 additions and 16 deletions

View File

@ -79,7 +79,7 @@
#define ELOG_WAKE_SOURCE_PME 0x01 #define ELOG_WAKE_SOURCE_PME 0x01
#define ELOG_WAKE_SOURCE_PME_INTERNAL 0x02 #define ELOG_WAKE_SOURCE_PME_INTERNAL 0x02
#define ELOG_WAKE_SOURCE_RTC 0x03 #define ELOG_WAKE_SOURCE_RTC 0x03
#define ELOG_WAKE_SOURCE_GPIO 0x04 #define ELOG_WAKE_SOURCE_GPE 0x04
#define ELOG_WAKE_SOURCE_SMBUS 0x05 #define ELOG_WAKE_SOURCE_SMBUS 0x05
#define ELOG_WAKE_SOURCE_PWRBTN 0x06 #define ELOG_WAKE_SOURCE_PWRBTN 0x06
#define ELOG_WAKE_SOURCE_PME_HDA 0x07 #define ELOG_WAKE_SOURCE_PME_HDA 0x07

View File

@ -90,7 +90,7 @@ static void log_gpe_events(const struct acpi_pm_gpe_state *state)
for (i = 0; i <= 31; i++) { for (i = 0; i <= 31; i++) {
if (valid_gpe & (1U << i)) if (valid_gpe & (1U << i))
elog_add_event_wake(ELOG_WAKE_SOURCE_GPIO, i); elog_add_event_wake(ELOG_WAKE_SOURCE_GPE, i);
} }
} }

View File

@ -18,7 +18,7 @@ static void pch_log_gpio_gpe(u32 gpe0_sts, u32 gpe0_en, int start)
for (i = 0; i <= 31; i++) { for (i = 0; i <= 31; i++) {
if (gpe0_sts & (1 << i)) if (gpe0_sts & (1 << i))
elog_add_event_wake(ELOG_WAKE_SOURCE_GPIO, i + start); elog_add_event_wake(ELOG_WAKE_SOURCE_GPE, i + start);
} }
} }

View File

@ -68,7 +68,7 @@ static void log_wake_events(const struct chipset_power_state *ps)
i = 0; i = 0;
while (gpio_mask) { while (gpio_mask) {
if (gpio_mask & gpe0_sts) if (gpio_mask & gpe0_sts)
elog_add_event_wake(ELOG_WAKE_SOURCE_GPIO, i); elog_add_event_wake(ELOG_WAKE_SOURCE_GPE, i);
gpio_mask <<= 1; gpio_mask <<= 1;
i++; i++;
} }

View File

@ -68,7 +68,7 @@ static void log_wake_events(const struct chipset_power_state *ps)
i = 0; i = 0;
while (gpio_mask) { while (gpio_mask) {
if (gpio_mask & gpe0_sts) if (gpio_mask & gpe0_sts)
elog_add_event_wake(ELOG_WAKE_SOURCE_GPIO, i); elog_add_event_wake(ELOG_WAKE_SOURCE_GPE, i);
gpio_mask <<= 1; gpio_mask <<= 1;
i++; i++;
} }

View File

@ -16,7 +16,7 @@ static void pch_log_gpio_gpe(u32 gpe0_sts, u32 gpe0_en, int start)
for (i = 0; i <= 31; i++) { for (i = 0; i <= 31; i++) {
if (gpe0_sts & (1 << i)) if (gpe0_sts & (1 << i))
elog_add_event_wake(ELOG_WAKE_SOURCE_GPIO, i + start); elog_add_event_wake(ELOG_WAKE_SOURCE_GPE, i + start);
} }
} }
@ -48,7 +48,7 @@ static void pch_log_wake_source(struct chipset_power_state *ps)
/* GPIO27 */ /* GPIO27 */
if (ps->gpe0_sts[GPE_STD] & GP27_STS) if (ps->gpe0_sts[GPE_STD] & GP27_STS)
elog_add_event_wake(ELOG_WAKE_SOURCE_GPIO, 27); elog_add_event_wake(ELOG_WAKE_SOURCE_GPE, 27);
/* Log GPIO events in set 1-3 */ /* Log GPIO events in set 1-3 */
pch_log_gpio_gpe(ps->gpe0_sts[GPE_31_0], ps->gpe0_en[GPE_31_0], 0); pch_log_gpio_gpe(ps->gpe0_sts[GPE_31_0], ps->gpe0_en[GPE_31_0], 0);

View File

@ -97,7 +97,7 @@ static void pch_log_gpio_gpe(u32 gpe0_sts, u32 gpe0_en, int start)
for (i = 0; i <= 31; i++) { for (i = 0; i <= 31; i++) {
if (gpe0_sts & (1 << i)) if (gpe0_sts & (1 << i))
elog_add_event_wake(ELOG_WAKE_SOURCE_GPIO, i + start); elog_add_event_wake(ELOG_WAKE_SOURCE_GPE, i + start);
} }
} }

View File

@ -16,7 +16,7 @@ static void pch_log_gpio_gpe(u32 gpe0_sts, u32 gpe0_en, int start)
for (i = 0; i <= 31; i++) { for (i = 0; i <= 31; i++) {
if (gpe0_sts & (1 << i)) if (gpe0_sts & (1 << i))
elog_add_event_wake(ELOG_WAKE_SOURCE_GPIO, i + start); elog_add_event_wake(ELOG_WAKE_SOURCE_GPE, i + start);
} }
} }

View File

@ -16,7 +16,7 @@ static void pch_log_gpio_gpe(u32 gpe0_sts, u32 gpe0_en, int start)
for (i = 0; i <= 31; i++) { for (i = 0; i <= 31; i++) {
if (gpe0_sts & (1 << i)) if (gpe0_sts & (1 << i))
elog_add_event_wake(ELOG_WAKE_SOURCE_GPIO, i + start); elog_add_event_wake(ELOG_WAKE_SOURCE_GPE, i + start);
} }
} }

View File

@ -22,7 +22,7 @@ static void pch_log_gpio_gpe(u32 gpe0_sts, u32 gpe0_en, int start)
for (i = 0; i <= 31; i++) { for (i = 0; i <= 31; i++) {
if (gpe0_sts & (1 << i)) if (gpe0_sts & (1 << i))
elog_add_event_wake(ELOG_WAKE_SOURCE_GPIO, i + start); elog_add_event_wake(ELOG_WAKE_SOURCE_GPE, i + start);
} }
} }

View File

@ -16,7 +16,7 @@ static void pch_log_gpio_gpe(u32 gpe0_sts, u32 gpe0_en, int start)
for (i = 0; i <= 31; i++) { for (i = 0; i <= 31; i++) {
if (gpe0_sts & (1 << i)) if (gpe0_sts & (1 << i))
elog_add_event_wake(ELOG_WAKE_SOURCE_GPIO, i + start); elog_add_event_wake(ELOG_WAKE_SOURCE_GPE, i + start);
} }
} }

View File

@ -87,7 +87,7 @@ void pch_log_state(void)
/* GPIO 0-15 */ /* GPIO 0-15 */
for (i = 0; i < 16; i++) { for (i = 0; i < 16; i++) {
if ((gpe0_sts & (1 << (16+i))) && (gpe0_en & (1 << (16+i)))) if ((gpe0_sts & (1 << (16+i))) && (gpe0_en & (1 << (16+i))))
elog_add_event_wake(ELOG_WAKE_SOURCE_GPIO, i); elog_add_event_wake(ELOG_WAKE_SOURCE_GPE, i);
} }
/* SMBUS Wake */ /* SMBUS Wake */

View File

@ -36,7 +36,7 @@ static void pch_log_gpio_gpe(u32 gpe0_sts_reg, u32 gpe0_en_reg, int start)
for (i = 0; i <= 31; i++) { for (i = 0; i <= 31; i++) {
if (gpe0_sts & (1 << i)) if (gpe0_sts & (1 << i))
elog_add_event_wake(ELOG_WAKE_SOURCE_GPIO, i + start); elog_add_event_wake(ELOG_WAKE_SOURCE_GPE, i + start);
} }
} }
@ -64,7 +64,7 @@ static void pch_log_gpe(void)
gpe0_sts = inw(pmbase + GPE0_STS + 2) & gpe0_en; gpe0_sts = inw(pmbase + GPE0_STS + 2) & gpe0_en;
for (i = 0; i <= 15; i++) { for (i = 0; i <= 15; i++) {
if (gpe0_sts & (1 << i)) if (gpe0_sts & (1 << i))
elog_add_event_wake(ELOG_WAKE_SOURCE_GPIO, i); elog_add_event_wake(ELOG_WAKE_SOURCE_GPE, i);
} }
/* /*
@ -78,7 +78,7 @@ static void pch_log_gpe(void)
if (!gpe0_high_gpios[i]) if (!gpe0_high_gpios[i])
continue; continue;
if (gpe0_sts & (1 << i)) if (gpe0_sts & (1 << i))
elog_add_event_wake(ELOG_WAKE_SOURCE_GPIO, elog_add_event_wake(ELOG_WAKE_SOURCE_GPE,
gpe0_high_gpios[i]); gpe0_high_gpios[i]);
} }
} }