Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751779AbbEXPTH (ORCPT ); Sun, 24 May 2015 11:19:07 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:64548 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751742AbbEXPTC (ORCPT ); Sun, 24 May 2015 11:19:02 -0400 From: Paul Burton To: CC: Paul Burton , Lars-Peter Clausen , Thomas Gleixner , Jason Cooper , Ralf Baechle , , Brian Norris Subject: [PATCH v5 12/37] MIPS: JZ4740: parse SoC interrupt controller parent IRQ from DT Date: Sun, 24 May 2015 16:11:22 +0100 Message-ID: <1432480307-23789-13-git-send-email-paul.burton@imgtec.com> X-Mailer: git-send-email 2.4.1 In-Reply-To: <1432480307-23789-1-git-send-email-paul.burton@imgtec.com> References: <1432480307-23789-1-git-send-email-paul.burton@imgtec.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [192.168.159.140] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1666 Lines: 55 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 Cc: Lars-Peter Clausen Cc: Thomas Gleixner Cc: Jason Cooper Cc: Ralf Baechle Cc: linux-mips@linux-mips.org --- Changes in v5: None Changes in v4: None Changes in v3: - New patch. Changes in v2: None arch/mips/jz4740/irq.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/mips/jz4740/irq.c b/arch/mips/jz4740/irq.c index 43e000a..ed51915 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); -- 2.4.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/