From 780f82f50e22a29244499833b6f1488e015253cf Mon Sep 17 00:00:00 2001 From: Yidi Lin Date: Mon, 19 Apr 2021 13:59:51 +0800 Subject: [PATCH] soc/mediatek/mt8195: Enable and initialize eint eint event mask register is used to mask eint wakeup source. All wakeup sources are masked by default. Since most MediaTek SoCs do not have this design, we can't modify the kernel eint upstream driver to solve the issue 'Can't wake using power button (cros_ec) or touchpad'. So we add a driver here to unmask all wakeup sources. Change-Id: I703d87e3dc49cf4e0b7ff0c75a6ea80245dd73d3 Signed-off-by: Yidi Lin Reviewed-on: https://review.coreboot.org/c/coreboot/+/54007 Reviewed-by: Hung-Te Lin Reviewed-by: Yu-Ping Wu Tested-by: build bot (Jenkins) --- src/soc/mediatek/mt8195/Makefile.inc | 1 + src/soc/mediatek/mt8195/bootblock.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/soc/mediatek/mt8195/Makefile.inc b/src/soc/mediatek/mt8195/Makefile.inc index ec6d78b0c0..efd4a12d02 100644 --- a/src/soc/mediatek/mt8195/Makefile.inc +++ b/src/soc/mediatek/mt8195/Makefile.inc @@ -1,6 +1,7 @@ ifeq ($(CONFIG_SOC_MEDIATEK_MT8195),y) bootblock-y += bootblock.c +bootblock-y += ../common/eint_event.c bootblock-y += ../common/flash_controller.c bootblock-y += ../common/gpio.c gpio.c bootblock-y += ../common/i2c.c i2c.c diff --git a/src/soc/mediatek/mt8195/bootblock.c b/src/soc/mediatek/mt8195/bootblock.c index 8dffe5671b..17fd27e53f 100644 --- a/src/soc/mediatek/mt8195/bootblock.c +++ b/src/soc/mediatek/mt8195/bootblock.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */ #include +#include #include #include #include @@ -10,4 +11,5 @@ void bootblock_soc_init(void) mtk_mmu_init(); mtk_wdt_init(); mt_pll_init(); + unmask_eint_event_mask(); }