aboutsummaryrefslogtreecommitdiff
path: root/src/mainboard/google/guybrush/ec.c
diff options
context:
space:
mode:
authorMathew King <mathewk@chromium.org>2021-02-23 13:08:15 -0700
committerFelix Held <felix-coreboot@felixheld.de>2021-03-10 00:35:06 +0000
commitad830234251146d7538d4851f5a6b6eed3b40b37 (patch)
tree3b584fdfde10be339eabf1db73e4534c51e25db4 /src/mainboard/google/guybrush/ec.c
parent15c4345cfdcf9c07aabd6cbaba5a1e2d89caff96 (diff)
mb/google/guybrush: Enable Chrome EC
BUG=b:180507937 TEST=builds Signed-off-by: Mathew King <mathewk@chromium.org> Change-Id: I3cdd6422b1bc53ea934346327359cbc6d86baeeb Reviewed-on: https://review.coreboot.org/c/coreboot/+/51043 Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com> Reviewed-by: Raul Rangel <rrangel@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/google/guybrush/ec.c')
-rw-r--r--src/mainboard/google/guybrush/ec.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/mainboard/google/guybrush/ec.c b/src/mainboard/google/guybrush/ec.c
new file mode 100644
index 0000000000..1794acfe21
--- /dev/null
+++ b/src/mainboard/google/guybrush/ec.c
@@ -0,0 +1,20 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#include <acpi/acpi.h>
+#include <amdblocks/gpio_banks.h>
+#include <amdblocks/smi.h>
+#include <ec/google/chromeec/ec.h>
+#include <variant/ec.h>
+
+void mainboard_ec_init(void)
+{
+ 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,
+ .s5_wake_events = MAINBOARD_EC_S5_WAKE_EVENTS,
+ .s0ix_wake_events = MAINBOARD_EC_S0IX_WAKE_EVENTS,
+ };
+
+ google_chromeec_events_init(&info, acpi_is_wakeup_s3());
+}