Kyösti Mälkki has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/74602 )
Change subject: mb/google/link: Apply symmetry for EC events defines ......................................................................
mb/google/link: Apply symmetry for EC events defines
All other boards use MAINBOARD_ prefix instead of board name.
Change-Id: I97d9d28963c97e780156d75b39deac069028866a Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- M src/mainboard/google/link/ec.c M src/mainboard/google/link/ec.h M src/mainboard/google/link/smihandler.c 3 files changed, 24 insertions(+), 12 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/02/74602/1
diff --git a/src/mainboard/google/link/ec.c b/src/mainboard/google/link/ec.c index 2c2ed74..e18e878 100644 --- a/src/mainboard/google/link/ec.c +++ b/src/mainboard/google/link/ec.c @@ -8,10 +8,10 @@ void link_ec_init(void) { const struct google_chromeec_event_info info = { - .log_events = LINK_EC_LOG_EVENTS, - .sci_events = LINK_EC_SCI_EVENTS, - .s3_wake_events = LINK_EC_S3_WAKE_EVENTS, - .s5_wake_events = LINK_EC_S5_WAKE_EVENTS, + .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, };
printk(BIOS_DEBUG, "%s\n", __func__); diff --git a/src/mainboard/google/link/ec.h b/src/mainboard/google/link/ec.h index 78487d6..329ef08 100644 --- a/src/mainboard/google/link/ec.h +++ b/src/mainboard/google/link/ec.h @@ -8,7 +8,7 @@ #define EC_SCI_GPI 23 /* GPIO7/GPE23 is EC_SCI# */ #define EC_SMI_GPI 8 /* GPIO8 is EC_SMI# */
-#define LINK_EC_SCI_EVENTS \ +#define MAINBOARD_EC_SCI_EVENTS \ (EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_CLOSED) |\ EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_OPEN) |\ EC_HOST_EVENT_MASK(EC_HOST_EVENT_AC_CONNECTED) |\ @@ -18,21 +18,21 @@ EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY) |\ EC_HOST_EVENT_MASK(EC_HOST_EVENT_THERMAL_THRESHOLD))
-#define LINK_EC_SMI_EVENTS \ +#define MAINBOARD_EC_SMI_EVENTS \ (EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_CLOSED))
/* EC can wake from S5 with lid or power button */ -#define LINK_EC_S5_WAKE_EVENTS \ +#define MAINBOARD_EC_S5_WAKE_EVENTS \ (EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_OPEN) |\ EC_HOST_EVENT_MASK(EC_HOST_EVENT_POWER_BUTTON))
/* EC can wake from S3 with lid or power button or key press */ -#define LINK_EC_S3_WAKE_EVENTS \ - (LINK_EC_S5_WAKE_EVENTS |\ +#define MAINBOARD_EC_S3_WAKE_EVENTS \ + (MAINBOARD_EC_S5_WAKE_EVENTS |\ EC_HOST_EVENT_MASK(EC_HOST_EVENT_KEY_PRESSED))
/* Log EC wake events plus EC shutdown events */ -#define LINK_EC_LOG_EVENTS \ +#define MAINBOARD_EC_LOG_EVENTS \ (EC_HOST_EVENT_MASK(EC_HOST_EVENT_THERMAL_SHUTDOWN) |\ EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_SHUTDOWN))
diff --git a/src/mainboard/google/link/smihandler.c b/src/mainboard/google/link/smihandler.c index 4a9dfb0..951cabc 100644 --- a/src/mainboard/google/link/smihandler.c +++ b/src/mainboard/google/link/smihandler.c @@ -50,11 +50,11 @@ ;
/* Enable wake events */ - google_chromeec_set_wake_mask(LINK_EC_S3_WAKE_EVENTS); + google_chromeec_set_wake_mask(MAINBOARD_EC_S3_WAKE_EVENTS); }
int mainboard_smi_apmc(u8 apmc) { - chromeec_smi_apmc(apmc, LINK_EC_SCI_EVENTS, LINK_EC_SMI_EVENTS); + chromeec_smi_apmc(apmc, MAINBOARD_EC_SCI_EVENTS, MAINBOARD_EC_SMI_EVENTS); return 0; }