Commit 1eb0139e authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Linus Torvalds

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

M68k HP9000/300: Update to the new irq API (from Roman Zippel and me) [6/20]
parent 27ca6aba
......@@ -23,7 +23,7 @@
#include "time.h"
extern void hp300_reset(void);
extern void (*hp300_default_handler[])(int, void *, struct pt_regs *);
extern irqreturn_t (*hp300_default_handler[])(int, void *, struct pt_regs *);
extern int show_hp300_interrupts(struct seq_file *, void *);
#ifdef CONFIG_HEARTBEAT
......
......@@ -42,7 +42,7 @@ static irq_node_t *hp300_irq_list[HP300_NUM_IRQS] = { [0 ... HP300_NUM_IRQS-1] =
static spinlock_t irqlist_lock;
/* This handler receives all interrupts, dispatching them to the registered handlers */
static void hp300_int_handler(int irq, void *dev_id, struct pt_regs *fp)
static irqreturn_t hp300_int_handler(int irq, void *dev_id, struct pt_regs *fp)
{
irq_node_t *t;
/* We just give every handler on the chain an opportunity to handle
......@@ -54,9 +54,10 @@ static void hp300_int_handler(int irq, void *dev_id, struct pt_regs *fp)
* etc, in here. Note that currently we can't tell whether or not
* a handler handles the interrupt, though.
*/
return IRQ_HANDLED;
}
void (*hp300_default_handler[SYS_IRQS])(int, void *, struct pt_regs *) = {
irqreturn_t (*hp300_default_handler[SYS_IRQS])(int, void *, struct pt_regs *) = {
hp300_int_handler, hp300_int_handler, hp300_int_handler, hp300_int_handler,
hp300_int_handler, hp300_int_handler, hp300_int_handler, NULL
};
......@@ -70,7 +71,7 @@ void (*hp300_default_handler[SYS_IRQS])(int, void *, struct pt_regs *) = {
* matters (eg the dreaded FIFOless UART...)
*/
int hp300_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)
{
irq_node_t *t, *n = new_irq_node();
......
......@@ -2,7 +2,7 @@ extern void hp300_init_IRQ(void);
extern void (*hp300_handlers[8])(int, void *, struct pt_regs *);
extern void hp300_free_irq(unsigned int irq, void *dev_id);
extern int hp300_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);
/* number of interrupts, includes 0 (what's that?) */
......
......@@ -36,13 +36,13 @@
#define INTVAL ((10000 / 4) - 1)
static void hp300_tick(int irq, void *dev_id, struct pt_regs *regs)
static irqreturn_t hp300_tick(int irq, void *dev_id, struct pt_regs *regs)
{
unsigned long tmp;
void (*vector)(int, void *, struct pt_regs *) = dev_id;
irqreturn_t (*vector)(int, void *, struct pt_regs *) = dev_id;
in_8(CLOCKBASE + CLKSR);
asm volatile ("movpw %1@(5),%0" : "=d" (tmp) : "a" (CLOCKBASE));
vector(irq, NULL, regs);
return vector(irq, NULL, regs);
}
unsigned long hp300_gettimeoffset(void)
......@@ -61,7 +61,7 @@ unsigned long hp300_gettimeoffset(void)
return (USECS_PER_JIFFY * ticks) / INTVAL;
}
void __init hp300_sched_init(void (*vector)(int, void *, struct pt_regs *))
void __init hp300_sched_init(irqreturn_t (*vector)(int, void *, struct pt_regs *))
{
out_8(CLOCKBASE + CLKCR2, 0x1); /* select CR1 */
out_8(CLOCKBASE + CLKCR1, 0x1); /* reset */
......
extern void hp300_sched_init(void (*vector)(int, void *, struct pt_regs *));
extern void hp300_sched_init(irqreturn_t (*vector)(int, void *, struct pt_regs *));
extern unsigned long hp300_gettimeoffset (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