| 1 |
|
| 2 |
|
| 3 |
#include <cpu/x86/smm.h> |
| 4 |
#include <ec/google/chromeec/smm.h> |
| 5 |
#include <soc/iomap.h> |
| 6 |
#include <soc/pm.h> |
| 7 |
#include <intelblocks/smihandler.h> |
| 8 |
#include "ec.h" |
| 9 |
#include <variant/gpio.h> |
| 10 |
|
| 11 |
void mainboard_smi_gpi_handler(const struct gpi_status *sts) |
| 12 |
{ |
| 13 |
if (CONFIG(BOARD_INTEL_KBLRVP8)) |
| 14 |
return; |
| 15 |
|
| 16 |
if (CONFIG(EC_GOOGLE_CHROMEEC)) |
| 17 |
if (gpi_status_get(sts, EC_SMI_GPI)) |
| 18 |
chromeec_smi_process_events(); |
| 19 |
} |
| 20 |
|
| 21 |
void mainboard_smi_sleep(u8 slp_typ) |
| 22 |
{ |
| 23 |
if (CONFIG(EC_GOOGLE_CHROMEEC)) |
| 24 |
chromeec_smi_sleep(slp_typ, MAINBOARD_EC_S3_WAKE_EVENTS, |
| 25 |
MAINBOARD_EC_S5_WAKE_EVENTS); |
| 26 |
} |
| 27 |
|
| 28 |
int mainboard_smi_apmc(u8 apmc) |
| 29 |
{ |
| 30 |
if (CONFIG(EC_GOOGLE_CHROMEEC)) |
| 31 |
chromeec_smi_apmc(apmc, MAINBOARD_EC_SCI_EVENTS, |
| 32 |
MAINBOARD_EC_SMI_EVENTS); |
| 33 |
return 0; |
| 34 |
} |