From 4141b47b070cbaf3cd83445259067cd38599cc94 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Sat, 16 May 2015 13:48:10 +0200 Subject: bd82x6x: Merge common apmc finalize procedure. Change-Id: I9c938b8a69479fae6b0eb99d1135f1caaf26d0e2 Signed-off-by: Vladimir Serbinenko Reviewed-on: http://review.coreboot.org/10227 Reviewed-by: Paul Menzel Tested-by: build bot (Jenkins) Reviewed-by: Nicolas Reinecke Reviewed-by: Patrick Georgi --- src/mainboard/gigabyte/ga-b75m-d3h/mainboard_smi.c | 38 ---------------------- src/mainboard/gigabyte/ga-b75m-d3v/mainboard_smi.c | 38 ---------------------- 2 files changed, 76 deletions(-) (limited to 'src/mainboard/gigabyte') diff --git a/src/mainboard/gigabyte/ga-b75m-d3h/mainboard_smi.c b/src/mainboard/gigabyte/ga-b75m-d3h/mainboard_smi.c index 85409fccbf..45c35248ad 100644 --- a/src/mainboard/gigabyte/ga-b75m-d3h/mainboard_smi.c +++ b/src/mainboard/gigabyte/ga-b75m-d3h/mainboard_smi.c @@ -49,41 +49,3 @@ int mainboard_io_trap_handler(int smif) * On failure, the IO Trap Handler returns a value != 1 */ return 1; } - -static int mainboard_finalized = 0; - -int mainboard_smi_apmc(u8 data) -{ - u16 pmbase = pci_read_config16(PCI_DEV(0, 0x1f, 0), 0x40) & 0xfffc; - - printk(BIOS_DEBUG, "%s: pmbase %04X, data %02X\n", __func__, pmbase, - data); - - if (!pmbase) - return 0; - - switch (data) { - case APM_CNT_ACPI_ENABLE: - break; - case APM_CNT_ACPI_DISABLE: - break; - case APM_CNT_FINALIZE: - printk(BIOS_DEBUG, "APMC: FINALIZE\n"); - if (mainboard_finalized) { - printk(BIOS_DEBUG, "APMC#: Already finalized\n"); - return 0; - } - - intel_me_finalize_smm(); - intel_pch_finalize_smm(); - intel_sandybridge_finalize_smm(); - intel_model_206ax_finalize_smm(); - - mainboard_finalized = 1; - break; - - default: - break; - } - return 0; -} diff --git a/src/mainboard/gigabyte/ga-b75m-d3v/mainboard_smi.c b/src/mainboard/gigabyte/ga-b75m-d3v/mainboard_smi.c index 85409fccbf..45c35248ad 100644 --- a/src/mainboard/gigabyte/ga-b75m-d3v/mainboard_smi.c +++ b/src/mainboard/gigabyte/ga-b75m-d3v/mainboard_smi.c @@ -49,41 +49,3 @@ int mainboard_io_trap_handler(int smif) * On failure, the IO Trap Handler returns a value != 1 */ return 1; } - -static int mainboard_finalized = 0; - -int mainboard_smi_apmc(u8 data) -{ - u16 pmbase = pci_read_config16(PCI_DEV(0, 0x1f, 0), 0x40) & 0xfffc; - - printk(BIOS_DEBUG, "%s: pmbase %04X, data %02X\n", __func__, pmbase, - data); - - if (!pmbase) - return 0; - - switch (data) { - case APM_CNT_ACPI_ENABLE: - break; - case APM_CNT_ACPI_DISABLE: - break; - case APM_CNT_FINALIZE: - printk(BIOS_DEBUG, "APMC: FINALIZE\n"); - if (mainboard_finalized) { - printk(BIOS_DEBUG, "APMC#: Already finalized\n"); - return 0; - } - - intel_me_finalize_smm(); - intel_pch_finalize_smm(); - intel_sandybridge_finalize_smm(); - intel_model_206ax_finalize_smm(); - - mainboard_finalized = 1; - break; - - default: - break; - } - return 0; -} -- cgit v1.2.3