From patchwork Thu Nov 22 07:59:59 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nobuhiro Iwamatsu X-Patchwork-Id: 1786481 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 348CB3FC23 for ; Thu, 22 Nov 2012 19:28:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755972Ab2KVT23 (ORCPT ); Thu, 22 Nov 2012 14:28:29 -0500 Received: from mail-da0-f46.google.com ([209.85.210.46]:63630 "EHLO mail-da0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755687Ab2KVT21 (ORCPT ); Thu, 22 Nov 2012 14:28:27 -0500 Received: by mail-da0-f46.google.com with SMTP id p5so2313731dak.19 for ; Thu, 22 Nov 2012 11:28:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=Yf4x4K4SyzOkhR+QYc107gmXVR7r3kmYSc33q3hBA/U=; b=IxuoNHWLgY2UCsnpbDMyQMq0qER6mRWH9VAj+8svNgA+eA5/DGhs1bzMGnwIPqgVRF 4fAk5kGjI3vXTQ/upZGRD74XfLxTiKR/o7BhvbyJ4NbqKU54/l1mIlPkM21Tf+Eff+Xs rh0GPQtNyZ4rcq6dzctXQ94CxHbPQyFRW6DBOwPcJjZqg48UtvWfWMs/vZpG8M4vHDaX LLnI/L254Dlkrr+xXkyu45XxNfRgyVNToXXSrAf8GZMLExSw9PpZCrNaXC85M2x5t+d3 XQupOyfPUF81uEXN3jdKOZFPxAcereLmUtUD9l0Foh90KCQOLSF3HhmsHVwptFwHyARp Gn0Q== Received: by 10.66.76.10 with SMTP id g10mr17895328paw.80.1353571229523; Thu, 22 Nov 2012 00:00:29 -0800 (PST) Received: from xps-iwamatsu.renesas.com (49.14.32.202.bf.2iij.net. [202.32.14.49]) by mx.google.com with ESMTPS id s1sm1507624paz.0.2012.11.22.00.00.27 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 22 Nov 2012 00:00:28 -0800 (PST) From: Nobuhiro Iwamatsu To: linux-sh@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: magnus.damm@gmail.com, horms@verge.net.au, Nobuhiro Iwamatsu , Magnus Damm Subject: [PATCH v5 02/15] SH: intc: Add support OF of IRQ Date: Thu, 22 Nov 2012 16:59:59 +0900 Message-Id: <1353571213-26006-3-git-send-email-nobuhiro.iwamatsu.yj@renesas.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1353571213-26006-1-git-send-email-nobuhiro.iwamatsu.yj@renesas.com> References: <1353571213-26006-1-git-send-email-nobuhiro.iwamatsu.yj@renesas.com> X-Gm-Message-State: ALoCoQlRyWddw7e2aOaKbBkL1MLpDwy5MNgfSf9nl6r1OY1qcemZVormXjhJ2l8/3I45IDR42ZFR Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org 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, \