diff options
Diffstat (limited to 'src/soc')
-rw-r--r-- | src/soc/intel/apollolake/Makefile.inc | 1 | ||||
-rw-r--r-- | src/soc/intel/apollolake/elog.c | 14 |
2 files changed, 13 insertions, 2 deletions
diff --git a/src/soc/intel/apollolake/Makefile.inc b/src/soc/intel/apollolake/Makefile.inc index 9b09b09f44..cb66365ed6 100644 --- a/src/soc/intel/apollolake/Makefile.inc +++ b/src/soc/intel/apollolake/Makefile.inc @@ -43,6 +43,7 @@ smm-y += pmutil.c smm-y += smihandler.c smm-y += spi.c smm-$(CONFIG_SOC_UART_DEBUG) += uart.c +smm-y += elog.c ramstage-$(CONFIG_HAVE_ACPI_TABLES) += acpi.c ramstage-y += cpu.c diff --git a/src/soc/intel/apollolake/elog.c b/src/soc/intel/apollolake/elog.c index 1e9b7d8329..361b041f5c 100644 --- a/src/soc/intel/apollolake/elog.c +++ b/src/soc/intel/apollolake/elog.c @@ -18,6 +18,7 @@ #include <cbmem.h> #include <console/console.h> #include <elog.h> +#include <intelblocks/pmclib.h> #include <soc/pm.h> #include <soc/pci_devs.h> #include <stdint.h> @@ -56,8 +57,9 @@ static void pch_log_wake_source(struct chipset_power_state *ps) if (ps->gpe0_sts[GPE0_A] & SMB_WAK_STS) elog_add_event_wake(ELOG_WAKE_SOURCE_SMBUS, 0); - /* ACPI Wake Event - Always Log prev_sleep_state*/ - elog_add_event_byte(ELOG_TYPE_ACPI_WAKE, ps->prev_sleep_state); + /* ACPI Wake Event - Log prev sleep state only if it was not S0. */ + if (ps->prev_sleep_state != ACPI_S0) + elog_add_event_byte(ELOG_TYPE_ACPI_WAKE, ps->prev_sleep_state); /* Log GPIO events in set A-D */ pch_log_gpio_gpe(ps->gpe0_sts[GPE0_A], ps->gpe0_en[GPE0_A], 0); @@ -105,3 +107,11 @@ void pch_log_state(void) if (ps->prev_sleep_state > ACPI_S0) pch_log_wake_source(ps); } + +void elog_gsmi_cb_platform_log_wake_source(void) +{ + struct chipset_power_state ps; + + pmc_fill_pm_reg_info(&ps); + pch_log_wake_source(&ps); +} |