[coreboot-gerrit] Change in coreboot[master]: mb/google/poppy: Allow variants to provide event info at runtime

Furquan Shaikh (Code Review) gerrit at coreboot.org
Wed Oct 10 08:57:58 CEST 2018


Furquan Shaikh has uploaded this change for review. ( https://review.coreboot.org/28983


Change subject: mb/google/poppy: Allow variants to provide event info at runtime
......................................................................

mb/google/poppy: Allow variants to provide event info at runtime

This change adds a variant callback to read google_chromeec_event_info
from variant at runtime to allow override of any events based on
factors like board id.

BUG=b:112366846,b:112112483,b:112111610

Change-Id: If89e904c92372530a0f555952f87702f068e0b03
Signed-off-by: Furquan Shaikh <furquan at google.com>
---
M src/mainboard/google/poppy/ec.c
M src/mainboard/google/poppy/variants/baseboard/include/baseboard/variants.h
2 files changed, 11 insertions(+), 3 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/83/28983/1

diff --git a/src/mainboard/google/poppy/ec.c b/src/mainboard/google/poppy/ec.c
index 7b9b9a7..540a7ae 100644
--- a/src/mainboard/google/poppy/ec.c
+++ b/src/mainboard/google/poppy/ec.c
@@ -14,13 +14,14 @@
  */
 
 #include <arch/acpi.h>
+#include <baseboard/variants.h>
 #include <ec/google/chromeec/ec.h>
 
 #include <variant/ec.h>
 
-void mainboard_ec_init(void)
+__weak const struct google_chromeec_event_info *variant_get_event_info(void)
 {
-	const struct google_chromeec_event_info info = {
+	static const struct google_chromeec_event_info info = {
 		.log_events = MAINBOARD_EC_LOG_EVENTS,
 		.sci_events = MAINBOARD_EC_SCI_EVENTS,
 		.s3_wake_events = MAINBOARD_EC_S3_WAKE_EVENTS,
@@ -28,6 +29,10 @@
 		.s0ix_wake_events = MAINBOARD_EC_S0IX_WAKE_EVENTS,
 	};
 
-	google_chromeec_events_init(&info, acpi_is_wakeup_s3());
+	return &info;
+}
 
+void mainboard_ec_init(void)
+{
+	google_chromeec_events_init(variant_get_event_info(), acpi_is_wakeup_s3());
 }
diff --git a/src/mainboard/google/poppy/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/poppy/variants/baseboard/include/baseboard/variants.h
index 3c58971..fff7c65 100644
--- a/src/mainboard/google/poppy/variants/baseboard/include/baseboard/variants.h
+++ b/src/mainboard/google/poppy/variants/baseboard/include/baseboard/variants.h
@@ -73,4 +73,7 @@
 void variant_nhlt_oem_overrides(const char **oem_id, const char **oem_table_id,
 				uint32_t *oem_revision);
 
+
+const struct google_chromeec_event_info *variant_get_event_info(void);
+
 #endif /* __BASEBOARD_VARIANTS_H__ */

-- 
To view, visit https://review.coreboot.org/28983
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: If89e904c92372530a0f555952f87702f068e0b03
Gerrit-Change-Number: 28983
Gerrit-PatchSet: 1
Gerrit-Owner: Furquan Shaikh <furquan at google.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20181010/92caba3f/attachment-0001.html>


More information about the coreboot-gerrit mailing list