From: horms@verge.net.au (Simon Horman)
To: 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 [thread overview]
Message-ID: <1353302007-31045-3-git-send-email-horms@verge.net.au> (raw)
In-Reply-To: <1353302007-31045-1-git-send-email-horms@verge.net.au>
From: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Add information of device node to struct intc_desc.
Cc: Magnus Damm <damm@opensource.se>
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
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, \
--
1.7.10.4
next prev parent reply other threads:[~2012-11-19 5:13 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-19 5:13 [RFC 00/15 v4] shmobile DT initialisation of INTC and GIC Simon Horman
2012-11-19 5:13 ` [RFC 01/15] ARM: mach-shmobile: Add support OF for INTC of shmobile Simon Horman
2012-11-19 5:13 ` Simon Horman [this message]
2012-11-19 5:13 ` [RFC 03/15] ARM: mach-shmobile: Add support OF of INTC for r8a7740 Simon Horman
2012-11-19 5:13 ` [RFC 04/15] ARM: mach-shmobile: Add support OF of INTC for sh73a0 Simon Horman
2012-11-19 5:13 ` [RFC 05/15] ARM: mach-shmobile: Add support OF of INTC for sh7372 Simon Horman
2012-11-19 5:13 ` [RFC 06/15] ARM: mach-shmobile: Add DT table of INTC for sh73a0 Simon Horman
2012-11-19 5:13 ` [RFC 07/15] ARM: mach-shmobile: Add DT table of INTC for sh7372 Simon Horman
2012-11-19 5:13 ` [RFC 08/15] ARM: mach-shmobile: Add DT table of INTC for r8a7740 Simon Horman
2012-11-19 5:13 ` [RFC 09/15] ARM: shmobile: Include DTSI of r8a7740 to armadillo800eva Simon Horman
2012-11-20 12:45 ` Laurent Pinchart
2012-11-21 0:14 ` Simon Horman
2012-11-21 1:03 ` Laurent Pinchart
2012-11-21 1:29 ` Simon Horman
2012-11-19 5:13 ` [RFC 10/15] ARM: shmobile: Include DTSI of sh73a0 to kzm9g board Simon Horman
2012-11-19 5:13 ` [RFC 11/15] ARM: shmobile: kzm9g: Use DT initialisation of INTC Simon Horman
2012-11-19 5:13 ` [RFC 12/15] ARM: shmobile: r8a7740: " Simon Horman
2012-11-19 5:13 ` [RFC 13/15] ARM: shmobile: sh7372: " Simon Horman
2012-11-19 5:13 ` [RFC 14/15] ARM: shmobile: Add DT table of GIC for sh73a0 Simon Horman
2012-11-19 5:13 ` [RFC 15/15] ARM: shmobile: sh73a0: Use DT for GIC Simon Horman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1353302007-31045-3-git-send-email-horms@verge.net.au \
--to=horms@verge.net.au \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).