Commit d0e05bb3 authored by Paul Mundt's avatar Paul Mundt

sh: mach-se: Migrate 7724SE off of deprecated dynamic IRQ API.

The generic hardirq layer provides all of the routines that we need these
days, so we don't require any of the dynamic IRQ API wrapping, and can
call in to irq_alloc_descs() directly.
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent cf00c55e
...@@ -17,8 +17,10 @@ ...@@ -17,8 +17,10 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <asm/irq.h> #include <linux/export.h>
#include <asm/io.h> #include <linux/topology.h>
#include <linux/io.h>
#include <linux/err.h>
#include <mach-se/mach/se7724.h> #include <mach-se/mach/se7724.h>
struct fpga_irq { struct fpga_irq {
...@@ -111,7 +113,7 @@ static void se7724_irq_demux(unsigned int irq, struct irq_desc *desc) ...@@ -111,7 +113,7 @@ static void se7724_irq_demux(unsigned int irq, struct irq_desc *desc)
*/ */
void __init init_se7724_IRQ(void) void __init init_se7724_IRQ(void)
{ {
int i, nid = cpu_to_node(boot_cpu_data); int irq_base, i;
__raw_writew(0xffff, IRQ0_MR); /* mask all */ __raw_writew(0xffff, IRQ0_MR); /* mask all */
__raw_writew(0xffff, IRQ1_MR); /* mask all */ __raw_writew(0xffff, IRQ1_MR); /* mask all */
...@@ -121,28 +123,16 @@ void __init init_se7724_IRQ(void) ...@@ -121,28 +123,16 @@ void __init init_se7724_IRQ(void)
__raw_writew(0x0000, IRQ2_SR); /* clear irq */ __raw_writew(0x0000, IRQ2_SR); /* clear irq */
__raw_writew(0x002a, IRQ_MODE); /* set irq type */ __raw_writew(0x002a, IRQ_MODE); /* set irq type */
for (i = 0; i < SE7724_FPGA_IRQ_NR; i++) { irq_base = irq_alloc_descs(SE7724_FPGA_IRQ_BASE, SE7724_FPGA_IRQ_BASE,
int irq, wanted; SE7724_FPGA_IRQ_NR, numa_node_id());
if (IS_ERR_VALUE(irq_base)) {
wanted = SE7724_FPGA_IRQ_BASE + i; pr_err("%s: failed hooking irqs for FPGA\n", __func__);
return;
irq = create_irq_nr(wanted, nid); }
if (unlikely(irq == 0)) {
pr_err("%s: failed hooking irq %d for FPGA\n",
__func__, wanted);
return;
}
if (unlikely(irq != wanted)) {
pr_err("%s: got irq %d but wanted %d, bailing.\n",
__func__, irq, wanted);
destroy_irq(irq);
return;
}
irq_set_chip_and_handler_name(irq, &se7724_irq_chip, for (i = 0; i < SE7724_FPGA_IRQ_NR; i++)
irq_set_chip_and_handler_name(irq_base + i, &se7724_irq_chip,
handle_level_irq, "level"); handle_level_irq, "level");
}
irq_set_chained_handler(IRQ0_IRQ, se7724_irq_demux); irq_set_chained_handler(IRQ0_IRQ, se7724_irq_demux);
irq_set_irq_type(IRQ0_IRQ, IRQ_TYPE_LEVEL_LOW); irq_set_irq_type(IRQ0_IRQ, IRQ_TYPE_LEVEL_LOW);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment