summaryrefslogtreecommitdiff
path: root/src/soc/mediatek/mt8188/cpu_input_gating.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/mediatek/mt8188/cpu_input_gating.c')
-rw-r--r--src/soc/mediatek/mt8188/cpu_input_gating.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/soc/mediatek/mt8188/cpu_input_gating.c b/src/soc/mediatek/mt8188/cpu_input_gating.c
new file mode 100644
index 0000000000..10f6338d35
--- /dev/null
+++ b/src/soc/mediatek/mt8188/cpu_input_gating.c
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: GPL-2.0-only OR MIT */
+
+#include <device/mmio.h>
+#include <soc/addressmap.h>
+#include <soc/cpu_input_gating.h>
+
+#define CPU6_IG_EN_REG (MCUSYS_BASE + 0x3308)
+#define CPU7_IG_EN_REG (MCUSYS_BASE + 0x3b08)
+#define DISABLE_CPU_IG 0xfc000001
+
+void disable_cpu_input_gating(void)
+{
+ write32p(CPU6_IG_EN_REG, DISABLE_CPU_IG);
+ write32p(CPU7_IG_EN_REG, DISABLE_CPU_IG);
+}