diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-02-02 03:48:17 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-02-02 03:48:17 -0500 |
commit | 6eb6f98396f7bd653d8fb15b06364c8c7d70e22c (patch) | |
tree | 51155eac621a7cee65d6b3b17fe78d167d3e3945 /arch/sh/cchips | |
parent | c7a967273a539a9a38413753c58125e777e2d30d (diff) |
sh: hd6446x: Convert to sparseirq.
Follows the se7724 change and converts the hd64461 IRQ handling to
sparseirq.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/cchips')
-rw-r--r-- | arch/sh/cchips/hd6446x/hd64461.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/arch/sh/cchips/hd6446x/hd64461.c b/arch/sh/cchips/hd6446x/hd64461.c index cbfedfb42e0..b447091fc06 100644 --- a/arch/sh/cchips/hd6446x/hd64461.c +++ b/arch/sh/cchips/hd6446x/hd64461.c | |||
@@ -73,7 +73,7 @@ static void hd64461_irq_demux(unsigned int irq, struct irq_desc *desc) | |||
73 | 73 | ||
74 | int __init setup_hd64461(void) | 74 | int __init setup_hd64461(void) |
75 | { | 75 | { |
76 | int i; | 76 | int i, nid = cpu_to_node(boot_cpu_data); |
77 | 77 | ||
78 | if (!MACH_HD64461) | 78 | if (!MACH_HD64461) |
79 | return 0; | 79 | return 0; |
@@ -90,9 +90,26 @@ int __init setup_hd64461(void) | |||
90 | __raw_writew(0xffff, HD64461_NIMR); | 90 | __raw_writew(0xffff, HD64461_NIMR); |
91 | 91 | ||
92 | /* IRQ 80 -> 95 belongs to HD64461 */ | 92 | /* IRQ 80 -> 95 belongs to HD64461 */ |
93 | for (i = HD64461_IRQBASE; i < HD64461_IRQBASE + 16; i++) | 93 | for (i = HD64461_IRQBASE; i < HD64461_IRQBASE + 16; i++) { |
94 | unsigned int irq; | ||
95 | |||
96 | irq = create_irq_nr(i, nid); | ||
97 | if (unlikely(irq == 0)) { | ||
98 | pr_err("%s: failed hooking irq %d for HD64461\n", | ||
99 | __func__, i); | ||
100 | return -EBUSY; | ||
101 | } | ||
102 | |||
103 | if (unlikely(irq != i)) { | ||
104 | pr_err("%s: got irq %d but wanted %d, bailing.\n", | ||
105 | __func__, irq, i); | ||
106 | destroy_irq(irq); | ||
107 | return -EINVAL; | ||
108 | } | ||
109 | |||
94 | set_irq_chip_and_handler(i, &hd64461_irq_chip, | 110 | set_irq_chip_and_handler(i, &hd64461_irq_chip, |
95 | handle_level_irq); | 111 | handle_level_irq); |
112 | } | ||
96 | 113 | ||
97 | set_irq_chained_handler(CONFIG_HD64461_IRQ, hd64461_irq_demux); | 114 | set_irq_chained_handler(CONFIG_HD64461_IRQ, hd64461_irq_demux); |
98 | set_irq_type(CONFIG_HD64461_IRQ, IRQ_TYPE_LEVEL_LOW); | 115 | set_irq_type(CONFIG_HD64461_IRQ, IRQ_TYPE_LEVEL_LOW); |