2020-04-05 13:21:24 +02:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2017-03-15 23:25:48 +01:00
|
|
|
|
|
|
|
#include <cpu/x86/smm.h>
|
|
|
|
#include <ec/google/chromeec/smm.h>
|
2019-08-13 06:57:34 +02:00
|
|
|
#include <intelblocks/smihandler.h>
|
2017-03-15 23:25:48 +01:00
|
|
|
|
2018-11-22 13:38:47 +01:00
|
|
|
#include <baseboard/variants.h>
|
2018-09-13 10:51:14 +02:00
|
|
|
#include <variant/ec.h>
|
2017-03-15 23:25:48 +01:00
|
|
|
|
|
|
|
void mainboard_smi_espi_handler(void)
|
|
|
|
{
|
|
|
|
chromeec_smi_process_events();
|
|
|
|
}
|
|
|
|
|
2018-11-22 13:38:47 +01:00
|
|
|
void __weak variant_smi_sleep(u8 slp_typ) {}
|
|
|
|
|
2017-03-15 23:25:48 +01:00
|
|
|
void mainboard_smi_sleep(u8 slp_typ)
|
|
|
|
{
|
2018-11-22 13:38:47 +01:00
|
|
|
variant_smi_sleep(slp_typ);
|
2017-03-15 23:25:48 +01:00
|
|
|
chromeec_smi_sleep(slp_typ, MAINBOARD_EC_S3_WAKE_EVENTS,
|
|
|
|
MAINBOARD_EC_S5_WAKE_EVENTS);
|
|
|
|
}
|
|
|
|
|
|
|
|
int mainboard_smi_apmc(u8 apmc)
|
|
|
|
{
|
2017-03-11 02:44:00 +01:00
|
|
|
chromeec_smi_apmc(apmc, MAINBOARD_EC_SCI_EVENTS, 0);
|
2017-03-15 23:25:48 +01:00
|
|
|
return 0;
|
|
|
|
}
|