summaryrefslogtreecommitdiffstats
path: root/src/soc/mediatek/mt8192/include
diff options
context:
space:
mode:
authorG.Pangao <gtk_pangao@mediatek.com>2020-09-30 11:04:08 +0800
committerHung-Te Lin <hungte@chromium.org>2020-12-30 06:04:10 +0000
commit142e6f5ecfcba4c1c2fd6b7e015cb215d16f34fc (patch)
tree125552c51d2a2d876cd12ab18e664a256e3f997b /src/soc/mediatek/mt8192/include
parent4b9b44696d8f8dabc269802655f1a18e5afd481a (diff)
downloadcoreboot-142e6f5ecfcba4c1c2fd6b7e015cb215d16f34fc.tar.gz
coreboot-142e6f5ecfcba4c1c2fd6b7e015cb215d16f34fc.tar.bz2
coreboot-142e6f5ecfcba4c1c2fd6b7e015cb215d16f34fc.zip
soc/mediatek/mt8192: eint: unmask eint event mask register
eint event mask register is used to mask eint wakeup source on mt8192. 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. BUG=b:169024614 Signed-off-by: G.Pangao <gtk_pangao@mediatek.com> Change-Id: I8ee80bf8302c146e09b74e9f6c6c49f501d7c1c4 Reviewed-on: https://review.coreboot.org/c/coreboot/+/46409 Reviewed-by: Yu-Ping Wu <yupingso@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/mediatek/mt8192/include')
-rw-r--r--src/soc/mediatek/mt8192/include/soc/eint_event.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/soc/mediatek/mt8192/include/soc/eint_event.h b/src/soc/mediatek/mt8192/include/soc/eint_event.h
new file mode 100644
index 000000000000..05d1fbcb0c85
--- /dev/null
+++ b/src/soc/mediatek/mt8192/include/soc/eint_event.h
@@ -0,0 +1,20 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#ifndef SOC_MEDIATEK_MT8192_EINT_EVENT_H
+#define SOC_MEDIATEK_MT8192_EINT_EVENT_H
+
+#include <device/mmio.h>
+#include <soc/addressmap.h>
+
+/* eint event mask cler register */
+struct eint_event_reg {
+ uint32_t eint_event_mask_clr[7];
+};
+
+/* eint_base + 0x880 is eint_event_mask_clr register with access type W1C. */
+static struct eint_event_reg *const mtk_eint_event = (void *)(EINT_BASE + 0x880);
+
+/* unmask eint event, eint can wakeup by spm */
+void unmask_eint_event_mask(void);
+
+#endif