ARM: sun7i/sun6i: irqchip: Irqchip driver for NMI controller
v7 cover ARM: sun7i/sun6i: irqchip: Irqchip driver for NMI controller
Allwinner A20/A31 SoCs have a special interrupt controller for managing NMI. Three register are present to (un)mask, control and acknowledge NMI. These two patches add a new irqchip driver in cascade with GIC.
Changes since v1:
- added binding document
Changes since v2:
- fixed trigger type in DTS
- new explanations in binding documentation
- added support for A31 (sun6i)
Changes since v3:
- changed compatibles
Changes since v4:
- fixed binding documentation
Changes since v5:
- switched to handle_fasteoi_irq handler to avoid the double interrupts issue
Changes since v6:
- changed node name
- deleted defaulted interrupt-parent property
Carlo Caione (3):
ARM: sun7i/sun6i: irqchip: Add irqchip driver for NMI controller
ARM: sun7i/sun6i: dts: Add NMI irqchip support
ARM: sun7i/sun6i: irqchip: Update the documentation
.../allwinner,sun67i-sc-nmi.txt | 27 +++ arch/arm/boot/dts/sun6i-a31.dtsi | 8 + arch/arm/boot/dts/sun7i-a20.dtsi | 8 + drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-sunxi-nmi.c | 208 +++++++++++++++++++++ 5 files changed, 252 insertions(+) create mode 100644 Documentation/devicetree/bindings/interrupt-controller/allwinner,sun67i-sc-nmi.txt create mode 100644 drivers/irqchip/irq-sunxi-nmi.c
Signature · 1 line
1.8.3.2
PATCH v7 1/3 ARM: sun7i/sun6i: irqchip: Add irqchip driver for NMI controller
Allwinner A20/A31 SoCs have special registers to control / (un)mask / acknowledge NMI. This NMI controller is separated and independent from GIC. This patch adds a new irqchip to manage NMI.
--- drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-sunxi-nmi.c | 208 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 209 insertions(+) create mode 100644 drivers/irqchip/irq-sunxi-nmi.c
drivers/irqchip/Makefile +1 -0
@@ -12,6 +12,7 @@ obj-$(CONFIG_METAG_PERFCOUNTER_IRQS) += irq-metag.o obj-$(CONFIG_ARCH_MOXART) += irq-moxart.o obj-$(CONFIG_ORION_IRQCHIP) += irq-orion.o 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 obj-$(CONFIG_ARM_NVIC) += irq-nvic.o
drivers/irqchip/irq-sunxi-nmi.c new file +208 -0
208 lines not on this page · raw message
Signature · 1 line
1.8.3.2
tip-bot for Carlo Caione
merge bot[tip:irq/core] ARM: sun7i/sun6i: irqchip: Add irqchip driver for NMI controller
ARM: sun7i/sun6i: irqchip: Add irqchip driver for NMI controller
Commit-ID: 6058bb362818e09990de722e983a7f2874e7f61c Gitweb: http://git.kernel.org/tip/6058bb362818e09990de722e983a7f2874e7f61c Author: Carlo Caione <[email protected]> AuthorDate: Wed, 19 Mar 2014 20:21:17 +0100 Committer: Thomas Gleixner <[email protected]> CommitDate: Wed, 26 Mar 2014 01:00:50 +0100
ARM: sun7i/sun6i: irqchip: Add irqchip driver for NMI controller
Allwinner A20/A31 SoCs have special registers to control / (un)mask / acknowledge NMI. This NMI controller is separated and independent from GIC. This patch adds a new irqchip to manage NMI.
--- drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-sunxi-nmi.c | 208 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 209 insertions(+)
drivers/irqchip/Makefile +1 -0
@@ -12,6 +12,7 @@ obj-$(CONFIG_METAG_PERFCOUNTER_IRQS) += irq-metag.o obj-$(CONFIG_ARCH_MOXART) += irq-moxart.o obj-$(CONFIG_ORION_IRQCHIP) += irq-orion.o 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 obj-$(CONFIG_ARM_NVIC) += irq-nvic.o
drivers/irqchip/irq-sunxi-nmi.c new file +208 -0
208 lines not on this page · raw message
PATCH v7 2/3 ARM: sun7i/sun6i: dts: Add NMI irqchip support
In reply to Carlo CaioneThis patch adds DTS entries for NMI controller as child of GIC.
--- arch/arm/boot/dts/sun6i-a31.dtsi | 8 ++++++++ arch/arm/boot/dts/sun7i-a20.dtsi | 8 ++++++++ 2 files changed, 16 insertions(+)
arch/arm/boot/dts/sun6i-a31.dtsi +8 -0
@@ -190,6 +190,14 @@ #size-cells = <1>; ranges; + nmi_intc: interrupt-controller at 01f00c0c { + compatible = "allwinner,sun6i-a31-sc-nmi"; + interrupt-controller; + #interrupt-cells = <2>; + reg = <0x01f00c0c 0x38>; + interrupts = <0 0 4>; + }; + pio: pinctrl at 01c20800 { compatible = "allwinner,sun6i-a31-pinctrl"; reg = <0x01c20800 0x400>;
arch/arm/boot/dts/sun7i-a20.dtsi +8 -0
@@ -339,6 +339,14 @@ #size-cells = <1>; ranges; + nmi_intc: interrupt-controller at 01c00030 { + compatible = "allwinner,sun7i-a20-sc-nmi"; + interrupt-controller; + #interrupt-cells = <2>; + reg = <0x01c00030 0x0c>; + interrupts = <0 0 4>; + }; + emac: ethernet at 01c0b000 { compatible = "allwinner,sun4i-a10-emac"; reg = <0x01c0b000 0x1000>;
Signature · 1 line
1.8.3.2
PATCH v7 2/3 ARM: sun7i/sun6i: dts: Add NMI irqchip support
Quoted 3 lines · Carlo Caione
This patch adds DTS entries for NMI controller as child of GIC.
Signed-off-by Carlo Caione <[email protected]>
Thanks!
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140320/d05165f9/attachment.sig>
tip-bot for Carlo Caione
merge bot[tip:irq/core] ARM: sun7i/sun6i: dts: Add NMI irqchip support
In reply to Carlo CaioneARM: sun7i/sun6i: dts: Add NMI irqchip support
Commit-ID: 8ff973a26763ef2f2d45c1649c618dfff528a502 Gitweb: http://git.kernel.org/tip/8ff973a26763ef2f2d45c1649c618dfff528a502 Author: Carlo Caione <[email protected]> AuthorDate: Wed, 19 Mar 2014 20:21:18 +0100 Committer: Thomas Gleixner <[email protected]> CommitDate: Wed, 26 Mar 2014 01:00:50 +0100
ARM: sun7i/sun6i: dts: Add NMI irqchip support
This patch adds DTS entries for NMI controller as child of GIC.
--- arch/arm/boot/dts/sun6i-a31.dtsi | 8 ++++++++ arch/arm/boot/dts/sun7i-a20.dtsi | 8 ++++++++ 2 files changed, 16 insertions(+)
arch/arm/boot/dts/sun6i-a31.dtsi +8 -0
@@ -190,6 +190,14 @@ #size-cells = <1>; ranges; + nmi_intc: interrupt-controller@01f00c0c { + compatible = "allwinner,sun6i-a31-sc-nmi"; + interrupt-controller; + #interrupt-cells = <2>; + reg = <0x01f00c0c 0x38>; + interrupts = <0 0 4>; + }; + pio: pinctrl@01c20800 { compatible = "allwinner,sun6i-a31-pinctrl"; reg = <0x01c20800 0x400>;
arch/arm/boot/dts/sun7i-a20.dtsi +8 -0
@@ -339,6 +339,14 @@ #size-cells = <1>; ranges; + nmi_intc: interrupt-controller@01c00030 { + compatible = "allwinner,sun7i-a20-sc-nmi"; + interrupt-controller; + #interrupt-cells = <2>; + reg = <0x01c00030 0x0c>; + interrupts = <0 0 4>; + }; + emac: ethernet@01c0b000 { compatible = "allwinner,sun4i-a10-emac"; reg = <0x01c0b000 0x1000>;
PATCH v7 2/3 ARM: sun7i/sun6i: dts: Add NMI irqchip support
In reply to Carlo CaioneHi,
Quoted 3 lines · Carlo Caione
This patch adds DTS entries for NMI controller as child of GIC.
Signed-off-by Carlo Caione <[email protected]>
Note this breaks the kernel on sun6i / A31 since we don't have a pmic driver there yet, and thus the nmi gets constantly fired without anything clearing it.
So the sun6i section needs a status = "disabled"; until we actually have pmic support.
Regards,
Hans
Quoted 44 lines
--- arch/arm/boot/dts/sun6i-a31.dtsi | 8 ++++++++ arch/arm/boot/dts/sun7i-a20.dtsi | 8 ++++++++ 2 files changed, 16 insertions(+)arch/arm/boot/dts/sun6i-a31.dtsi +8
-0@@ -190,6 +190,14 @@ #size-cells = <1>; ranges; + nmi_intc: interrupt-controller at 01f00c0c { + compatible = "allwinner,sun6i-a31-sc-nmi"; + interrupt-controller; + #interrupt-cells = <2>; + reg = <0x01f00c0c 0x38>; + interrupts = <0 0 4>; + }; + pio: pinctrl at 01c20800 { compatible = "allwinner,sun6i-a31-pinctrl"; reg = <0x01c20800 0x400>;arch/arm/boot/dts/sun7i-a20.dtsi +8
-0@@ -339,6 +339,14 @@ #size-cells = <1>; ranges; + nmi_intc: interrupt-controller at 01c00030 { + compatible = "allwinner,sun7i-a20-sc-nmi"; + interrupt-controller; + #interrupt-cells = <2>; + reg = <0x01c00030 0x0c>; + interrupts = <0 0 4>; + }; + emac: ethernet at 01c0b000 { compatible = "allwinner,sun4i-a10-emac"; reg = <0x01c0b000 0x1000>;
PATCH v7 2/3 ARM: sun7i/sun6i: dts: Add NMI irqchip support
Quoted 5 lines · Hans de Goede
Hi,
Quoted 2 lines · Carlo Caione
This patch adds DTS entries for NMI controller as child of GIC.
Quoted 8 lines
Quoted 1 line
Signed-off-by Carlo Caione <[email protected]>Note this breaks the kernel on sun6i / A31 since we don't have a pmic driver there yet, and thus the nmi gets constantly fired without anything clearing it.
So the sun6i section needs a status = "disabled"; until we actually have pmic support.
I guess it also applies to the A20, since the PMIC patches will probably get merged later on?
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140326/27964565/attachment.sig>
PATCH v7 2/3 ARM: sun7i/sun6i: dts: Add NMI irqchip support
Hi,
Quoted 12 lines · Maxime Ripard
Quoted 11 lines · Hans de Goede
Hi,
Quoted 3 lines · Carlo Caione
This patch adds DTS entries for NMI controller as child of GIC.
Signed-off-by Carlo Caione <[email protected]>Note this breaks the kernel on sun6i / A31 since we don't have a pmic driver there yet, and thus the nmi gets constantly fired without anything clearing it.
Quoted 5 lines
Quoted 2 lines
So the sun6i section needs a status = "disabled"; until we actually have pmic support.
I guess it also applies to the A20, since the PMIC patches will probably get merged later on?
Could be I've never tried it on the A20 without also having the pmic driver build into the kernel. Thinking more about this, I think this actually is a bug in the nmi irqchip driver, it should not unmask the gic irq until it gets an unmask for its child irq itself.
Otherwise we can still get the same problem if ie the pmic driver is a module, etc.
Hmm, looking at the code I see that it already masks (sets enable to 0) the irq in sunxi_sc_nmi_irq_init. Note that this really should be done before the irq_set_chained_handler call though, as from then on the gic irq is unmasked, so we may get spurious irqs until the sunxi_sc_nmi_write calls are done.
I don't think this will solve the A31 problem though, I wonder if the enable reg-offset we've for the A31 is correct, maybe it should be 8 like with the A20 ?
I'll give this a try when I can find some time for this.
Regards,
Hans
PATCH v7 2/3 ARM: sun7i/sun6i: dts: Add NMI irqchip support
Hi,
Quoted 35 lines · Hans de Goede
Hi,
Quoted 12 lines · Maxime Ripard
Quoted 11 lines · Hans de Goede
Hi,
Quoted 3 lines · Carlo Caione
This patch adds DTS entries for NMI controller as child of GIC.
Signed-off-by Carlo Caione <[email protected]>Note this breaks the kernel on sun6i / A31 since we don't have a pmic driver there yet, and thus the nmi gets constantly fired without anything clearing it.
Quoted 5 lines
Quoted 2 lines
So the sun6i section needs a status = "disabled"; until we actually have pmic support.
I guess it also applies to the A20, since the PMIC patches will probably get merged later on?
Could be I've never tried it on the A20 without also having the pmic driver build into the kernel. Thinking more about this, I think this actually is a bug in the nmi irqchip driver, it should not unmask the gic irq until it gets an unmask for its child irq itself.
Otherwise we can still get the same problem if ie the pmic driver is a module, etc.
Hmm, looking at the code I see that it already masks (sets enable to 0) the irq in
sunxi_sc_nmi_irq_init. Note that this really should be done before theirq_set_chained_handlercall though, as from then on the gic irq is unmasked, so we may get spurious irqs until thesunxi_sc_nmi_writecalls are done.
Quoted 5 lines
I don't think this will solve the A31 problem though, I wonder if the enable reg-offset we've for the A31 is correct, maybe it should be 8 like with the A20 ?
I'll give this a try when I can find some time for this.
Ok, so I've spend some time debugging this, and the problem is not the disabling of the NMI in the NMI controller itself. The problem is that the irq line used in the sun6i-a31.dtsi is wrong, irq 0 is for uart0 the nmi uses irq 32. So this fixes this hang due to unhandled irqs I've been seeing:
arch/arm/boot/dts/sun6i-a31.dtsi +1 -2
@@ -603,8 +603,7 @@ interrupt-controller; #interrupt-cells = <2>; reg = <0x01f00c0c 0x38>; - interrupt-parent = <&gic>; - interrupts = <0 0 4>; + interrupts = <0 32 4>; }; cpucfg at 01f01c00 {
Note I also remove the interrupt-parent as the gic is the default interrupt-parent, and we don't explicitly set that anywhere else either.
Besides that after having looked into this more, I strongly believe that we should disable the NMI before registering the irq handler, as registering the irq handler unmasks the irq on the gic, so if u-boot has left the NMI enabled, and the NMI pin is active we will immediately get an interrupt, before any driver has claimed the downstream interrupt of the NMI.
IOW I strongly believe we should do this:
drivers/irqchip/irq-sunxi-nmi.c +3 -3
@@ -179,12 +179,12 @@ static int __init sunxi_sc_nmi_irq_init(struct device_node *node, gc->chip_types[1 ].regs.type = reg_offs->ctrl; gc->chip_types[1 ].handler = handle_edge_irq; -irq_set_handler_data (irq, domain); -irq_set_chained_handler (irq, sunxi_sc_nmi_handle_irq); -sunxi_sc_nmi_write (gc, reg_offs->enable,0 );sunxi_sc_nmi_write (gc, reg_offs->pend,0x1 ); +irq_set_handler_data (irq, domain); +irq_set_chained_handler (irq, sunxi_sc_nmi_handle_irq); +return 0 ; fail_irqd_remove:
So it looks like we need a v8, sorry for not spotting this sooner.
Regards,
Hans
PATCH v7 2/3 ARM: sun7i/sun6i: dts: Add NMI irqchip support
Quoted 1 line · Hans de Goede
Hi,
Hi Hans,
Quoted 40 lines · Hans de Goede
Quoted 39 lines
Hi,
Quoted 12 lines · Maxime Ripard
Quoted 11 lines · Hans de Goede
Hi,
Quoted 3 lines · Carlo Caione
This patch adds DTS entries for NMI controller as child of GIC.
Signed-off-by Carlo Caione <[email protected]>Note this breaks the kernel on sun6i / A31 since we don't have a pmic driver there yet, and thus the nmi gets constantly fired without anything clearing it.
Quoted 5 lines
Quoted 2 lines
So the sun6i section needs a status = "disabled"; until we actually have pmic support.
I guess it also applies to the A20, since the PMIC patches will probably get merged later on?
Could be I've never tried it on the A20 without also having the pmic driver build into the kernel. Thinking more about this, I think this actually is a bug in the nmi irqchip driver, it should not unmask the gic irq until it gets an unmask for its child irq itself.
Otherwise we can still get the same problem if ie the pmic driver is a module, etc.
Hmm, looking at the code I see that it already masks (sets enable to 0) the irq in
sunxi_sc_nmi_irq_init. Note that this really should be done before theirq_set_chained_handlercall though, as from then on the gic irq is unmasked, so we may get spurious irqs until thesunxi_sc_nmi_writecalls are done.I don't think this will solve the A31 problem though, I wonder if the enable reg-offset we've for the A31 is correct, maybe it should be 8 like with the A20 ?
Quoted 6 lines
Quoted 1 line
I'll give this a try when I can find some time for this.
Ok, so I've spend some time debugging this, and the problem is not the disabling of the NMI in the NMI controller itself. The problem is that the irq line used in the
sun6i-a31.dtsiis wrong, irq 0 is for uart0 the nmi uses irq 32. So this fixes this hang due to unhandled irqs
Unfortunately I don't have a A31 board so I couldn't test it :( sorry for this mess.
I have tried with my Cubieboard2 and it seems that I don't have any IRQs storm when the PMIC is not compiled in.
Quoted 5 lines
I've been seeing:
arch/arm/boot/dts/sun6i-a31.dtsi line 609
Quoted 9 lines
arch/arm/boot/dts/sun6i-a31.dtsi +1
-2@@ -603,8 +603,7 @@ interrupt-controller; #interrupt-cells = <2>; reg = <0x01f00c0c 0x38>; - interrupt-parent = <&gic>; - interrupts = <0 0 4>; + interrupts = <0 32 4>; }; cpucfg at 01f01c00 {
Agree. I'll fix it.
Quoted 3 lines
Note I also remove the interrupt-parent as the gic is the default interrupt-parent, and we don't explicitly set that anywhere else either.
Uhm, actually I removed it in v6. Probably you are looking at the wrong version.
Quoted 17 lines
Besides that after having looked into this more, I strongly believe that we should disable the NMI before registering the irq handler, as registering the irq handler unmasks the irq on the gic, so if u-boot has left the NMI enabled, and the NMI pin is active we will immediately get an interrupt, before any driver has claimed the downstream interrupt of the NMI.
IOW I strongly believe we should do this:
drivers/irqchip/irq-sunxi-nmi.c +0
-2@@ -179,12 +179,12 @@ static int __init sunxi_sc_nmi_irq_init(struct device_node *node, gc->chip_types[1 ].regs.type = reg_offs->ctrl; gc->chip_types[1 ].handler = handle_edge_irq; -irq_set_handler_data (irq, domain); -irq_set_chained_handler (irq, sunxi_sc_nmi_handle_irq);
drivers/irqchip/irq-sunxi-nmi.c static int __init sunxi_sc_nmi_irq_init(struct device_node *node, · line 190
Quoted 10 lines
drivers/irqchip/irq-sunxi-nmi.c +3
-1-sunxi_sc_nmi_write (gc, reg_offs->enable,0 );sunxi_sc_nmi_write (gc, reg_offs->pend,0x1 ); +irq_set_handler_data (irq, domain); +irq_set_chained_handler (irq, sunxi_sc_nmi_handle_irq); +return 0 ; fail_irqd_remove:
ACK
Quoted 2 lines
So it looks like we need a v8, sorry for not spotting this sooner.
My bad for not having tested it enough.
Thank you,
Signature · 1 line
Carlo Caione
PATCH v7 3/3 ARM: sun7i/sun6i: irqchip: Update the documentation
In reply to Carlo CaioneAdded documentation for NMI irqchip.
--- .../allwinner,sun67i-sc-nmi.txt | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Documentation/devicetree/bindings/interrupt-controller/allwinner,sun67i-sc-nmi.txt
Documentation/devicetree/bindings/interrupt-controller/allwinner,sun67i-sc-nmi.txt new file +27 -0
@@ -0,0 +1,27 @@ +Allwinner Sunxi NMI Controller +============================== + +Required properties: + +- compatible : should be "allwinner,sun7i-a20-sc-nmi" or + "allwinner,sun6i-a31-sc-nmi" +- reg : Specifies base physical address and size of the registers. +- interrupt-controller : Identifies the node as an interrupt controller +- #interrupt-cells : Specifies the number of cells needed to encode an + interrupt source. The value shall be 2. The first cell is the IRQ number, the + second cell the trigger type as defined in interrupt.txt in this directory. +- interrupt-parent: Specifies the parent interrupt controller. +- interrupts: Specifies the interrupt line (NMI) which is handled by + the interrupt controller in the parent controller's notation. This value + shall be the NMI. + +Example: + +sc-nmi-intc at 01c00030 { + compatible = "allwinner,sun7i-a20-sc-nmi"; + interrupt-controller; + #interrupt-cells = <2>; + reg = <0x01c00030 0x0c>; + interrupt-parent = <&gic>; + interrupts = <0 0 4>; +};
Signature · 1 line
1.8.3.2
PATCH v7 3/3 ARM: sun7i/sun6i: irqchip: Update the documentation
Quoted 3 lines · Carlo Caione
Added documentation for NMI irqchip.
Signed-off-by Carlo Caione <[email protected]>
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140320/ea0e14ce/attachment-0001.sig>
tip-bot for Carlo Caione
merge bot[tip:irq/core] ARM: sun7i/sun6i: irqchip: Update the documentation
In reply to Carlo CaioneARM: sun7i/sun6i: irqchip: Update the documentation
Commit-ID: ae7d9d3245b7ced5c6f615cfef1250226d518436 Gitweb: http://git.kernel.org/tip/ae7d9d3245b7ced5c6f615cfef1250226d518436 Author: Carlo Caione <[email protected]> AuthorDate: Wed, 19 Mar 2014 20:21:19 +0100 Committer: Thomas Gleixner <[email protected]> CommitDate: Wed, 26 Mar 2014 01:00:50 +0100
ARM: sun7i/sun6i: irqchip: Update the documentation
Add documentation for NMI irqchip.
--- .../allwinner,sun67i-sc-nmi.txt | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+)
Documentation/devicetree/bindings/interrupt-controller/allwinner,sun67i-sc-nmi.txt new file +27 -0
@@ -0,0 +1,27 @@ +Allwinner Sunxi NMI Controller +============================== + +Required properties: + +- compatible : should be "allwinner,sun7i-a20-sc-nmi" or + "allwinner,sun6i-a31-sc-nmi" +- reg : Specifies base physical address and size of the registers. +- interrupt-controller : Identifies the node as an interrupt controller +- #interrupt-cells : Specifies the number of cells needed to encode an + interrupt source. The value shall be 2. The first cell is the IRQ number, the + second cell the trigger type as defined in interrupt.txt in this directory. +- interrupt-parent: Specifies the parent interrupt controller. +- interrupts: Specifies the interrupt line (NMI) which is handled by + the interrupt controller in the parent controller's notation. This value + shall be the NMI. + +Example: + +sc-nmi-intc@01c00030 { + compatible = "allwinner,sun7i-a20-sc-nmi"; + interrupt-controller; + #interrupt-cells = <2>; + reg = <0x01c00030 0x0c>; + interrupt-parent = <&gic>; + interrupts = <0 0 4>; +};
v7 cover ARM: sun7i/sun6i: irqchip: Irqchip driver for NMI controller
In reply to Carlo CaioneQuoted 3 lines · Carlo Caione
Allwinner A20/A31 SoCs have a special interrupt controller for managing NMI. Three register are present to (un)mask, control and acknowledge NMI. These two patches add a new irqchip driver in cascade with GIC.
Hi Thomas,
Is this ok with the Maxime ACKs?
Signature · 1 line
Carlo Caione