irq domain arm updates for 3.19
Subsystems (5)
Linus,
please pull the latest irq-irqdomain-arm-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq-irqdomain-arm-for-linus
This set of changes make use of hierarchical irqdomains to provide:
- MSI/ITS support for GICv3
- MSI support for GICv2m
- Interrupt polarity extender for GICv1
Marc has come more cleanups for the existing extension hooks of GIC in the pipeline, but they are going to be 3.20 material.
Thanks,
tglx
------------------>
Jason Cooper (1):
irqchip: gic: Remove warning by including linux/irqdomain.h
Marc Zyngier (16):
arm64: PCI/MSI: Use asm-generic/msi.h
irqchip: GICv3: Convert to domain hierarchy
irqchip: GICv3: rework redistributor structure
irqchip: GICv3: ITS command queue
irqchip: GICv3: ITS: irqchip implementation
irqchip: GICv3: ITS: LPI allocator
irqchip: GICv3: ITS: tables allocators
irqchip: GICv3: ITS: device allocation and configuration
irqchip: GICv3: ITS: MSI support
irqchip: GICv3: ITS: DT probing and initialization
irqchip: GICv3: ITS: plug ITS init into main GICv3 code
irqchip: GICv3: ITS: enable compilation of the ITS driver
irqchip: GICv3: Binding updates for ITS
irqchip: gicv3-its: Fix domain free in multi-MSI case
irqchip: gicv3-its: Move some alloc/free code to activate/deactivate
irqchip: gicv3-its: Fix ITT allocation
Suravee Suthikulpanit (2):
irqchip: gic-v2m: Add support for ARM GICv2m MSI(-X) doorbell
irqchip: gic-v2m: Add DT bindings for GICv2m
Yingjoe Chen (3):
irqchip: gic: Support hierarchy irq domain.
irqchip: mtk-sysirq: Add sysirq interrupt polarity support
irqchip: mtk-sysirq: dt-bindings: Add bindings for mediatek sysirq
Documentation/devicetree/bindings/arm/gic-v3.txt | 39 + Documentation/devicetree/bindings/arm/gic.txt | 53 + .../bindings/arm/mediatek/mediatek,sysirq.txt | 28 + arch/arm64/Kconfig | 2 + arch/arm64/include/asm/Kbuild | 1 + drivers/irqchip/Kconfig | 12 + drivers/irqchip/Makefile | 3 + drivers/irqchip/irq-gic-v2m.c | 333 +++++ drivers/irqchip/irq-gic-v3-its.c | 1425 ++++++++++++++++++++ drivers/irqchip/irq-gic-v3.c | 156 ++- drivers/irqchip/irq-gic.c | 81 +- drivers/irqchip/irq-mtk-sysirq.c | 163 +++ include/linux/irqchip/arm-gic-v3.h | 128 ++ include/linux/irqchip/arm-gic.h | 4 + 14 files changed, 2364 insertions(+), 64 deletions(-) create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,sysirq.txt create mode 100644 drivers/irqchip/irq-gic-v2m.c create mode 100644 drivers/irqchip/irq-gic-v3-its.c create mode 100644 drivers/irqchip/irq-mtk-sysirq.c
Documentation/devicetree/bindings/arm/gic-v3.txt +39 -0
@@ -49,11 +49,29 @@ Optional occupied by the redistributors. Required if more than one such region is present. +Sub-nodes: + +GICv3 has one or more Interrupt Translation Services (ITS) that are +used to route Message Signalled Interrupts (MSI) to the CPUs. + +These nodes must have the following properties: +- compatible : Should at least contain "arm,gic-v3-its". +- msi-controller : Boolean property. Identifies the node as an MSI controller +- reg: Specifies the base physical address and size of the ITS + registers. + +The main GIC node must contain the appropriate #address-cells, +#size-cells and ranges properties for the reg property of all ITS +nodes. + Examples: gic: interrupt-controller@2cf00000 { compatible = "arm,gic-v3"; #interrupt-cells = <3>; + #address-cells = <2>; + #size-cells = <2>; + ranges; interrupt-controller; reg = <0x0 0x2f000000 0 0x10000>, // GICD <0x0 0x2f100000 0 0x200000>, // GICR
@@ -61,11 +79,20 @@ Examples: <0x0 0x2c010000 0 0x2000>, // GICH <0x0 0x2c020000 0 0x2000>; // GICV interrupts = <1 9 4>; + + gic-its@2c200000 { + compatible = "arm,gic-v3-its"; + msi-controller; + reg = <0x0 0x2c200000 0 0x200000>; + }; }; gic: interrupt-controller@2c010000 { compatible = "arm,gic-v3"; #interrupt-cells = <3>; + #address-cells = <2>; + #size-cells = <2>; + ranges; interrupt-controller; redistributor-stride = <0x0 0x40000>; // 256kB stride #redistributor-regions = <2>;
@@ -76,4 +103,16 @@ Examples: <0x0 0x2c060000 0 0x2000>, // GICH <0x0 0x2c080000 0 0x2000>; // GICV interrupts = <1 9 4>; + + gic-its@2c200000 { + compatible = "arm,gic-v3-its"; + msi-controller; + reg = <0x0 0x2c200000 0 0x200000>; + }; + + gic-its@2c400000 { + compatible = "arm,gic-v3-its"; + msi-controller; + reg = <0x0 0x2c400000 0 0x200000>; + }; };
Documentation/devicetree/bindings/arm/gic.txt +53 -0
56 lines not on this page · raw message
Documentation/devicetree/bindings/arm/mediatek/mediatek,sysirq.txt new file +28 -0
@@ -0,0 +1,28 @@ +Mediatek 65xx/81xx sysirq + +Mediatek SOCs sysirq support controllable irq inverter for each GIC SPI +interrupt. + +Required properties: +- compatible: should be one of: + "mediatek,mt8135-sysirq" + "mediatek,mt8127-sysirq" + "mediatek,mt6589-sysirq" + "mediatek,mt6582-sysirq" + "mediatek,mt6577-sysirq" +- interrupt-controller : Identifies the node as an interrupt controller +- #interrupt-cells : Use the same format as specified by GIC in + Documentation/devicetree/bindings/arm/gic.txt +- interrupt-parent: phandle of irq parent for sysirq. The parent must + use the same interrupt-cells format as GIC. +- reg: Physical base address of the intpol registers and length of memory + mapped region. + +Example: + sysirq: interrupt-controller@10200100 { + compatible = "mediatek,mt6589-sysirq", "mediatek,mt6577-sysirq"; + interrupt-controller; + #interrupt-cells = <3>; + interrupt-parent = <&gic>; + reg = <0 0x10200100 0 0x1c>; + };
arch/arm64/Kconfig +2 -0
@@ -12,7 +12,9 @@ config ARM64 select ARM_ARCH_TIMER select ARM_GIC select AUDIT_ARCH_COMPAT_GENERIC + select ARM_GIC_V2M if PCI_MSI select ARM_GIC_V3 + select ARM_GIC_V3_ITS if PCI_MSI select BUILDTIME_EXTABLE_SORT select CLONE_BACKWARDS select COMMON_CLK
arch/arm64/include/asm/Kbuild +1 -0
@@ -28,6 +28,7 @@ generic-y += local64.h generic-y += mcs_spinlock.h generic-y += mman.h generic-y += msgbuf.h +generic-y += msi.h generic-y += mutex.h generic-y += pci.h generic-y += pci-bridge.h
drivers/irqchip/Kconfig +12 -0
@@ -5,8 +5,15 @@ config IRQCHIP config ARM_GIC bool select IRQ_DOMAIN + select IRQ_DOMAIN_HIERARCHY select MULTI_IRQ_HANDLER +config ARM_GIC_V2M + bool + depends on ARM_GIC + depends on PCI && PCI_MSI + select PCI_MSI_IRQ_DOMAIN + config GIC_NON_BANKED bool
@@ -14,6 +21,11 @@ config ARM_GIC_V3 bool select IRQ_DOMAIN select MULTI_IRQ_HANDLER + select IRQ_DOMAIN_HIERARCHY + +config ARM_GIC_V3_ITS + bool + select PCI_MSI_IRQ_DOMAIN config ARM_NVIC bool
drivers/irqchip/Makefile +3 -0
@@ -19,7 +19,9 @@ obj-$(CONFIG_ARCH_SUNXI) += irq-sun4i.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_V2M) += irq-gic-v2m.o obj-$(CONFIG_ARM_GIC_V3) += irq-gic-v3.o irq-gic-common.o +obj-$(CONFIG_ARM_GIC_V3_ITS) += irq-gic-v3-its.o obj-$(CONFIG_ARM_NVIC) += irq-nvic.o obj-$(CONFIG_ARM_VIC) += irq-vic.o obj-$(CONFIG_ATMEL_AIC_IRQ) += irq-atmel-aic-common.o irq-atmel-aic.o
@@ -38,3 +40,4 @@ obj-$(CONFIG_IRQ_CROSSBAR) += irq-crossbar.o obj-$(CONFIG_BRCMSTB_L2_IRQ) += irq-brcmstb-l2.o \ irq-bcm7120-l2.o obj-$(CONFIG_KEYSTONE_IRQ) += irq-keystone.o +obj-$(CONFIG_ARCH_MEDIATEK) += irq-mtk-sysirq.o
drivers/irqchip/irq-gic-v2m.c new file +333 -0
333 lines not on this page · raw message
drivers/irqchip/irq-gic-v3-its.c new file +1425 -0
1,425 lines not on this page · raw message
drivers/irqchip/irq-gic-v3.c +116 -40
301 lines not on this page · raw message
drivers/irqchip/irq-gic.c +57 -24
124 lines not on this page · raw message
drivers/irqchip/irq-mtk-sysirq.c new file +163 -0
163 lines not on this page · raw message
include/linux/irqchip/arm-gic-v3.h +128 -0
164 lines not on this page · raw message
include/linux/irqchip/arm-gic.h +4 -0
@@ -91,6 +91,8 @@#ifndef __ASSEMBLY__ +#include <linux/irqdomain.h> +struct device_node ;extern struct irq_chip gic_arch_extn;
@@ -106,6 +108,8 @@ static inline void gic_init(unsigned int nr, int start,gic_init_bases (nr, start, dist, cpu,0 ,NULL ); } +int gicv2m_of_init (struct device_node *node,struct irq_domain *parent); +void gic_send_sgi (unsigned int cpu_id,unsigned int irq);int gic_get_cpu_id (unsigned int cpu);void gic_migrate_target (unsigned int new_cpu_id);