Angel Pons | 7544e2f | 2020-04-03 01:23:10 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Patrick Georgi | 021b703 | 2012-11-06 11:05:38 +0100 | [diff] [blame] | 2 | |
Patrick Georgi | 021b703 | 2012-11-06 11:05:38 +0100 | [diff] [blame] | 3 | #include <console/console.h> |
| 4 | #include <cpu/x86/smm.h> |
Patrick Georgi | 021b703 | 2012-11-06 11:05:38 +0100 | [diff] [blame] | 5 | #include <southbridge/intel/i82801ix/i82801ix.h> |
| 6 | #include <ec/acpi/ec.h> |
| 7 | |
Duncan Laurie | 0edc224 | 2013-04-29 15:04:30 -0700 | [diff] [blame] | 8 | void mainboard_smi_gpi(u32 gpi_sts) |
Patrick Georgi | 021b703 | 2012-11-06 11:05:38 +0100 | [diff] [blame] | 9 | { |
| 10 | if (gpi_sts & (1 << 1)) { |
| 11 | printk(BIOS_DEBUG, "EC/SMI\n"); |
| 12 | /* TODO */ |
| 13 | } |
| 14 | } |
| 15 | |
| 16 | int mainboard_smi_apmc(u8 apmc) |
| 17 | { |
| 18 | switch (apmc) { |
| 19 | case APM_CNT_ACPI_ENABLE: |
| 20 | send_ec_command(0x05); /* Set_SMI_Disable */ |
| 21 | send_ec_command(0xaa); /* Set_ACPI_Enable */ |
| 22 | break; |
| 23 | |
| 24 | case APM_CNT_ACPI_DISABLE: |
| 25 | send_ec_command(0x04); /* Set_SMI_Enable */ |
| 26 | send_ec_command(0xab); /* Set_ACPI_Disable */ |
| 27 | break; |
| 28 | } |
| 29 | return 0; |
| 30 | } |