mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-05 18:14:07 +08:00
4e34614636
The R_INTC in the A31 and newer sun8i/sun50i SoCs is more similar to the
original sun4i interrupt controller than the sun7i/sun9i NMI controller.
It is used for two distinct purposes:
- To control the trigger, latch, and mask for the NMI input pin
- To provide the interrupt input for the ARISC coprocessor
As this interrupt controller is not documented, information about it
comes from vendor-provided firmware blobs and from experimentation.
Differences from the sun4i interrupt controller appear to be:
- It only has one or two registers of each kind (max 32 or 64 IRQs)
- Multiplexing logic is added to support additional inputs
- There is no FIQ-related logic
- There is no interrupt priority logic
In order to fulfill its two purposes, this hardware block combines four
types of IRQs. First, the NMI pin is routed to the "IRQ 0" input on this
chip, with a trigger type controlled by the NMI_CTRL_REG. The "IRQ 0
pending" output from this chip, if enabled, is then routed to a SPI IRQ
input on the GIC. In other words, bit 0 of IRQ_ENABLE_REG *does* affect
the NMI IRQ seen at the GIC.
The NMI is followed by a contiguous block of 15 "direct" (my name for
them) IRQ inputs that are connected in parallel to both R_INTC and the
GIC. Or in other words, these bits of IRQ_ENABLE_REG *do not* affect the
IRQs seen at the GIC.
Following the direct IRQs are the ARISC's copy of banked IRQs for shared
peripherals. These are not relevant to Linux. The remaining IRQs are
connected to a multiplexer and provide access to the first (up to) 128
SPIs from the ARISC. This range of SPIs overlaps with the direct IRQs.
Because of the 1:1 correspondence between R_INTC and GIC inputs, this is
a perfect scenario for using a stacked irqchip driver. We want to hook
into setting the NMI trigger type, but not actually handle any IRQ here.
To allow access to all multiplexed IRQs, this driver requires a new
binding where the interrupt number matches the GIC interrupt number.
(This moves the NMI from number 0 to 32 or 96, depending on the SoC.)
For simplicity, copy the three-cell GIC binding; this disambiguates
interrupt 0 in the old binding (the NMI) from interrupt 0 in the new
binding (SPI 0) by the number of cells.
Since R_INTC is in the always-on power domain, and its output is visible
to the power management coprocessor, a stacked irqchip driver provides a
simple way to add wakeup support to any of its IRQs. That is the next
patch; for now, just the NMI is moved over.
This commit mostly reverts commit 173bda53b3
("irqchip/sunxi-nmi:
Support sun6i-a31-r-intc compatible").
Acked-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210118055040.21910-4-samuel@sholland.org
115 lines
5.4 KiB
Makefile
115 lines
5.4 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
obj-$(CONFIG_IRQCHIP) += irqchip.o
|
|
|
|
obj-$(CONFIG_AL_FIC) += irq-al-fic.o
|
|
obj-$(CONFIG_ALPINE_MSI) += irq-alpine-msi.o
|
|
obj-$(CONFIG_ATH79) += irq-ath79-cpu.o
|
|
obj-$(CONFIG_ATH79) += irq-ath79-misc.o
|
|
obj-$(CONFIG_ARCH_BCM2835) += irq-bcm2835.o
|
|
obj-$(CONFIG_ARCH_BCM2835) += irq-bcm2836.o
|
|
obj-$(CONFIG_ARCH_ACTIONS) += irq-owl-sirq.o
|
|
obj-$(CONFIG_DAVINCI_AINTC) += irq-davinci-aintc.o
|
|
obj-$(CONFIG_DAVINCI_CP_INTC) += irq-davinci-cp-intc.o
|
|
obj-$(CONFIG_EXYNOS_IRQ_COMBINER) += exynos-combiner.o
|
|
obj-$(CONFIG_FARADAY_FTINTC010) += irq-ftintc010.o
|
|
obj-$(CONFIG_ARCH_HIP04) += irq-hip04.o
|
|
obj-$(CONFIG_ARCH_LPC32XX) += irq-lpc32xx.o
|
|
obj-$(CONFIG_ARCH_MMP) += irq-mmp.o
|
|
obj-$(CONFIG_IRQ_MXS) += irq-mxs.o
|
|
obj-$(CONFIG_ARCH_TEGRA) += irq-tegra.o
|
|
obj-$(CONFIG_DW_APB_ICTL) += irq-dw-apb-ictl.o
|
|
obj-$(CONFIG_CLPS711X_IRQCHIP) += irq-clps711x.o
|
|
obj-$(CONFIG_OMPIC) += irq-ompic.o
|
|
obj-$(CONFIG_OR1K_PIC) += irq-or1k-pic.o
|
|
obj-$(CONFIG_ORION_IRQCHIP) += irq-orion.o
|
|
obj-$(CONFIG_OMAP_IRQCHIP) += irq-omap-intc.o
|
|
obj-$(CONFIG_ARCH_SUNXI) += irq-sun4i.o
|
|
obj-$(CONFIG_ARCH_SUNXI) += irq-sun6i-r.o
|
|
obj-$(CONFIG_ARCH_SUNXI) += irq-sunxi-nmi.o
|
|
obj-$(CONFIG_ARCH_SPEAR3XX) += spear-shirq.o
|
|
obj-$(CONFIG_ARM_GIC) += irq-gic.o irq-gic-common.o
|
|
obj-$(CONFIG_ARM_GIC_PM) += irq-gic-pm.o
|
|
obj-$(CONFIG_ARCH_REALVIEW) += irq-gic-realview.o
|
|
obj-$(CONFIG_ARM_GIC_V2M) += irq-gic-v2m.o
|
|
obj-$(CONFIG_ARM_GIC_V3) += irq-gic-v3.o irq-gic-v3-mbi.o irq-gic-common.o
|
|
obj-$(CONFIG_ARM_GIC_V3_ITS) += irq-gic-v3-its.o irq-gic-v3-its-platform-msi.o irq-gic-v4.o
|
|
obj-$(CONFIG_ARM_GIC_V3_ITS_PCI) += irq-gic-v3-its-pci-msi.o
|
|
obj-$(CONFIG_ARM_GIC_V3_ITS_FSL_MC) += irq-gic-v3-its-fsl-mc-msi.o
|
|
obj-$(CONFIG_PARTITION_PERCPU) += irq-partition-percpu.o
|
|
obj-$(CONFIG_HISILICON_IRQ_MBIGEN) += irq-mbigen.o
|
|
obj-$(CONFIG_ARM_NVIC) += irq-nvic.o
|
|
obj-$(CONFIG_ARM_VIC) += irq-vic.o
|
|
obj-$(CONFIG_ARMADA_370_XP_IRQ) += irq-armada-370-xp.o
|
|
obj-$(CONFIG_ATMEL_AIC_IRQ) += irq-atmel-aic-common.o irq-atmel-aic.o
|
|
obj-$(CONFIG_ATMEL_AIC5_IRQ) += irq-atmel-aic-common.o irq-atmel-aic5.o
|
|
obj-$(CONFIG_I8259) += irq-i8259.o
|
|
obj-$(CONFIG_IMGPDC_IRQ) += irq-imgpdc.o
|
|
obj-$(CONFIG_IRQ_MIPS_CPU) += irq-mips-cpu.o
|
|
obj-$(CONFIG_IXP4XX_IRQ) += irq-ixp4xx.o
|
|
obj-$(CONFIG_JCORE_AIC) += irq-jcore-aic.o
|
|
obj-$(CONFIG_RDA_INTC) += irq-rda-intc.o
|
|
obj-$(CONFIG_RENESAS_INTC_IRQPIN) += irq-renesas-intc-irqpin.o
|
|
obj-$(CONFIG_RENESAS_IRQC) += irq-renesas-irqc.o
|
|
obj-$(CONFIG_RENESAS_RZA1_IRQC) += irq-renesas-rza1.o
|
|
obj-$(CONFIG_VERSATILE_FPGA_IRQ) += irq-versatile-fpga.o
|
|
obj-$(CONFIG_ARCH_NSPIRE) += irq-zevio.o
|
|
obj-$(CONFIG_ARCH_VT8500) += irq-vt8500.o
|
|
obj-$(CONFIG_ST_IRQCHIP) += irq-st.o
|
|
obj-$(CONFIG_TB10X_IRQC) += irq-tb10x.o
|
|
obj-$(CONFIG_TS4800_IRQ) += irq-ts4800.o
|
|
obj-$(CONFIG_XTENSA) += irq-xtensa-pic.o
|
|
obj-$(CONFIG_XTENSA_MX) += irq-xtensa-mx.o
|
|
obj-$(CONFIG_XILINX_INTC) += irq-xilinx-intc.o
|
|
obj-$(CONFIG_IRQ_CROSSBAR) += irq-crossbar.o
|
|
obj-$(CONFIG_SOC_VF610) += irq-vf610-mscm-ir.o
|
|
obj-$(CONFIG_BCM6345_L1_IRQ) += irq-bcm6345-l1.o
|
|
obj-$(CONFIG_BCM7038_L1_IRQ) += irq-bcm7038-l1.o
|
|
obj-$(CONFIG_BCM7120_L2_IRQ) += irq-bcm7120-l2.o
|
|
obj-$(CONFIG_BRCMSTB_L2_IRQ) += irq-brcmstb-l2.o
|
|
obj-$(CONFIG_KEYSTONE_IRQ) += irq-keystone.o
|
|
obj-$(CONFIG_MIPS_GIC) += irq-mips-gic.o
|
|
obj-$(CONFIG_ARCH_MEDIATEK) += irq-mtk-sysirq.o irq-mtk-cirq.o
|
|
obj-$(CONFIG_ARCH_DIGICOLOR) += irq-digicolor.o
|
|
obj-$(CONFIG_RENESAS_H8300H_INTC) += irq-renesas-h8300h.o
|
|
obj-$(CONFIG_RENESAS_H8S_INTC) += irq-renesas-h8s.o
|
|
obj-$(CONFIG_ARCH_SA1100) += irq-sa11x0.o
|
|
obj-$(CONFIG_INGENIC_IRQ) += irq-ingenic.o
|
|
obj-$(CONFIG_INGENIC_TCU_IRQ) += irq-ingenic-tcu.o
|
|
obj-$(CONFIG_IMX_GPCV2) += irq-imx-gpcv2.o
|
|
obj-$(CONFIG_PIC32_EVIC) += irq-pic32-evic.o
|
|
obj-$(CONFIG_MSCC_OCELOT_IRQ) += irq-mscc-ocelot.o
|
|
obj-$(CONFIG_MVEBU_GICP) += irq-mvebu-gicp.o
|
|
obj-$(CONFIG_MVEBU_ICU) += irq-mvebu-icu.o
|
|
obj-$(CONFIG_MVEBU_ODMI) += irq-mvebu-odmi.o
|
|
obj-$(CONFIG_MVEBU_PIC) += irq-mvebu-pic.o
|
|
obj-$(CONFIG_MVEBU_SEI) += irq-mvebu-sei.o
|
|
obj-$(CONFIG_LS_EXTIRQ) += irq-ls-extirq.o
|
|
obj-$(CONFIG_LS_SCFG_MSI) += irq-ls-scfg-msi.o
|
|
obj-$(CONFIG_ARCH_ASPEED) += irq-aspeed-vic.o irq-aspeed-i2c-ic.o irq-aspeed-scu-ic.o
|
|
obj-$(CONFIG_STM32_EXTI) += irq-stm32-exti.o
|
|
obj-$(CONFIG_QCOM_IRQ_COMBINER) += qcom-irq-combiner.o
|
|
obj-$(CONFIG_IRQ_UNIPHIER_AIDET) += irq-uniphier-aidet.o
|
|
obj-$(CONFIG_ARCH_SYNQUACER) += irq-sni-exiu.o
|
|
obj-$(CONFIG_MESON_IRQ_GPIO) += irq-meson-gpio.o
|
|
obj-$(CONFIG_GOLDFISH_PIC) += irq-goldfish-pic.o
|
|
obj-$(CONFIG_NDS32) += irq-ativic32.o
|
|
obj-$(CONFIG_QCOM_PDC) += qcom-pdc.o
|
|
obj-$(CONFIG_CSKY_MPINTC) += irq-csky-mpintc.o
|
|
obj-$(CONFIG_CSKY_APB_INTC) += irq-csky-apb-intc.o
|
|
obj-$(CONFIG_RISCV_INTC) += irq-riscv-intc.o
|
|
obj-$(CONFIG_SIFIVE_PLIC) += irq-sifive-plic.o
|
|
obj-$(CONFIG_IMX_IRQSTEER) += irq-imx-irqsteer.o
|
|
obj-$(CONFIG_IMX_INTMUX) += irq-imx-intmux.o
|
|
obj-$(CONFIG_MADERA_IRQ) += irq-madera.o
|
|
obj-$(CONFIG_LS1X_IRQ) += irq-ls1x.o
|
|
obj-$(CONFIG_TI_SCI_INTR_IRQCHIP) += irq-ti-sci-intr.o
|
|
obj-$(CONFIG_TI_SCI_INTA_IRQCHIP) += irq-ti-sci-inta.o
|
|
obj-$(CONFIG_TI_PRUSS_INTC) += irq-pruss-intc.o
|
|
obj-$(CONFIG_LOONGSON_LIOINTC) += irq-loongson-liointc.o
|
|
obj-$(CONFIG_LOONGSON_HTPIC) += irq-loongson-htpic.o
|
|
obj-$(CONFIG_LOONGSON_HTVEC) += irq-loongson-htvec.o
|
|
obj-$(CONFIG_LOONGSON_PCH_PIC) += irq-loongson-pch-pic.o
|
|
obj-$(CONFIG_LOONGSON_PCH_MSI) += irq-loongson-pch-msi.o
|
|
obj-$(CONFIG_MST_IRQ) += irq-mst-intc.o
|
|
obj-$(CONFIG_SL28CPLD_INTC) += irq-sl28cpld.o
|