soc/mediatek/mt8186: 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.

TEST=build pass
BUG=b:202871018

Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Change-Id: I84946c2c74dd233419cb94f013a42c734363baf7
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58938
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
This commit is contained in:
Rex-BC Chen 2021-09-27 18:50:26 +08:00 committed by Patrick Georgi
parent a74f443d51
commit ac07b03634
2 changed files with 3 additions and 0 deletions

View File

@ -1,6 +1,7 @@
ifeq ($(CONFIG_SOC_MEDIATEK_MT8186),y) ifeq ($(CONFIG_SOC_MEDIATEK_MT8186),y)
bootblock-y += bootblock.c bootblock-y += bootblock.c
bootblock-y += ../common/eint_event.c
bootblock-y += ../common/flash_controller.c bootblock-y += ../common/flash_controller.c
bootblock-y += ../common/gpio.c gpio.c bootblock-y += ../common/gpio.c gpio.c
bootblock-y += ../common/mmu_operations.c bootblock-y += ../common/mmu_operations.c

View File

@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */ /* SPDX-License-Identifier: GPL-2.0-only */
#include <bootblock_common.h> #include <bootblock_common.h>
#include <soc/eint_event.h>
#include <soc/mmu_operations.h> #include <soc/mmu_operations.h>
#include <soc/pll.h> #include <soc/pll.h>
#include <soc/wdt.h> #include <soc/wdt.h>
@ -10,4 +11,5 @@ void bootblock_soc_init(void)
mtk_mmu_init(); mtk_mmu_init();
mtk_wdt_init(); mtk_wdt_init();
mt_pll_init(); mt_pll_init();
unmask_eint_event_mask();
} }