soc/mediatek/mt8196: Disable irq2axi feature
Irq2axi translates wire-based interrupt into message signal interrupt. Since MT8196 uses legacy wire-based interrupt, this feature needs to be disabled. If the interrupt is not handled, it will cause the system fail to boot. TEST=Build pass, check irq2axi_disable log and the interrupt can be correctly handled by checking /proc/interrupts. BUG=b:317009620 Signed-off-by: Runyang Chen <runyang.chen@mediatek.corp-partner.google.com> Change-Id: I0e89a0ee75e574a4b9e8df0a0f6a5f6e03bba2d6 Reviewed-on: https://review.coreboot.org/c/coreboot/+/84896 Reviewed-by: Yu-Ping Wu <yupingso@google.com> Reviewed-by: Yidi Lin <yidilin@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
ba0ac93452
commit
379729b497
4 changed files with 39 additions and 1 deletions
|
|
@ -1,11 +1,12 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
#include <arch/stages.h>
|
||||
#include <soc/irq2axi.h>
|
||||
#include <soc/pcie.h>
|
||||
|
||||
void platform_romstage_main(void)
|
||||
{
|
||||
/* TODO: add romstage main function */
|
||||
irq2axi_disable();
|
||||
|
||||
if (CONFIG(PCI))
|
||||
mtk_pcie_deassert_perst();
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ bootblock-y += ../common/wdt.c ../common/wdt_req.c wdt.c
|
|||
romstage-y += ../common/cbmem.c
|
||||
romstage-$(CONFIG_PCI) += ../common/early_init.c ../common/pcie.c
|
||||
romstage-y += emi.c
|
||||
romstage-y += irq2axi.c
|
||||
romstage-y += l2c_ops.c
|
||||
romstage-y += ../common/mmu_operations.c ../common/mmu_cmops.c
|
||||
|
||||
|
|
|
|||
18
src/soc/mediatek/mt8196/include/soc/irq2axi.h
Normal file
18
src/soc/mediatek/mt8196/include/soc/irq2axi.h
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
#ifndef SOC_MEDIATEK_MT8196_IRQ2AXI_H
|
||||
#define SOC_MEDIATEK_MT8196_IRQ2AXI_H
|
||||
|
||||
#define IRQ2AXI_BASE 0x14413000
|
||||
#define IRQ2AXI_CFG1 (IRQ2AXI_BASE + 0x0004)
|
||||
|
||||
#define APIFR_AO_IO_INTX_SEC_REG 0x101C9000
|
||||
#define CIRQ_AXI_MODE (APIFR_AO_IO_INTX_SEC_REG + 0x900)
|
||||
#define CIRQ_AXI_MODE_LEGACY 0x3
|
||||
|
||||
#define MCUSYS_ACK_REG 0x0C00FFEC
|
||||
#define MCUSYS_ACK_CLR 0x1
|
||||
|
||||
void irq2axi_disable(void);
|
||||
|
||||
#endif /* SOC_MEDIATEK_MT8196_IRQ2AXI_H */
|
||||
18
src/soc/mediatek/mt8196/irq2axi.c
Normal file
18
src/soc/mediatek/mt8196/irq2axi.c
Normal file
|
|
@ -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);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue