Commit edb34725 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven

m68k/irq: Add m68k_setup_irq_controller()

This is a wrapper around m68k_setup_irq_chip() that discards its dummy
second parameter, to ease the future transition to genirq.
Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
parent 40a72c8f
......@@ -80,7 +80,8 @@ void __init amiga_init_IRQ(void)
if (request_irq(IRQ_AUTO_5, ami_int5, 0, "int5", NULL))
pr_err("Couldn't register int%d\n", 5);
m68k_setup_irq_chip(&amiga_irq_chip, IRQ_USER, AMI_STD_IRQS);
m68k_setup_irq_controller(&amiga_irq_chip, handle_simple_irq, IRQ_USER,
AMI_STD_IRQS);
/* turn off PCMCIA interrupts */
if (AMIGAHW_PRESENT(PCMCIA))
......
......@@ -168,14 +168,16 @@ static struct irq_chip auto_irq_chip = {
void __init cia_init_IRQ(struct ciabase *base)
{
m68k_setup_irq_chip(&cia_irq_chip, base->cia_irq, CIA_IRQS);
m68k_setup_irq_controller(&cia_irq_chip, handle_simple_irq,
base->cia_irq, CIA_IRQS);
/* clear any pending interrupt and turn off all interrupts */
cia_set_irq(base, CIA_ICR_ALL);
cia_able_irq(base, CIA_ICR_ALL);
/* override auto int and install CIA handler */
m68k_setup_irq_chip(&auto_irq_chip, base->handler_irq, 1);
m68k_setup_irq_controller(&auto_irq_chip, handle_simple_irq,
base->handler_irq, 1);
m68k_irq_startup_irq(base->handler_irq);
if (request_irq(base->handler_irq, cia_handler, IRQF_SHARED,
base->name, base))
......
......@@ -43,5 +43,6 @@ static struct irq_chip apollo_irq_chip = {
void __init dn_init_IRQ(void)
{
m68k_setup_user_interrupt(VEC_USER + 96, 16, dn_process_int);
m68k_setup_irq_chip(&apollo_irq_chip, IRQ_APOLLO, 16);
m68k_setup_irq_controller(&apollo_irq_chip, handle_simple_irq,
IRQ_APOLLO, 16);
}
......@@ -374,7 +374,8 @@ static struct irq_chip atari_irq_chip = {
void __init atari_init_IRQ(void)
{
m68k_setup_user_interrupt(VEC_USER, NUM_ATARI_SOURCES - IRQ_USER, NULL);
m68k_setup_irq_chip(&atari_irq_chip, 1, NUM_ATARI_SOURCES - 1);
m68k_setup_irq_controller(&atari_irq_chip, handle_simple_irq, 1,
NUM_ATARI_SOURCES - 1);
/* Initialize the MFP(s) */
......
......@@ -115,6 +115,8 @@ extern void m68k_setup_auto_interrupt(void (*handler)(unsigned int, struct pt_re
extern void m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt,
void (*handler)(unsigned int, struct pt_regs *));
extern void m68k_setup_irq_chip(struct irq_chip *, unsigned int, unsigned int);
#define m68k_setup_irq_controller(chip, dummy, irq, cnt) \
m68k_setup_irq_chip((chip), (irq), (cnt))
asmlinkage void m68k_handle_int(unsigned int);
asmlinkage void __m68k_handle_int(unsigned int, struct pt_regs *);
......
......@@ -214,7 +214,7 @@ void __init mac_init_IRQ(void)
#ifdef DEBUG_MACINTS
printk("mac_init_IRQ(): Setting things up...\n");
#endif
m68k_setup_irq_chip(&mac_irq_chip, IRQ_USER,
m68k_setup_irq_controller(&mac_irq_chip, handle_simple_irq, IRQ_USER,
NUM_MAC_SOURCES - IRQ_USER);
/* Make sure the SONIC interrupt is cleared or things get ugly */
#ifdef SHUTUP_SONIC
......
......@@ -82,7 +82,8 @@ static int disabled;
void __init q40_init_IRQ(void)
{
m68k_setup_irq_chip(&q40_irq_chip, 1, Q40_IRQ_MAX);
m68k_setup_irq_controller(&q40_irq_chip, handle_simple_irq, 1,
Q40_IRQ_MAX);
/* setup handler for ISA ints */
m68k_setup_auto_interrupt(q40_irq_handler);
......
......@@ -109,7 +109,8 @@ void __init sun3_init_IRQ(void)
*sun3_intreg = 1;
m68k_setup_auto_interrupt(sun3_inthandle);
m68k_setup_irq_chip(&sun3_irq_chip, IRQ_AUTO_1, 7);
m68k_setup_irq_controller(&sun3_irq_chip, handle_simple_irq,
IRQ_AUTO_1, 7);
m68k_setup_user_interrupt(VEC_USER, 128, NULL);
if (request_irq(IRQ_AUTO_5, sun3_int5, 0, "int5", NULL))
......
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