From patchwork Mon Nov 19 05:13:14 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 1764111 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id A7B553FCAE for ; Mon, 19 Nov 2012 10:46:26 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TaOoq-0002vT-EQ; Mon, 19 Nov 2012 10:43:12 +0000 Received: from kirsty.vergenet.net ([202.4.237.240]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TaJfw-0003Ao-Ct for linux-arm-kernel@lists.infradead.org; Mon, 19 Nov 2012 05:13:42 +0000 Received: from ayumi.akashicho.tokyo.vergenet.net (p4024-ipbfp1903kobeminato.hyogo.ocn.ne.jp [114.172.131.24]) by kirsty.vergenet.net (Postfix) with ESMTP id 6D48225C01C; Mon, 19 Nov 2012 16:13:36 +1100 (EST) Received: by ayumi.akashicho.tokyo.vergenet.net (Postfix, from userid 7100) id 0990EEDE63E; Mon, 19 Nov 2012 14:13:35 +0900 (JST) From: Simon Horman To: linux-sh@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [RFC 02/15] SH: intc: Add support OF of IRQ Date: Mon, 19 Nov 2012 14:13:14 +0900 Message-Id: <1353302007-31045-3-git-send-email-horms@verge.net.au> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1353302007-31045-1-git-send-email-horms@verge.net.au> References: <1353302007-31045-1-git-send-email-horms@verge.net.au> X-Bad-Reply: References and In-Reply-To but no 'Re:' in Subject. X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121119_001341_019111_5E336097 X-CRM114-Status: GOOD ( 13.93 ) X-Spam-Score: -3.3 (---) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-3.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [202.4.237.240 listed in list.dnswl.org] -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Mailman-Approved-At: Mon, 19 Nov 2012 05:36:52 -0500 Cc: Nobuhiro Iwamatsu , Simon Horman , Magnus Damm X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Nobuhiro Iwamatsu Add information of device node to struct intc_desc. Cc: Magnus Damm Signed-off-by: Nobuhiro Iwamatsu Signed-off-by: Simon Horman --- v2 [Simon Horman] * fix typo in changelog, clean up whitespace v1 [Nobuhiro Iwamatsu] --- drivers/sh/intc/core.c | 2 +- drivers/sh/intc/internals.h | 3 ++- drivers/sh/intc/irqdomain.c | 6 +++--- include/linux/sh_intc.h | 1 + 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/sh/intc/core.c b/drivers/sh/intc/core.c index 8f32a13..3963af3 100644 --- a/drivers/sh/intc/core.c +++ b/drivers/sh/intc/core.c @@ -311,7 +311,7 @@ int __init register_intc_controller(struct intc_desc *desc) BUG_ON(k > 256); /* _INTC_ADDR_E() and _INTC_ADDR_D() are 8 bits */ - intc_irq_domain_init(d, hw); + intc_irq_domain_init(d, hw, desc->of_node); /* register the vectors one by one */ for (i = 0; i < hw->nr_vectors; i++) { diff --git a/drivers/sh/intc/internals.h b/drivers/sh/intc/internals.h index 7dff08e..e6f64bf 100644 --- a/drivers/sh/intc/internals.h +++ b/drivers/sh/intc/internals.h @@ -190,7 +190,8 @@ void intc_enable_disable_enum(struct intc_desc *desc, struct intc_desc_int *d, intc_enum enum_id, int enable); /* irqdomain.c */ -void intc_irq_domain_init(struct intc_desc_int *d, struct intc_hw_desc *hw); +void intc_irq_domain_init(struct intc_desc_int *d, struct intc_hw_desc *hw, + struct device_node *of_node); /* virq.c */ void intc_subgroup_init(struct intc_desc *desc, struct intc_desc_int *d); diff --git a/drivers/sh/intc/irqdomain.c b/drivers/sh/intc/irqdomain.c index 3968f1c..22ab7af 100644 --- a/drivers/sh/intc/irqdomain.c +++ b/drivers/sh/intc/irqdomain.c @@ -42,7 +42,7 @@ static const struct irq_domain_ops intc_evt_ops = { }; void __init intc_irq_domain_init(struct intc_desc_int *d, - struct intc_hw_desc *hw) + struct intc_hw_desc *hw, struct device_node *np) { unsigned int irq_base, irq_end; @@ -59,10 +59,10 @@ void __init intc_irq_domain_init(struct intc_desc_int *d, * tree penalty for linear cases with non-zero hwirq bases. */ if (irq_base == 0 && irq_end == (irq_base + hw->nr_vectors - 1)) - d->domain = irq_domain_add_linear(NULL, hw->nr_vectors, + d->domain = irq_domain_add_linear(np, hw->nr_vectors, &intc_evt_ops, NULL); else - d->domain = irq_domain_add_tree(NULL, &intc_evt_ops, NULL); + d->domain = irq_domain_add_tree(np, &intc_evt_ops, NULL); BUG_ON(!d->domain); } diff --git a/include/linux/sh_intc.h b/include/linux/sh_intc.h index b0e7925..6603da6 100644 --- a/include/linux/sh_intc.h +++ b/include/linux/sh_intc.h @@ -118,6 +118,7 @@ struct intc_desc { intc_enum force_disable; bool skip_syscore_suspend; struct intc_hw_desc hw; + struct device_node *of_node; }; #define DECLARE_INTC_DESC(symbol, chipname, vectors, groups, \