summaryrefslogtreecommitdiff
path: root/src/soc/mediatek/mt8196/irq2axi.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/mediatek/mt8196/irq2axi.c')
-rw-r--r--src/soc/mediatek/mt8196/irq2axi.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/soc/mediatek/mt8196/irq2axi.c b/src/soc/mediatek/mt8196/irq2axi.c
new file mode 100644
index 0000000000..e0250a97f2
--- /dev/null
+++ b/src/soc/mediatek/mt8196/irq2axi.c
@@ -0,0 +1,18 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <console/console.h>
+#include <device/mmio.h>
+#include <soc/irq2axi.h>
+
+void irq2axi_disable(void)
+{
+ printk(BIOS_DEBUG, "%s\n", __func__);
+ /* disable IRQ2AXI */
+ write32p(IRQ2AXI_CFG1, 0x0);
+
+ /* disable mcusys ack */
+ clrbits32p(MCUSYS_ACK_REG, MCUSYS_ACK_CLR);
+
+ /* switch to legacy channel */
+ clrbits32p(CIRQ_AXI_MODE, CIRQ_AXI_MODE_LEGACY);
+}