Jon Murphy | 2a7445a | 2022-02-16 06:46:47 -0700 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
| 2 | |
| 3 | #include <baseboard/variants.h> |
| 4 | #include <console/console.h> |
| 5 | #include <cpu/x86/smm.h> |
| 6 | #include <ec/google/chromeec/ec.h> |
| 7 | #include <ec/google/chromeec/smm.h> |
Jon Murphy | f79cc51 | 2022-02-17 16:15:45 -0700 | [diff] [blame] | 8 | #include <elog.h> |
Felix Held | 8d1ef73 | 2022-12-06 21:29:49 +0100 | [diff] [blame^] | 9 | #include <gpio.h> |
Jon Murphy | 2a7445a | 2022-02-16 06:46:47 -0700 | [diff] [blame] | 10 | #include <variant/ec.h> |
| 11 | |
| 12 | void mainboard_smi_sleep(u8 slp_typ) |
| 13 | { |
| 14 | size_t num_gpios; |
| 15 | const struct soc_amd_gpio *gpios; |
| 16 | |
| 17 | chromeec_smi_sleep(slp_typ, MAINBOARD_EC_S3_WAKE_EVENTS, MAINBOARD_EC_S5_WAKE_EVENTS); |
| 18 | |
| 19 | variant_sleep_gpio_table(&gpios, &num_gpios); |
Raul E Rangel | e6c677c | 2022-04-25 13:45:26 -0600 | [diff] [blame] | 20 | gpio_configure_pads(gpios, num_gpios); |
Jon Murphy | 2a7445a | 2022-02-16 06:46:47 -0700 | [diff] [blame] | 21 | } |
| 22 | |
| 23 | int mainboard_smi_apmc(u8 apmc) |
| 24 | { |
| 25 | chromeec_smi_apmc(apmc, MAINBOARD_EC_SCI_EVENTS, MAINBOARD_EC_SMI_EVENTS); |
| 26 | |
| 27 | return 0; |
| 28 | } |