summaryrefslogtreecommitdiff
path: root/src/mainboard/google/rambi
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2022-11-29 07:36:44 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2023-05-09 18:08:25 +0000
commit923b8ec18085d9b03162a1aae8dfd3aeff2d4fa0 (patch)
treecdba6b55ce4440a0f7e42288d00b46b6414ac979 /src/mainboard/google/rambi
parent0be8ac547c9daa7f9296f3cbfb1599f800d0ee91 (diff)
mb/google,intel: Use common ChromeEC code for SMI APMC
Change-Id: If4b7c2b94e0fec84831740336ccdbea0922ffbfe Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/74513 Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Diffstat (limited to 'src/mainboard/google/rambi')
-rw-r--r--src/mainboard/google/rambi/smihandler.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/src/mainboard/google/rambi/smihandler.c b/src/mainboard/google/rambi/smihandler.c
index 358a92f967..29dc8b29ad 100644
--- a/src/mainboard/google/rambi/smihandler.c
+++ b/src/mainboard/google/rambi/smihandler.c
@@ -7,6 +7,7 @@
#include <elog.h>
#include <ec/google/chromeec/ec.h>
+#include <ec/google/chromeec/smm.h>
#include "ec.h"
#include <soc/nvs.h>
@@ -90,21 +91,6 @@ void mainboard_smi_sleep(uint8_t slp_typ)
int mainboard_smi_apmc(uint8_t apmc)
{
- switch (apmc) {
- case APM_CNT_ACPI_ENABLE:
- google_chromeec_set_smi_mask(0);
- /* Clear all pending events */
- while (google_chromeec_get_event() != EC_HOST_EVENT_NONE)
- ;
- google_chromeec_set_sci_mask(MAINBOARD_EC_SCI_EVENTS);
- break;
- case APM_CNT_ACPI_DISABLE:
- google_chromeec_set_sci_mask(0);
- /* Clear all pending events */
- while (google_chromeec_get_event() != EC_HOST_EVENT_NONE)
- ;
- google_chromeec_set_smi_mask(MAINBOARD_EC_SMI_EVENTS);
- break;
- }
+ chromeec_smi_apmc(apmc, MAINBOARD_EC_SCI_EVENTS, MAINBOARD_EC_SMI_EVENTS);
return 0;
}