diff options
author | Brandon Breitenstein <brandon.breitenstein@intel.com> | 2017-06-08 17:32:02 -0700 |
---|---|---|
committer | Aaron Durbin <adurbin@chromium.org> | 2017-06-20 18:30:43 +0200 |
commit | a86d1b8af564c291100a854cf8bb64fbe34ee952 (patch) | |
tree | ed7d8f80452f68eb70cba89bf4351877bb6ce982 /src/soc/intel/apollolake/smihandler.c | |
parent | d9351099ef5ca58a6153da1b782178bda22bc879 (diff) | |
download | coreboot-a86d1b8af564c291100a854cf8bb64fbe34ee952.tar.xz |
soc/intel/common: Add SMM common code for Intel Platforms
SMI code is very similar across Intel platforms. Move this code to
common/block/smi to allow it to be shared between platforms instead
of duplicating the code for each platform. smihandler.h has already
been made common so all it will contain is name changes and a move
to the common block location. Due to moving smihandler code, APL
changes are bundled here to show this change.
Change-Id: I599358f23d5de7564ef1ca414bccd54cebab5a4c
Signed-off-by: Brandon Breitenstein <brandon.breitenstein@intel.com>
Reviewed-on: https://review.coreboot.org/19392
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/soc/intel/apollolake/smihandler.c')
-rw-r--r-- | src/soc/intel/apollolake/smihandler.c | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/src/soc/intel/apollolake/smihandler.c b/src/soc/intel/apollolake/smihandler.c index 0272a5c3c2..f834b1da70 100644 --- a/src/soc/intel/apollolake/smihandler.c +++ b/src/soc/intel/apollolake/smihandler.c @@ -14,25 +14,15 @@ * GNU General Public License for more details. */ -#include <arch/hlt.h> #include <arch/io.h> -#include <console/console.h> -#include <cpu/x86/cache.h> #include <cpu/x86/smm.h> -#include <device/pci_def.h> -#include <elog.h> -#include <soc/nvs.h> -#include <soc/pm.h> +#include <intelblocks/smihandler.h> #include <soc/gpio.h> #include <soc/iomap.h> #include <soc/pci_devs.h> -#include <soc/intel/common/smi.h> -#include <spi-generic.h> -#include <stdint.h> -#include <stdlib.h> -#include <soc/smm.h> +#include <soc/pm.h> -int smm_disable_busmaster(device_t dev) +int smihandler_disable_busmaster(device_t dev) { if (dev == PCH_DEV_PMC) return 0; @@ -47,7 +37,8 @@ const struct smm_save_state_ops *get_smm_save_state_ops(void) 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) +static void southbridge_smi_gpi( + const struct smm_save_state_ops *save_state_ops) { struct gpi_status smi_sts; @@ -59,10 +50,10 @@ static void southbridge_smi_gpi(const struct smm_save_state_ops *save_state_ops) } const smi_handler_t southbridge_smi[32] = { - [SLP_SMI_STS] = southbridge_smi_sleep, - [APM_SMI_STS] = southbridge_smi_apmc, - [FAKE_PM1_SMI_STS] = southbridge_smi_pm1, + [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, - [TCO_SMI_STS] = southbridge_smi_tco, - [PERIODIC_SMI_STS] = southbridge_smi_periodic, + [TCO_SMI_STS] = smihandler_southbridge_tco, + [PERIODIC_SMI_STS] = smihandler_southbridge_periodic, }; |