From 60ce6152fd3ab299920cfe984698f85279360a51 Mon Sep 17 00:00:00 2001 From: Brandon Breitenstein Date: Tue, 8 Aug 2017 15:30:41 -0700 Subject: intel/common/block/smm: Update smihandler to handle gpi Updating the common smihandler to handler gpi events which originally were going to be left to each soc to handle. After some more analysis the gpi handler can also be commonized. Change-Id: I6273fe846587137938bbcffa3a92736b91982574 Signed-off-by: Brandon Breitenstein Reviewed-on: https://review.coreboot.org/20917 Reviewed-by: Aaron Durbin Tested-by: build bot (Jenkins) --- src/soc/intel/apollolake/include/soc/smm.h | 3 --- src/soc/intel/apollolake/smihandler.c | 17 +---------------- 2 files changed, 1 insertion(+), 19 deletions(-) (limited to 'src/soc/intel/apollolake') diff --git a/src/soc/intel/apollolake/include/soc/smm.h b/src/soc/intel/apollolake/include/soc/smm.h index b37694e6f7..eda0bc4422 100644 --- a/src/soc/intel/apollolake/include/soc/smm.h +++ b/src/soc/intel/apollolake/include/soc/smm.h @@ -30,7 +30,4 @@ void southbridge_smm_clear_state(void); void southbridge_smm_enable_smi(void); -/* Mainboard handler for GPI SMIs*/ -void mainboard_smi_gpi_handler(const struct gpi_status *sts); - #endif diff --git a/src/soc/intel/apollolake/smihandler.c b/src/soc/intel/apollolake/smihandler.c index f834b1da70..22c793051d 100644 --- a/src/soc/intel/apollolake/smihandler.c +++ b/src/soc/intel/apollolake/smihandler.c @@ -34,26 +34,11 @@ const struct smm_save_state_ops *get_smm_save_state_ops(void) return &em64t100_smm_ops; } -void __attribute__((weak)) -mainboard_smi_gpi_handler(const struct gpi_status *sts) { } - -static void southbridge_smi_gpi( - const struct smm_save_state_ops *save_state_ops) -{ - struct gpi_status smi_sts; - - gpi_clear_get_smi_status(&smi_sts); - mainboard_smi_gpi_handler(&smi_sts); - - /* Clear again after mainboard handler */ - gpi_clear_get_smi_status(&smi_sts); -} - const smi_handler_t southbridge_smi[32] = { [SLP_SMI_STS] = smihandler_southbridge_sleep, [APM_SMI_STS] = smihandler_southbridge_apmc, [FAKE_PM1_SMI_STS] = smihandler_southbridge_pm1, - [GPIO_SMI_STS] = southbridge_smi_gpi, + [GPIO_SMI_STS] = smihandler_southbridge_gpi, [TCO_SMI_STS] = smihandler_southbridge_tco, [PERIODIC_SMI_STS] = smihandler_southbridge_periodic, }; -- cgit v1.2.3