Commit b0dd1d9b authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Jens Axboe

[PATCH] M68k IRQ API updates

M68k: A few missing updates to the new irq API:
  - Q40/Q60 keyboard
  - Q40/Q60 floppy
  - Sun-3x floppy
parent 5dd97166
...@@ -66,12 +66,14 @@ static struct serio q40kbd_port = ...@@ -66,12 +66,14 @@ static struct serio q40kbd_port =
.close = q40kbd_close, .close = q40kbd_close,
}; };
static void q40kbd_interrupt(int irq, void *dev_id, struct pt_regs *regs) static irqreturn_t q40kbd_interrupt(int irq, void *dev_id,
struct pt_regs *regs)
{ {
if (Q40_IRQ_KEYB_MASK & master_inb(INTERRUPT_REG)) if (Q40_IRQ_KEYB_MASK & master_inb(INTERRUPT_REG))
serio_interrupt(&q40kbd_port, master_inb(KEYCODE_REG), 0, regs); serio_interrupt(&q40kbd_port, master_inb(KEYCODE_REG), 0, regs);
master_outb(-1, KEYBOARD_UNLOCK_REG); master_outb(-1, KEYBOARD_UNLOCK_REG);
return IRQ_HANDLED;
} }
static int __init q40kbd_init(void) static int __init q40kbd_init(void)
......
...@@ -17,7 +17,8 @@ ...@@ -17,7 +17,8 @@
#include <linux/vmalloc.h> #include <linux/vmalloc.h>
asmlinkage void floppy_hardint(int irq, void *dev_id, struct pt_regs * regs); asmlinkage irqreturn_t floppy_hardint(int irq, void *dev_id,
struct pt_regs *regs);
/* constants... */ /* constants... */
...@@ -183,7 +184,8 @@ static void fd_disable_dma(void) ...@@ -183,7 +184,8 @@ static void fd_disable_dma(void)
/* this is the only truly Q40 specific function */ /* this is the only truly Q40 specific function */
asmlinkage void floppy_hardint(int irq, void *dev_id, struct pt_regs * regs) asmlinkage irqreturn_t floppy_hardint(int irq, void *dev_id,
struct pt_regs *regs)
{ {
register unsigned char st; register unsigned char st;
...@@ -197,7 +199,7 @@ asmlinkage void floppy_hardint(int irq, void *dev_id, struct pt_regs * regs) ...@@ -197,7 +199,7 @@ asmlinkage void floppy_hardint(int irq, void *dev_id, struct pt_regs * regs)
#endif #endif
if(!doing_pdma) { if(!doing_pdma) {
floppy_interrupt(irq, dev_id, regs); floppy_interrupt(irq, dev_id, regs);
return; return IRQ_HANDLED;
} }
#ifdef TRACE_FLPY_INT #ifdef TRACE_FLPY_INT
...@@ -232,7 +234,7 @@ asmlinkage void floppy_hardint(int irq, void *dev_id, struct pt_regs * regs) ...@@ -232,7 +234,7 @@ asmlinkage void floppy_hardint(int irq, void *dev_id, struct pt_regs * regs)
calls++; calls++;
#endif #endif
if(st == 0x20) if(st == 0x20)
return; return IRQ_HANDLED;
if(!(st & 0x20)) { if(!(st & 0x20)) {
virtual_dma_residue += virtual_dma_count; virtual_dma_residue += virtual_dma_count;
virtual_dma_count=0; virtual_dma_count=0;
...@@ -245,12 +247,13 @@ asmlinkage void floppy_hardint(int irq, void *dev_id, struct pt_regs * regs) ...@@ -245,12 +247,13 @@ asmlinkage void floppy_hardint(int irq, void *dev_id, struct pt_regs * regs)
#endif #endif
doing_pdma = 0; doing_pdma = 0;
floppy_interrupt(irq, dev_id, regs); floppy_interrupt(irq, dev_id, regs);
return; return IRQ_HANDLED;
} }
#ifdef TRACE_FLPY_INT #ifdef TRACE_FLPY_INT
if(!virtual_dma_count) if(!virtual_dma_count)
dma_wait++; dma_wait++;
#endif #endif
return IRQ_HANDLED;
} }
#define EXTRA_FLOPPY_PARAMS #define EXTRA_FLOPPY_PARAMS
...@@ -113,7 +113,8 @@ static void sun3x_82072_fd_outb(unsigned char value, int port) ...@@ -113,7 +113,8 @@ static void sun3x_82072_fd_outb(unsigned char value, int port)
} }
asmlinkage void sun3xflop_hardint(int irq, void *dev_id, struct pt_regs * regs) asmlinkage irqreturn_t sun3xflop_hardint(int irq, void *dev_id,
struct pt_regs * regs)
{ {
register unsigned char st; register unsigned char st;
...@@ -127,7 +128,7 @@ asmlinkage void sun3xflop_hardint(int irq, void *dev_id, struct pt_regs * regs) ...@@ -127,7 +128,7 @@ asmlinkage void sun3xflop_hardint(int irq, void *dev_id, struct pt_regs * regs)
#endif #endif
if(!doing_pdma) { if(!doing_pdma) {
floppy_interrupt(irq, dev_id, regs); floppy_interrupt(irq, dev_id, regs);
return; return IRQ_HANDLED;
} }
// printk("doing pdma\n");// st %x\n", sun_fdc->status_82072); // printk("doing pdma\n");// st %x\n", sun_fdc->status_82072);
...@@ -151,7 +152,7 @@ asmlinkage void sun3xflop_hardint(int irq, void *dev_id, struct pt_regs * regs) ...@@ -151,7 +152,7 @@ asmlinkage void sun3xflop_hardint(int irq, void *dev_id, struct pt_regs * regs)
if((st & 0x80) == 0) { if((st & 0x80) == 0) {
virtual_dma_count = lcount; virtual_dma_count = lcount;
virtual_dma_addr = lptr; virtual_dma_addr = lptr;
return; return IRQ_HANDLED;
} }
if((st & 0x20) == 0) if((st & 0x20) == 0)
...@@ -176,7 +177,7 @@ asmlinkage void sun3xflop_hardint(int irq, void *dev_id, struct pt_regs * regs) ...@@ -176,7 +177,7 @@ asmlinkage void sun3xflop_hardint(int irq, void *dev_id, struct pt_regs * regs)
#endif #endif
// printk("st=%02x\n", st); // printk("st=%02x\n", st);
if(st == 0x20) if(st == 0x20)
return; return IRQ_HANDLED;
if(!(st & 0x20)) { if(!(st & 0x20)) {
virtual_dma_residue += virtual_dma_count; virtual_dma_residue += virtual_dma_count;
virtual_dma_count=0; virtual_dma_count=0;
...@@ -191,7 +192,7 @@ asmlinkage void sun3xflop_hardint(int irq, void *dev_id, struct pt_regs * regs) ...@@ -191,7 +192,7 @@ asmlinkage void sun3xflop_hardint(int irq, void *dev_id, struct pt_regs * regs)
#endif #endif
floppy_interrupt(irq, dev_id, regs); floppy_interrupt(irq, dev_id, regs);
return; return IRQ_HANDLED;
} }
...@@ -199,6 +200,7 @@ asmlinkage void sun3xflop_hardint(int irq, void *dev_id, struct pt_regs * regs) ...@@ -199,6 +200,7 @@ asmlinkage void sun3xflop_hardint(int irq, void *dev_id, struct pt_regs * regs)
if(!virtual_dma_count) if(!virtual_dma_count)
dma_wait++; dma_wait++;
#endif #endif
return IRQ_HANDLED;
} }
static int sun3xflop_request_irq(void) static int sun3xflop_request_irq(void)
......
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