From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966881AbbBDPds (ORCPT ); Wed, 4 Feb 2015 10:33:48 -0500 Received: from mailapp01.imgtec.com ([195.59.15.196]:33406 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966445AbbBDPWf (ORCPT ); Wed, 4 Feb 2015 10:22:35 -0500 From: Zubair Lutfullah Kakakhel To: CC: , , , , , , , , , , , , Subject: [PATCH_V2 11/34] MIPS: jz4740: register an irq_domain for the interrupt controller Date: Wed, 4 Feb 2015 15:21:40 +0000 Message-ID: <1423063323-19419-12-git-send-email-Zubair.Kakakhel@imgtec.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1423063323-19419-1-git-send-email-Zubair.Kakakhel@imgtec.com> References: <1423063323-19419-1-git-send-email-Zubair.Kakakhel@imgtec.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [192.168.154.89] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Paul Burton When probining the interrupt controller, register an IRQ domain such that the interrupts can be translated by devicetree code & thus used from devicetree. Signed-off-by: Paul Burton Cc: Lars-Peter Clausen --- arch/mips/jz4740/irq.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/mips/jz4740/irq.c b/arch/mips/jz4740/irq.c index 9a8bda3..a620b23 100644 --- a/arch/mips/jz4740/irq.c +++ b/arch/mips/jz4740/irq.c @@ -82,6 +82,7 @@ static int __init jz4740_intc_of_init(struct device_node *node, { struct irq_chip_generic *gc; struct irq_chip_type *ct; + struct irq_domain *domain; int parent_irq; parent_irq = irq_of_parse_and_map(node, 0); @@ -110,6 +111,11 @@ 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); + domain = irq_domain_add_legacy(node, num_chips * 32, JZ4740_IRQ_BASE, 0, + &irq_domain_simple_ops, NULL); + if (!domain) + pr_warn("unable to register IRQ domain\n"); + setup_irq(parent_irq, &jz4740_cascade_action); return 0; } -- 1.9.1 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zubair Lutfullah Kakakhel Subject: [PATCH_V2 11/34] MIPS: jz4740: register an irq_domain for the interrupt controller Date: Wed, 4 Feb 2015 15:21:40 +0000 Message-ID: <1423063323-19419-12-git-send-email-Zubair.Kakakhel@imgtec.com> References: <1423063323-19419-1-git-send-email-Zubair.Kakakhel@imgtec.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: <1423063323-19419-1-git-send-email-Zubair.Kakakhel@imgtec.com> Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-subscribe: List-owner: List-post: List-archive: To: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Zubair.Kakakhel@imgtec.com, gregkh@linuxfoundation.org, mturquette@linaro.org, sboyd@codeaurora.org, ralf@linux-mips.org, jslaby@suse.cz, tglx@linutronix.de, jason@lakedaemon.net, lars@metafoo.de, paul.burton@imgtec.com List-Id: devicetree@vger.kernel.org From: Paul Burton When probining the interrupt controller, register an IRQ domain such that the interrupts can be translated by devicetree code & thus used from devicetree. Signed-off-by: Paul Burton Cc: Lars-Peter Clausen --- arch/mips/jz4740/irq.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/mips/jz4740/irq.c b/arch/mips/jz4740/irq.c index 9a8bda3..a620b23 100644 --- a/arch/mips/jz4740/irq.c +++ b/arch/mips/jz4740/irq.c @@ -82,6 +82,7 @@ static int __init jz4740_intc_of_init(struct device_node *node, { struct irq_chip_generic *gc; struct irq_chip_type *ct; + struct irq_domain *domain; int parent_irq; parent_irq = irq_of_parse_and_map(node, 0); @@ -110,6 +111,11 @@ 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); + domain = irq_domain_add_legacy(node, num_chips * 32, JZ4740_IRQ_BASE, 0, + &irq_domain_simple_ops, NULL); + if (!domain) + pr_warn("unable to register IRQ domain\n"); + setup_irq(parent_irq, &jz4740_cascade_action); return 0; } -- 1.9.1