From f3dc65951619d50da423daac0523420301af16e9 Mon Sep 17 00:00:00 2001 From: Marc Jones Date: Sat, 14 Jul 2018 17:27:35 -0600 Subject: mainboard/google/kahlee: Add mainboard resume function Add the mainboard resume function and __weak variant override. Change-Id: I808734208bd1ce81428771ea203709b53db56cd3 Signed-off-by: Marc Jones Reviewed-on: https://review.coreboot.org/27486 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth --- src/mainboard/google/kahlee/mainboard.c | 15 ++++++++++++++- .../variants/baseboard/include/baseboard/variants.h | 3 +++ 2 files changed, 17 insertions(+), 1 deletion(-) (limited to 'src/mainboard') diff --git a/src/mainboard/google/kahlee/mainboard.c b/src/mainboard/google/kahlee/mainboard.c index cf600d2cec..2efcb20bbc 100644 --- a/src/mainboard/google/kahlee/mainboard.c +++ b/src/mainboard/google/kahlee/mainboard.c @@ -190,18 +190,31 @@ int mainboard_get_ehci_oc_map(uint16_t *map) return variant_get_ehci_oc_map(map); } +#if IS_ENABLED(CONFIG_HAVE_ACPI_RESUME) +void mainboard_suspend_resume(void) +{ + variant_mainboard_suspend_resume(); +} +#endif + struct chip_operations mainboard_ops = { .init = mainboard_init, .enable_dev = kahlee_enable, .final = mainboard_final, }; -/* Variants may override this function so see definitions in variants/ */ +/* Variants may override these functions so see definitions in variants/ */ uint8_t __weak variant_board_sku(void) { return 0; } +#if IS_ENABLED(CONFIG_HAVE_ACPI_RESUME) +void __weak variant_mainboard_suspend_resume(void) +{ +} +#endif + const char *smbios_mainboard_sku(void) { static char sku_str[7]; /* sku{0..255} */ diff --git a/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/variants.h index 23f9cb014c..6e89105d99 100644 --- a/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/variants.h +++ b/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/variants.h @@ -30,5 +30,8 @@ int variant_get_ehci_oc_map(uint16_t *usb_oc_map); const struct soc_amd_gpio *variant_early_gpio_table(size_t *size); const struct soc_amd_gpio *variant_gpio_table(size_t *size); void variant_romstage_entry(int s3_resume); +#if IS_ENABLED(CONFIG_HAVE_ACPI_RESUME) +void variant_mainboard_suspend_resume(void); +#endif #endif /* __BASEBOARD_VARIANTS_H__ */ -- cgit v1.2.3