From 8788fd63952b50e4692efbf75a21bf0608e4c01c Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Mon, 20 Nov 2017 20:28:18 -0800 Subject: chromeec: Change the API for hostevent/wake masks to handle 64-bit ChromeEC is getting ready to bump up the hostevents and wake masks to 64-bits. The current commands to program hostevents/wake masks will still operate on 32-bits only. A new EC host command will be added to handle 64-bit hostevents/wake masks. In order to prevent individual callers in coreboot from worrying about 32-bit/64-bit, the same API provided by google/chromeec will be updated to accept 64-bit parameters and return 64-bit values. Internally, host command handlers will take care of masking these parameters/return values to appropriate 32-bit/64-bit values. BUG=b:69329196 Change-Id: If59f3f2b1a2aa5ce95883df3e72efc4a32de1190 Signed-off-by: Furquan Shaikh Reviewed-on: https://review.coreboot.org/22551 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/mainboard/google/daisy/chromeos.c | 2 +- src/mainboard/google/foster/chromeos.c | 2 +- src/mainboard/google/peach_pit/chromeos.c | 2 +- src/mainboard/google/veyron/chromeos.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/mainboard') diff --git a/src/mainboard/google/daisy/chromeos.c b/src/mainboard/google/daisy/chromeos.c index dcac865b41..ae456b47aa 100644 --- a/src/mainboard/google/daisy/chromeos.c +++ b/src/mainboard/google/daisy/chromeos.c @@ -67,7 +67,7 @@ void fill_lb_gpios(struct lb_gpios *gpios) int get_recovery_mode_switch(void) { - uint32_t ec_events; + uint64_t ec_events; /* The GPIO is active low. */ if (!gpio_get_value(GPIO_Y10)) // RECMODE_GPIO diff --git a/src/mainboard/google/foster/chromeos.c b/src/mainboard/google/foster/chromeos.c index bd17c4debe..b4cb33238f 100644 --- a/src/mainboard/google/foster/chromeos.c +++ b/src/mainboard/google/foster/chromeos.c @@ -69,7 +69,7 @@ void fill_lb_gpios(struct lb_gpios *gpios) int get_recovery_mode_switch(void) { #if IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC) - uint32_t ec_events; + uint64_t ec_events; ec_events = google_chromeec_get_events_b(); return !!(ec_events & diff --git a/src/mainboard/google/peach_pit/chromeos.c b/src/mainboard/google/peach_pit/chromeos.c index 4cab7dcb86..e782986cf4 100644 --- a/src/mainboard/google/peach_pit/chromeos.c +++ b/src/mainboard/google/peach_pit/chromeos.c @@ -67,7 +67,7 @@ void fill_lb_gpios(struct lb_gpios *gpios) int get_recovery_mode_switch(void) { - uint32_t ec_events; + uint64_t ec_events; /* The GPIO is active low. */ if (!gpio_get_value(GPIO_X07)) // RECMODE_GPIO diff --git a/src/mainboard/google/veyron/chromeos.c b/src/mainboard/google/veyron/chromeos.c index b8fb3bcd4b..f99cd81aa0 100644 --- a/src/mainboard/google/veyron/chromeos.c +++ b/src/mainboard/google/veyron/chromeos.c @@ -57,7 +57,7 @@ void fill_lb_gpios(struct lb_gpios *gpios) int get_recovery_mode_switch(void) { - uint32_t ec_events; + uint64_t ec_events; /* The GPIO is active low. */ if (!gpio_get(GPIO_RECOVERY)) -- cgit v1.2.3