Commit 0ee13002 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Linus Torvalds

[PATCH] M68k IRQ API updates [2/20]

M68k Amiga: Update to the new irq API (from Roman Zippel and me) [2/20]
parent 353684c0
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
#include <asm/amipcmcia.h> #include <asm/amipcmcia.h>
extern int cia_request_irq(struct ciabase *base,int irq, extern int cia_request_irq(struct ciabase *base,int irq,
void (*handler)(int, void *, struct pt_regs *), irqreturn_t (*handler)(int, void *, struct pt_regs *),
unsigned long flags, const char *devname, void *dev_id); unsigned long flags, const char *devname, void *dev_id);
extern void cia_free_irq(struct ciabase *base, unsigned int irq, void *dev_id); extern void cia_free_irq(struct ciabase *base, unsigned int irq, void *dev_id);
extern void cia_init_IRQ(struct ciabase *base); extern void cia_init_IRQ(struct ciabase *base);
...@@ -70,9 +70,10 @@ static const unsigned char ami_servers[AMI_STD_IRQS] = { ...@@ -70,9 +70,10 @@ static const unsigned char ami_servers[AMI_STD_IRQS] = {
static short ami_ablecount[AMI_IRQS]; static short ami_ablecount[AMI_IRQS];
static void ami_badint(int irq, void *dev_id, struct pt_regs *fp) static irqreturn_t ami_badint(int irq, void *dev_id, struct pt_regs *fp)
{ {
num_spurious += 1; num_spurious += 1;
return IRQ_NONE;
} }
/* /*
...@@ -183,7 +184,7 @@ static inline void amiga_delete_irq(irq_node_t **list, void *dev_id) ...@@ -183,7 +184,7 @@ static inline void amiga_delete_irq(irq_node_t **list, void *dev_id)
*/ */
int amiga_request_irq(unsigned int irq, int amiga_request_irq(unsigned int irq,
void (*handler)(int, void *, struct pt_regs *), irqreturn_t (*handler)(int, void *, struct pt_regs *),
unsigned long flags, const char *devname, void *dev_id) unsigned long flags, const char *devname, void *dev_id)
{ {
irq_node_t *node; irq_node_t *node;
...@@ -368,7 +369,7 @@ void amiga_do_irq_list(int irq, struct pt_regs *fp) ...@@ -368,7 +369,7 @@ void amiga_do_irq_list(int irq, struct pt_regs *fp)
* The builtin Amiga hardware interrupt handlers. * The builtin Amiga hardware interrupt handlers.
*/ */
static void ami_int1(int irq, void *dev_id, struct pt_regs *fp) static irqreturn_t ami_int1(int irq, void *dev_id, struct pt_regs *fp)
{ {
unsigned short ints = custom.intreqr & custom.intenar; unsigned short ints = custom.intreqr & custom.intenar;
...@@ -389,9 +390,10 @@ static void ami_int1(int irq, void *dev_id, struct pt_regs *fp) ...@@ -389,9 +390,10 @@ static void ami_int1(int irq, void *dev_id, struct pt_regs *fp)
custom.intreq = IF_SOFT; custom.intreq = IF_SOFT;
amiga_do_irq(IRQ_AMIGA_SOFT, fp); amiga_do_irq(IRQ_AMIGA_SOFT, fp);
} }
return IRQ_HANDLED;
} }
static void ami_int3(int irq, void *dev_id, struct pt_regs *fp) static irqreturn_t ami_int3(int irq, void *dev_id, struct pt_regs *fp)
{ {
unsigned short ints = custom.intreqr & custom.intenar; unsigned short ints = custom.intreqr & custom.intenar;
...@@ -410,9 +412,10 @@ static void ami_int3(int irq, void *dev_id, struct pt_regs *fp) ...@@ -410,9 +412,10 @@ static void ami_int3(int irq, void *dev_id, struct pt_regs *fp)
/* if a vertical blank interrupt */ /* if a vertical blank interrupt */
if (ints & IF_VERTB) if (ints & IF_VERTB)
amiga_do_irq_list(IRQ_AMIGA_VERTB, fp); amiga_do_irq_list(IRQ_AMIGA_VERTB, fp);
return IRQ_HANDLED;
} }
static void ami_int4(int irq, void *dev_id, struct pt_regs *fp) static irqreturn_t ami_int4(int irq, void *dev_id, struct pt_regs *fp)
{ {
unsigned short ints = custom.intreqr & custom.intenar; unsigned short ints = custom.intreqr & custom.intenar;
...@@ -439,9 +442,10 @@ static void ami_int4(int irq, void *dev_id, struct pt_regs *fp) ...@@ -439,9 +442,10 @@ static void ami_int4(int irq, void *dev_id, struct pt_regs *fp)
custom.intreq = IF_AUD3; custom.intreq = IF_AUD3;
amiga_do_irq(IRQ_AMIGA_AUD3, fp); amiga_do_irq(IRQ_AMIGA_AUD3, fp);
} }
return IRQ_HANDLED;
} }
static void ami_int5(int irq, void *dev_id, struct pt_regs *fp) static irqreturn_t ami_int5(int irq, void *dev_id, struct pt_regs *fp)
{ {
unsigned short ints = custom.intreqr & custom.intenar; unsigned short ints = custom.intreqr & custom.intenar;
...@@ -456,14 +460,15 @@ static void ami_int5(int irq, void *dev_id, struct pt_regs *fp) ...@@ -456,14 +460,15 @@ static void ami_int5(int irq, void *dev_id, struct pt_regs *fp)
custom.intreq = IF_DSKSYN; custom.intreq = IF_DSKSYN;
amiga_do_irq(IRQ_AMIGA_DSKSYN, fp); amiga_do_irq(IRQ_AMIGA_DSKSYN, fp);
} }
return IRQ_HANDLED;
} }
static void ami_int7(int irq, void *dev_id, struct pt_regs *fp) static irqreturn_t ami_int7(int irq, void *dev_id, struct pt_regs *fp)
{ {
panic ("level 7 interrupt received\n"); panic ("level 7 interrupt received\n");
} }
void (*amiga_default_handler[SYS_IRQS])(int, void *, struct pt_regs *) = { irqreturn_t (*amiga_default_handler[SYS_IRQS])(int, void *, struct pt_regs *) = {
ami_badint, ami_int1, ami_badint, ami_int3, ami_badint, ami_int1, ami_badint, ami_int3,
ami_int4, ami_int5, ami_badint, ami_int7 ami_int4, ami_int5, ami_badint, ami_int7
}; };
......
...@@ -90,7 +90,7 @@ unsigned char cia_able_irq(struct ciabase *base, unsigned char mask) ...@@ -90,7 +90,7 @@ unsigned char cia_able_irq(struct ciabase *base, unsigned char mask)
} }
int cia_request_irq(struct ciabase *base, unsigned int irq, int cia_request_irq(struct ciabase *base, unsigned int irq,
void (*handler)(int, void *, struct pt_regs *), irqreturn_t (*handler)(int, void *, struct pt_regs *),
unsigned long flags, const char *devname, void *dev_id) unsigned long flags, const char *devname, void *dev_id)
{ {
unsigned char mask; unsigned char mask;
...@@ -120,7 +120,7 @@ void cia_free_irq(struct ciabase *base, unsigned int irq, void *dev_id) ...@@ -120,7 +120,7 @@ void cia_free_irq(struct ciabase *base, unsigned int irq, void *dev_id)
cia_able_irq(base, 1 << irq); cia_able_irq(base, 1 << irq);
} }
static void cia_handler(int irq, void *dev_id, struct pt_regs *fp) static irqreturn_t cia_handler(int irq, void *dev_id, struct pt_regs *fp)
{ {
struct ciabase *base = (struct ciabase *)dev_id; struct ciabase *base = (struct ciabase *)dev_id;
int mach_irq, i; int mach_irq, i;
...@@ -138,6 +138,7 @@ static void cia_handler(int irq, void *dev_id, struct pt_regs *fp) ...@@ -138,6 +138,7 @@ static void cia_handler(int irq, void *dev_id, struct pt_regs *fp)
ints >>= 1; ints >>= 1;
} }
amiga_do_irq_list(base->server_irq, fp); amiga_do_irq_list(base->server_irq, fp);
return IRQ_HANDLED;
} }
void __init cia_init_IRQ(struct ciabase *base) void __init cia_init_IRQ(struct ciabase *base)
......
...@@ -71,12 +71,12 @@ static char amiga_model_name[13] = "Amiga "; ...@@ -71,12 +71,12 @@ static char amiga_model_name[13] = "Amiga ";
extern char m68k_debug_device[]; extern char m68k_debug_device[];
static void amiga_sched_init(void (*handler)(int, void *, struct pt_regs *)); static void amiga_sched_init(irqreturn_t (*handler)(int, void *, struct pt_regs *));
/* amiga specific irq functions */ /* amiga specific irq functions */
extern void amiga_init_IRQ (void); extern void amiga_init_IRQ (void);
extern void (*amiga_default_handler[]) (int, void *, struct pt_regs *); extern irqreturn_t (*amiga_default_handler[]) (int, void *, struct pt_regs *);
extern int amiga_request_irq (unsigned int irq, extern int amiga_request_irq (unsigned int irq,
void (*handler)(int, void *, struct pt_regs *), irqreturn_t (*handler)(int, void *, struct pt_regs *),
unsigned long flags, const char *devname, unsigned long flags, const char *devname,
void *dev_id); void *dev_id);
extern void amiga_free_irq (unsigned int irq, void *dev_id); extern void amiga_free_irq (unsigned int irq, void *dev_id);
...@@ -491,7 +491,7 @@ void __init config_amiga(void) ...@@ -491,7 +491,7 @@ void __init config_amiga(void)
static unsigned short jiffy_ticks; static unsigned short jiffy_ticks;
static void __init amiga_sched_init(void (*timer_routine)(int, void *, static void __init amiga_sched_init(irqreturn_t (*timer_routine)(int, void *,
struct pt_regs *)) struct pt_regs *))
{ {
static struct resource sched_res = { static struct resource sched_res = {
......
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