diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2023-01-05 18:05:11 +0200 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2023-05-09 18:20:30 +0000 |
commit | 383c4e7530087061805130a4d62b4f0dee73281a (patch) | |
tree | c13a52dcfffe6d521024c648c28540ff00e1c526 /src/mainboard/google/link | |
parent | c3ca8ed09279fbbf5d9c6099720c3d382a1fcfa4 (diff) |
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>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/74602
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Diffstat (limited to 'src/mainboard/google/link')
-rw-r--r-- | src/mainboard/google/link/ec.c | 11 | ||||
-rw-r--r-- | src/mainboard/google/link/ec.h | 16 | ||||
-rw-r--r-- | src/mainboard/google/link/mainboard.c | 3 | ||||
-rw-r--r-- | src/mainboard/google/link/smihandler.c | 4 |
4 files changed, 16 insertions, 18 deletions
diff --git a/src/mainboard/google/link/ec.c b/src/mainboard/google/link/ec.c index 2c2ed74923..57de912876 100644 --- a/src/mainboard/google/link/ec.c +++ b/src/mainboard/google/link/ec.c @@ -2,16 +2,17 @@ #include <acpi/acpi.h> #include <console/console.h> +#include <ec/ec.h> #include <ec/google/chromeec/ec.h> #include "ec.h" -void link_ec_init(void) +void mainboard_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 78487d6ad5..18f126be67 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,26 +18,22 @@ 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)) -#ifndef __ACPI__ -extern void link_ec_init(void); -#endif - #endif // LINK_EC_H diff --git a/src/mainboard/google/link/mainboard.c b/src/mainboard/google/link/mainboard.c index 4fdfd14f6e..1f9da88e5c 100644 --- a/src/mainboard/google/link/mainboard.c +++ b/src/mainboard/google/link/mainboard.c @@ -3,6 +3,7 @@ #include <types.h> #include <device/device.h> #include <device/pci_ops.h> +#include <ec/ec.h> #include <console/console.h> #if CONFIG(VGA_ROM_RUN) #include <x86emu/x86emu.h> @@ -108,7 +109,7 @@ static void mainboard_init(struct device *dev) uint32_t board_version = 0; /* Initialize the Embedded Controller */ - link_ec_init(); + mainboard_ec_init(); google_chromeec_get_board_version(&board_version); if (board_version == 0) { diff --git a/src/mainboard/google/link/smihandler.c b/src/mainboard/google/link/smihandler.c index 4a9dfb0abf..951cabcc8c 100644 --- a/src/mainboard/google/link/smihandler.c +++ b/src/mainboard/google/link/smihandler.c @@ -50,11 +50,11 @@ void mainboard_smi_sleep(u8 slp_typ) ; /* 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; } |