summaryrefslogtreecommitdiffstats
path: root/arch/mips/jz4740
diff options
context:
space:
mode:
authorPaul Burton <paul.burton@imgtec.com>2015-05-24 16:11:22 +0100
committerRalf Baechle <ralf@linux-mips.org>2015-06-21 21:52:59 +0200
commit69ce4b2288d22ad23b8ceeb8c238fcc58a7e5089 (patch)
treef9edcea8a2a44972acc3831d7eb1180da239e70b /arch/mips/jz4740
parentadbdce77ccc345e6ae86f6887212af13983a626e (diff)
downloadlinux-stable-69ce4b2288d22ad23b8ceeb8c238fcc58a7e5089.tar.gz
linux-stable-69ce4b2288d22ad23b8ceeb8c238fcc58a7e5089.tar.bz2
linux-stable-69ce4b2288d22ad23b8ceeb8c238fcc58a7e5089.zip
MIPS: JZ4740: parse SoC interrupt controller parent IRQ from DT
Rather than hardcoding the IRQ number used to cascade interrupts from the SoC interrupt controller to the CPU interrupt controller, read that IRQ number from the DT describing the system. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Jason Cooper <jason@lakedaemon.net> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: Brian Norris <computersforpeace@gmail.com> Patchwork: https://patchwork.linux-mips.org/patch/10137/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/jz4740')
-rw-r--r--arch/mips/jz4740/irq.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/mips/jz4740/irq.c b/arch/mips/jz4740/irq.c
index 43e000aa8a2e..ed5191569b95 100644
--- a/arch/mips/jz4740/irq.c
+++ b/arch/mips/jz4740/irq.c
@@ -85,6 +85,11 @@ static int __init jz4740_intc_of_init(struct device_node *node,
{
struct irq_chip_generic *gc;
struct irq_chip_type *ct;
+ int parent_irq;
+
+ parent_irq = irq_of_parse_and_map(node, 0);
+ if (!parent_irq)
+ return -EINVAL;
jz_intc_base = ioremap(JZ4740_INTC_BASE_ADDR, 0x14);
@@ -108,7 +113,7 @@ static int __init jz4740_intc_of_init(struct device_node *node,
irq_setup_generic_chip(gc, IRQ_MSK(32), 0, 0, IRQ_NOPROBE | IRQ_LEVEL);
- setup_irq(2, &jz4740_cascade_action);
+ setup_irq(parent_irq, &jz4740_cascade_action);
return 0;
}
IRQCHIP_DECLARE(jz4740_intc, "ingenic,jz4740-intc", jz4740_intc_of_init);