google/reef: Add mainboard handler function for gpio SMI
This patch adds mainboard_smi_gpi_handler which handles the SMI event. This can happen in situations like lidclose and system goes to shutdown. BUG=chrome-os-partner:54977 TEST=When system is in firmware mode executing the command lidclose from ec console shuts down the system. Change-Id: I8ff6001e48dcbbd4cee5097e759352d8fea6189b Signed-off-by: Shaunak Saha <shaunak.saha@intel.com> Reviewed-on: https://review.coreboot.org/15834 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
parent
09115a92f6
commit
3922cec524
|
@ -24,6 +24,9 @@
|
||||||
*/
|
*/
|
||||||
#define EC_SCI_GPI GPE0_DW1_11
|
#define EC_SCI_GPI GPE0_DW1_11
|
||||||
|
|
||||||
|
/* EC SMI */
|
||||||
|
#define EC_SMI_GPI GPIO_49
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* On lidopen/lidclose GPIO_22 from North Community gets toggled and
|
* On lidopen/lidclose GPIO_22 from North Community gets toggled and
|
||||||
* is used in _PRW to wake up device from sleep. GPIO_22 maps to
|
* is used in _PRW to wake up device from sleep. GPIO_22 maps to
|
||||||
|
|
|
@ -18,8 +18,15 @@
|
||||||
#include <cpu/x86/smm.h>
|
#include <cpu/x86/smm.h>
|
||||||
#include <ec/google/chromeec/smm.h>
|
#include <ec/google/chromeec/smm.h>
|
||||||
#include <soc/pm.h>
|
#include <soc/pm.h>
|
||||||
|
#include <soc/smm.h>
|
||||||
#include "ec.h"
|
#include "ec.h"
|
||||||
|
|
||||||
|
void mainboard_smi_gpi_handler(const struct gpi_status *sts)
|
||||||
|
{
|
||||||
|
if (gpi_status_get(sts, EC_SMI_GPI))
|
||||||
|
chromeec_smi_process_events();
|
||||||
|
}
|
||||||
|
|
||||||
void mainboard_smi_sleep(u8 slp_typ)
|
void mainboard_smi_sleep(u8 slp_typ)
|
||||||
{
|
{
|
||||||
if (slp_typ == ACPI_S3)
|
if (slp_typ == ACPI_S3)
|
||||||
|
|
Loading…
Reference in New Issue