From d60386ef2fc0a609bfeef060e73a74a8f1af3047 Mon Sep 17 00:00:00 2001 From: Karthikeyan Ramasubramanian Date: Sun, 22 Dec 2019 23:04:59 -0700 Subject: mb/google/dedede: Add smihandler stub Add stub implementation of smihandler. BUG=b:144768001 TEST=Build test. Change-Id: I7ab25888812bfb4578915e342b14355ccd15f5cc Signed-off-by: Karthikeyan Ramasubramanian Reviewed-on: https://review.coreboot.org/c/coreboot/+/38280 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh --- src/mainboard/google/dedede/Makefile.inc | 2 ++ src/mainboard/google/dedede/smihandler.c | 29 ++++++++++++++++++++++ .../google/dedede/variants/baseboard/gpio.c | 10 ++++++++ .../baseboard/include/baseboard/variants.h | 1 + 4 files changed, 42 insertions(+) create mode 100644 src/mainboard/google/dedede/smihandler.c (limited to 'src/mainboard/google/dedede') diff --git a/src/mainboard/google/dedede/Makefile.inc b/src/mainboard/google/dedede/Makefile.inc index 8f501131e1..f214544e09 100644 --- a/src/mainboard/google/dedede/Makefile.inc +++ b/src/mainboard/google/dedede/Makefile.inc @@ -2,6 +2,8 @@ bootblock-y += bootblock.c ramstage-y += mainboard.c +smm-$(CONFIG_HAVE_SMI_HANDLER) += smihandler.c + subdirs-y += variants/baseboard CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/variants/baseboard/include diff --git a/src/mainboard/google/dedede/smihandler.c b/src/mainboard/google/dedede/smihandler.c new file mode 100644 index 0000000000..780d33f6de --- /dev/null +++ b/src/mainboard/google/dedede/smihandler.c @@ -0,0 +1,29 @@ +/* + * This file is part of the coreboot project. + * + * Copyright 2020 The coreboot project Authors. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include +#include +#include + +void mainboard_smi_gpi_handler(const struct gpi_status *sts) +{ +} + +void mainboard_smi_sleep(u8 slp_typ) +{ + const struct pad_config *pads; + size_t num; + + pads = variant_sleep_gpio_table(&num); + gpio_configure_pads(pads, num); +} + +int mainboard_smi_apmc(u8 apmc) +{ + return 0; +} diff --git a/src/mainboard/google/dedede/variants/baseboard/gpio.c b/src/mainboard/google/dedede/variants/baseboard/gpio.c index c94af6fb7f..65ac66b319 100644 --- a/src/mainboard/google/dedede/variants/baseboard/gpio.c +++ b/src/mainboard/google/dedede/variants/baseboard/gpio.c @@ -31,3 +31,13 @@ const struct pad_config *__weak variant_early_gpio_table(size_t *num) *num = ARRAY_SIZE(early_gpio_table); return early_gpio_table; } + +/* GPIO settings before entering sleep. */ +static const struct pad_config sleep_gpio_table[] = { +}; + +const struct pad_config *__weak variant_sleep_gpio_table(size_t *num) +{ + *num = ARRAY_SIZE(sleep_gpio_table); + return sleep_gpio_table; +} diff --git a/src/mainboard/google/dedede/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/dedede/variants/baseboard/include/baseboard/variants.h index ebcd594a9b..309b9ebc5d 100644 --- a/src/mainboard/google/dedede/variants/baseboard/include/baseboard/variants.h +++ b/src/mainboard/google/dedede/variants/baseboard/include/baseboard/variants.h @@ -17,5 +17,6 @@ const struct pad_config *variant_gpio_table(size_t *num); const struct pad_config *variant_early_gpio_table(size_t *num); +const struct pad_config *variant_sleep_gpio_table(size_t *num); #endif /*__BASEBOARD_VARIANTS_H__ */ -- cgit v1.2.3