2016-12-14 21:10:21 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the coreboot project.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2016 Google Inc.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; version 2 of the License.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <arch/acpi.h>
|
2018-10-06 21:03:23 +02:00
|
|
|
#include <baseboard/variants.h>
|
2016-12-14 21:10:21 +01:00
|
|
|
#include <ec/google/chromeec/ec.h>
|
|
|
|
|
2017-04-13 23:15:56 +02:00
|
|
|
#include <variant/ec.h>
|
2016-12-14 21:10:21 +01:00
|
|
|
|
2018-10-06 21:03:23 +02:00
|
|
|
__weak const struct google_chromeec_event_info *variant_get_event_info(void)
|
2016-12-14 21:10:21 +01:00
|
|
|
{
|
2018-10-06 21:03:23 +02:00
|
|
|
static const struct google_chromeec_event_info info = {
|
2017-10-04 23:01:41 +02:00
|
|
|
.log_events = MAINBOARD_EC_LOG_EVENTS,
|
|
|
|
.sci_events = MAINBOARD_EC_SCI_EVENTS,
|
2018-10-19 10:50:02 +02:00
|
|
|
.smi_events = MAINBOARD_EC_SMI_EVENTS,
|
2017-10-04 23:01:41 +02:00
|
|
|
.s3_wake_events = MAINBOARD_EC_S3_WAKE_EVENTS,
|
|
|
|
.s5_wake_events = MAINBOARD_EC_S5_WAKE_EVENTS,
|
2017-10-27 14:09:22 +02:00
|
|
|
.s0ix_wake_events = MAINBOARD_EC_S0IX_WAKE_EVENTS,
|
2017-10-04 23:01:41 +02:00
|
|
|
};
|
2016-12-14 21:10:21 +01:00
|
|
|
|
2018-10-06 21:03:23 +02:00
|
|
|
return &info;
|
|
|
|
}
|
2016-12-14 21:10:21 +01:00
|
|
|
|
2018-10-06 21:03:23 +02:00
|
|
|
void mainboard_ec_init(void)
|
|
|
|
{
|
|
|
|
google_chromeec_events_init(variant_get_event_info(),
|
|
|
|
acpi_is_wakeup_s3());
|
2016-12-14 21:10:21 +01:00
|
|
|
}
|