summaryrefslogtreecommitdiffstats
path: root/drivers/sh/intc/core.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2012-08-01 17:13:46 +0900
committerPaul Mundt <lethal@linux-sh.org>2012-08-01 17:13:46 +0900
commit1d6a21b0a672fb29b01ccf397d478e0541e17716 (patch)
treecc4527286de39a1b70e0af1de16f8a664bea0118 /drivers/sh/intc/core.c
parent2d534926205db9ffce4bbbde67cb9b2cee4b835c (diff)
downloadlinux-1d6a21b0a672fb29b01ccf397d478e0541e17716.tar.bz2
sh: intc: initial irqdomain support.
Trivial support for irq domains, using either a linear map or radix tree depending on the vector layout. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/sh/intc/core.c')
-rw-r--r--drivers/sh/intc/core.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/sh/intc/core.c b/drivers/sh/intc/core.c
index 7e562ccb6997..2374468615ed 100644
--- a/drivers/sh/intc/core.c
+++ b/drivers/sh/intc/core.c
@@ -25,6 +25,7 @@
#include <linux/stat.h>
#include <linux/interrupt.h>
#include <linux/sh_intc.h>
+#include <linux/irqdomain.h>
#include <linux/device.h>
#include <linux/syscore_ops.h>
#include <linux/list.h>
@@ -310,6 +311,8 @@ 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);
+
/* register the vectors one by one */
for (i = 0; i < hw->nr_vectors; i++) {
struct intc_vect *vect = hw->vectors + i;
@@ -319,8 +322,8 @@ int __init register_intc_controller(struct intc_desc *desc)
if (!vect->enum_id)
continue;
- res = irq_alloc_desc_at(irq, numa_node_id());
- if (res != irq && res != -EEXIST) {
+ res = irq_create_identity_mapping(d->domain, irq);
+ if (unlikely(res)) {
pr_err("can't get irq_desc for %d\n", irq);
continue;
}
@@ -340,8 +343,8 @@ int __init register_intc_controller(struct intc_desc *desc)
* IRQ support, each vector still needs to have
* its own backing irq_desc.
*/
- res = irq_alloc_desc_at(irq2, numa_node_id());
- if (res != irq2 && res != -EEXIST) {
+ res = irq_create_identity_mapping(d->domain, irq2);
+ if (unlikely(res)) {
pr_err("can't get irq_desc for %d\n", irq2);
continue;
}