From bebec08ca0dc7c180db9b1266d1311fdf634f59c Mon Sep 17 00:00:00 2001 From: Shaunak Saha Date: Wed, 6 Dec 2017 12:23:01 -0800 Subject: mb/intel/glkrvp: Configure SCI/SMI in glkrvp for ESPI This patch configures the EC_SCI_GPI when ESPI is enabled.Also adds mainboard espi handler function. TEST= Boot to OS and SMI/SCI is working when ESPI is enabled/disabled. Change-Id: I2b3845d54ad7c1f14edc86f71b3f968424711999 Signed-off-by: Shaunak Saha Reviewed-on: https://review.coreboot.org/22761 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/mainboard/intel/glkrvp/smihandler.c | 5 +++++ .../intel/glkrvp/variants/baseboard/include/baseboard/gpio.h | 4 ++++ 2 files changed, 9 insertions(+) (limited to 'src') diff --git a/src/mainboard/intel/glkrvp/smihandler.c b/src/mainboard/intel/glkrvp/smihandler.c index afaf9f977d..c08fef9e32 100644 --- a/src/mainboard/intel/glkrvp/smihandler.c +++ b/src/mainboard/intel/glkrvp/smihandler.c @@ -50,3 +50,8 @@ int mainboard_smi_apmc(u8 apmc) MAINBOARD_EC_SMI_EVENTS); return 0; } + +void mainboard_smi_espi_handler(void) +{ + chromeec_smi_process_events(); +} diff --git a/src/mainboard/intel/glkrvp/variants/baseboard/include/baseboard/gpio.h b/src/mainboard/intel/glkrvp/variants/baseboard/include/baseboard/gpio.h index 41de87c7ce..dc23abd2fc 100644 --- a/src/mainboard/intel/glkrvp/variants/baseboard/include/baseboard/gpio.h +++ b/src/mainboard/intel/glkrvp/variants/baseboard/include/baseboard/gpio.h @@ -22,7 +22,11 @@ * GPIO_11 for SCI is routed to GPE0_DW1 and maps to group GPIO_GPE_N_31_0 * which is North community */ +#if IS_ENABLED(CONFIG_SOC_ESPI) +#define EC_SCI_GPI GPE0A_ESPI_SCI_STS +#else #define EC_SCI_GPI GPE0_DW1_05 +#endif /* EC SMI */ #define EC_SMI_GPI GPIO_41 -- cgit v1.2.3