Angel Pons | 0c58dc6 | 2020-04-03 01:21:09 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Mono | 9b90824 | 2014-03-02 18:40:36 +0100 | [diff] [blame] | 2 | |
Mono | 9b90824 | 2014-03-02 18:40:36 +0100 | [diff] [blame] | 3 | #include <cpu/x86/smm.h> |
Arthur Heymans | 31312b2 | 2018-04-10 12:56:19 +0200 | [diff] [blame] | 4 | #include <southbridge/intel/common/pmutil.h> |
Mono | 9b90824 | 2014-03-02 18:40:36 +0100 | [diff] [blame] | 5 | |
Kyösti Mälkki | 189f3ba | 2014-12-29 11:32:27 +0200 | [diff] [blame] | 6 | #define GPE_EC_SCI 12 |
| 7 | |
Mono | 9b90824 | 2014-03-02 18:40:36 +0100 | [diff] [blame] | 8 | int mainboard_smi_apmc(u8 data) |
| 9 | { |
Elyes HAOUAS | 0ce41f1 | 2018-11-13 10:03:31 +0100 | [diff] [blame] | 10 | switch (data) { |
Felix Singer | df98b81 | 2023-12-08 10:52:34 +0100 | [diff] [blame] | 11 | case APM_CNT_ACPI_ENABLE: |
| 12 | /* route H8SCI to SCI */ |
| 13 | gpi_route_interrupt(GPE_EC_SCI, GPI_IS_SCI); |
| 14 | break; |
| 15 | case APM_CNT_ACPI_DISABLE: |
| 16 | /* route H8SCI# to SMI */ |
| 17 | gpi_route_interrupt(GPE_EC_SCI, GPI_IS_SMI); |
| 18 | break; |
| 19 | default: |
| 20 | break; |
Mono | 9b90824 | 2014-03-02 18:40:36 +0100 | [diff] [blame] | 21 | } |
| 22 | return 0; |
| 23 | } |