Kyösti Mälkki has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36649 )
Change subject: [WIP] ELOG build errors ......................................................................
[WIP] ELOG build errors
Change-Id: Idf7b04edc3fce147f7857691ce7d6a0ce03f43fe Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- M src/mainboard/google/parrot/smihandler.c M src/mainboard/google/stout/ec.c 2 files changed, 8 insertions(+), 26 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/49/36649/1
diff --git a/src/mainboard/google/parrot/smihandler.c b/src/mainboard/google/parrot/smihandler.c index 92d361d..bc8dd98 100644 --- a/src/mainboard/google/parrot/smihandler.c +++ b/src/mainboard/google/parrot/smihandler.c @@ -29,9 +29,7 @@ static u8 mainboard_smi_ec(void) { u8 src; -#if CONFIG(ELOG_GSMI) static int battery_critical_logged; -#endif
ec_kbc_write_cmd(0x56); src = ec_kbc_read_ob(); @@ -39,20 +37,15 @@
switch (src) { case EC_BATTERY_CRITICAL: -#if CONFIG(ELOG_GSMI) if (!battery_critical_logged) - elog_add_event_byte(ELOG_TYPE_EC_EVENT, - EC_HOST_EVENT_BATTERY_CRITICAL); + elog_gsmi_add_event_byte(ELOG_TYPE_EC_EVENT, + EC_HOST_EVENT_BATTERY_CRITICAL); battery_critical_logged = 1; -#endif break; case EC_LID_CLOSE: printk(BIOS_DEBUG, "LID CLOSED, SHUTDOWN\n"); - -#if CONFIG(ELOG_GSMI) - elog_add_event_byte(ELOG_TYPE_EC_EVENT, + elog_gsmi_add_event_byte(ELOG_TYPE_EC_EVENT, EC_HOST_EVENT_LID_CLOSED); -#endif /* Go to S5 */ write_pmbase32(PM1_CNT, read_pmbase32(PM1_CNT) | (0xf << 10)); break; @@ -70,11 +63,8 @@ } else if (gpi_sts & (1 << EC_LID_GPI)) { printk(BIOS_DEBUG, "LID CLOSED, SHUTDOWN\n"); - -#if CONFIG(ELOG_GSMI) - elog_add_event_byte(ELOG_TYPE_EC_EVENT, + elog_gsmi_add_event_byte(ELOG_TYPE_EC_EVENT, EC_HOST_EVENT_LID_CLOSED); -#endif /* Go to S5 */ write_pmbase32(PM1_CNT, read_pmbase32(PM1_CNT) | (0xf << 10)); } diff --git a/src/mainboard/google/stout/ec.c b/src/mainboard/google/stout/ec.c index 3569cae..95bc1ca 100644 --- a/src/mainboard/google/stout/ec.c +++ b/src/mainboard/google/stout/ec.c @@ -69,10 +69,8 @@ if (ec_reg & 0x8) { printk(BIOS_ERR, " EC Fan Error\n"); critical_shutdown = 1; -#if CONFIG(ELOG_GSMI) - elog_add_event_word(EC_HOST_EVENT_BATTERY_CRITICAL, + elog_gsmi_add_event_word(EC_HOST_EVENT_BATTERY_CRITICAL, EC_HOST_EVENT_THROTTLE_START); -#endif }
@@ -80,10 +78,8 @@ if (ec_reg & 0x80) { printk(BIOS_ERR, " EC Thermal Device Error\n"); critical_shutdown = 1; -#if CONFIG(ELOG_GSMI) - elog_add_event_word(EC_HOST_EVENT_BATTERY_CRITICAL, + elog_gsmi_add_event_word(EC_HOST_EVENT_BATTERY_CRITICAL, EC_HOST_EVENT_THERMAL); -#endif }
@@ -93,17 +89,13 @@ if ((ec_reg & 0xCF) == 0xC0) { printk(BIOS_ERR, " EC Critical Battery Error\n"); critical_shutdown = 1; -#if CONFIG(ELOG_GSMI) - elog_add_event_word(ELOG_TYPE_EC_EVENT, + elog_gsmi_add_event_word(ELOG_TYPE_EC_EVENT, EC_HOST_EVENT_BATTERY_CRITICAL); -#endif }
if ((ec_reg & 0x8F) == 0x8F) { printk(BIOS_ERR, " EC Read Battery Error\n"); -#if CONFIG(ELOG_GSMI) - elog_add_event_word(ELOG_TYPE_EC_EVENT, EC_HOST_EVENT_BATTERY); -#endif + elog_gsmi_add_event_word(ELOG_TYPE_EC_EVENT, EC_HOST_EVENT_BATTERY); }
Kyösti Mälkki has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36649 )
Change subject: [WIP] ELOG build errors ......................................................................
Patch Set 1:
EC_HOST_EVENTS are only defined with chromeec, should I remove these add_event calls completely?
Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36649 )
Change subject: [WIP] ELOG build errors ......................................................................
Patch Set 1:
Patch Set 1:
EC_HOST_EVENTS are only defined with chromeec, should I remove these add_event calls completely?
But these mainboards are using chromeec, no? If not, then yes you can remove. I also thought Arthur had some change related to this about where those #defines resided.
Kyösti Mälkki has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36649 )
Change subject: [WIP] ELOG build errors ......................................................................
Patch Set 1:
Patch Set 1:
Patch Set 1:
EC_HOST_EVENTS are only defined with chromeec, should I remove these add_event calls completely?
But these mainboards are using chromeec, no? If not, then yes you can remove. I also thought Arthur had some change related to this about where those #defines resided.
<ec/quanta/it8518.h> <ec/compal/ene932.h>
Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36649 )
Change subject: [WIP] ELOG build errors ......................................................................
Patch Set 1:
Patch Set 1:
Patch Set 1:
Patch Set 1:
EC_HOST_EVENTS are only defined with chromeec, should I remove these add_event calls completely?
But these mainboards are using chromeec, no? If not, then yes you can remove. I also thought Arthur had some change related to this about where those #defines resided.
<ec/quanta/it8518.h> <ec/compal/ene932.h>
Got it. Ok. nuke them then.
Hello Aaron Durbin, Arthur Heymans, build bot (Jenkins), Furquan Shaikh,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36649
to look at the new patch set (#2).
Change subject: google/parrot: Remove ELOG_GSMI from EC ......................................................................
google/parrot: Remove ELOG_GSMI from EC
EC_HOST_EVENT_xxx are only defined with ec/chromeec.
Change-Id: Idf7b04edc3fce147f7857691ce7d6a0ce03f43fe Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- M src/mainboard/google/parrot/smihandler.c 1 file changed, 0 insertions(+), 17 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/49/36649/2
Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36649 )
Change subject: google/parrot: Remove ELOG_GSMI from EC ......................................................................
Patch Set 2: Code-Review+2
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/36649 )
Change subject: google/parrot: Remove ELOG_GSMI from EC ......................................................................
google/parrot: Remove ELOG_GSMI from EC
EC_HOST_EVENT_xxx are only defined with ec/chromeec.
Change-Id: Idf7b04edc3fce147f7857691ce7d6a0ce03f43fe Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/36649 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Aaron Durbin adurbin@chromium.org --- M src/mainboard/google/parrot/smihandler.c 1 file changed, 0 insertions(+), 17 deletions(-)
Approvals: build bot (Jenkins): Verified Aaron Durbin: Looks good to me, approved
diff --git a/src/mainboard/google/parrot/smihandler.c b/src/mainboard/google/parrot/smihandler.c index 92d361d..c0a5d01 100644 --- a/src/mainboard/google/parrot/smihandler.c +++ b/src/mainboard/google/parrot/smihandler.c @@ -29,9 +29,6 @@ static u8 mainboard_smi_ec(void) { u8 src; -#if CONFIG(ELOG_GSMI) - static int battery_critical_logged; -#endif
ec_kbc_write_cmd(0x56); src = ec_kbc_read_ob(); @@ -39,20 +36,10 @@
switch (src) { case EC_BATTERY_CRITICAL: -#if CONFIG(ELOG_GSMI) - if (!battery_critical_logged) - elog_add_event_byte(ELOG_TYPE_EC_EVENT, - EC_HOST_EVENT_BATTERY_CRITICAL); - battery_critical_logged = 1; -#endif break; case EC_LID_CLOSE: printk(BIOS_DEBUG, "LID CLOSED, SHUTDOWN\n");
-#if CONFIG(ELOG_GSMI) - elog_add_event_byte(ELOG_TYPE_EC_EVENT, - EC_HOST_EVENT_LID_CLOSED); -#endif /* Go to S5 */ write_pmbase32(PM1_CNT, read_pmbase32(PM1_CNT) | (0xf << 10)); break; @@ -71,10 +58,6 @@ else if (gpi_sts & (1 << EC_LID_GPI)) { printk(BIOS_DEBUG, "LID CLOSED, SHUTDOWN\n");
-#if CONFIG(ELOG_GSMI) - elog_add_event_byte(ELOG_TYPE_EC_EVENT, - EC_HOST_EVENT_LID_CLOSED); -#endif /* Go to S5 */ write_pmbase32(PM1_CNT, read_pmbase32(PM1_CNT) | (0xf << 10)); }