Angel Pons | 6bc1374 | 2020-04-05 15:46:38 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Hannah Williams | d9c84ca | 2016-05-13 00:47:14 -0700 | [diff] [blame] | 2 | |
Hannah Williams | d9c84ca | 2016-05-13 00:47:14 -0700 | [diff] [blame] | 3 | #include <cpu/x86/smm.h> |
Kyösti Mälkki | e31ec29 | 2019-08-10 17:27:01 +0300 | [diff] [blame] | 4 | #include <cpu/intel/em64t100_save_state.h> |
Dinesh Gehlot | 58cc96f | 2023-01-17 04:01:13 +0000 | [diff] [blame] | 5 | #include <gpio.h> |
Brandon Breitenstein | a86d1b8 | 2017-06-08 17:32:02 -0700 | [diff] [blame] | 6 | #include <intelblocks/smihandler.h> |
Hannah Williams | d9c84ca | 2016-05-13 00:47:14 -0700 | [diff] [blame] | 7 | #include <soc/iomap.h> |
| 8 | #include <soc/pci_devs.h> |
Brandon Breitenstein | a86d1b8 | 2017-06-08 17:32:02 -0700 | [diff] [blame] | 9 | #include <soc/pm.h> |
Hannah Williams | d9c84ca | 2016-05-13 00:47:14 -0700 | [diff] [blame] | 10 | |
Elyes HAOUAS | c8a649c | 2018-06-10 23:36:44 +0200 | [diff] [blame] | 11 | int smihandler_soc_disable_busmaster(pci_devfn_t dev) |
Hannah Williams | d9c84ca | 2016-05-13 00:47:14 -0700 | [diff] [blame] | 12 | { |
Subrata Banik | 2ee54db | 2017-03-05 12:37:00 +0530 | [diff] [blame] | 13 | if (dev == PCH_DEV_PMC) |
Hannah Williams | d9c84ca | 2016-05-13 00:47:14 -0700 | [diff] [blame] | 14 | return 0; |
| 15 | return 1; |
| 16 | } |
| 17 | |
| 18 | const struct smm_save_state_ops *get_smm_save_state_ops(void) |
| 19 | { |
| 20 | return &em64t100_smm_ops; |
| 21 | } |
| 22 | |
| 23 | const smi_handler_t southbridge_smi[32] = { |
Subrata Banik | 4ab7ef9 | 2020-02-20 11:53:04 +0530 | [diff] [blame] | 24 | [SMI_ON_SLP_EN_STS_BIT] = smihandler_southbridge_sleep, |
| 25 | [APM_STS_BIT] = smihandler_southbridge_apmc, |
| 26 | [PM1_STS_BIT] = smihandler_southbridge_pm1, |
| 27 | [GPIO_STS_BIT] = smihandler_southbridge_gpi, |
Patrick Georgi | a7ec426 | 2020-03-11 16:31:59 +0100 | [diff] [blame] | 28 | #if CONFIG(SOC_INTEL_COMMON_BLOCK_SMM_TCO_ENABLE) |
Subrata Banik | 4ab7ef9 | 2020-02-20 11:53:04 +0530 | [diff] [blame] | 29 | [TCO_STS_BIT] = smihandler_southbridge_tco, |
Patrick Georgi | a7ec426 | 2020-03-11 16:31:59 +0100 | [diff] [blame] | 30 | #endif |
Subrata Banik | 4ab7ef9 | 2020-02-20 11:53:04 +0530 | [diff] [blame] | 31 | [PERIODIC_STS_BIT] = smihandler_southbridge_periodic, |
Julius Werner | cd49cce | 2019-03-05 16:53:33 -0800 | [diff] [blame] | 32 | #if CONFIG(SOC_ESPI) |
Shaunak Saha | 41cfd5ba | 2017-12-06 11:22:53 -0800 | [diff] [blame] | 33 | [ESPI_SMI_STS_BIT] = smihandler_southbridge_espi, |
| 34 | #endif |
Hannah Williams | d9c84ca | 2016-05-13 00:47:14 -0700 | [diff] [blame] | 35 | }; |