aboutsummaryrefslogtreecommitdiff
path: root/include/asm-m68k/irq.h
diff options
context:
space:
mode:
authorRoman Zippel <zippel@linux-m68k.org>2006-06-25 05:47:00 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-25 10:00:57 -0700
commitb5dc7840b3ebe9c7967dd8ba73db957767009ff9 (patch)
tree0c5d45c592f140937e4e3e49ac9bc4ea8fc2cef7 /include/asm-m68k/irq.h
parent1d174cfb0f2a8967433e157bae9c2d4dcdee5324 (diff)
[PATCH] m68k: introduce irq controller
Introduce irq controller and use it to manage auto vector interrupts. Introduce setup_irq() which can be used for irq setup. Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-m68k/irq.h')
-rw-r--r--include/asm-m68k/irq.h25
1 files changed, 19 insertions, 6 deletions
diff --git a/include/asm-m68k/irq.h b/include/asm-m68k/irq.h
index 320a084bbd1..7fa8733bb4c 100644
--- a/include/asm-m68k/irq.h
+++ b/include/asm-m68k/irq.h
@@ -1,7 +1,8 @@
#ifndef _M68K_IRQ_H_
#define _M68K_IRQ_H_
-#include <linux/interrupt.h>
+#include <linux/hardirq.h>
+#include <linux/spinlock_types.h>
/*
* # of m68k auto vector interrupts
@@ -81,7 +82,7 @@ extern void (*disable_irq)(unsigned int);
struct pt_regs;
extern int cpu_request_irq(unsigned int,
- irqreturn_t (*)(int, void *, struct pt_regs *),
+ int (*)(int, void *, struct pt_regs *),
unsigned long, const char *, void *);
extern void cpu_free_irq(unsigned int, void *);
@@ -103,23 +104,35 @@ extern void cpu_free_irq(unsigned int, void *);
* interrupt source (if it supports chaining).
*/
typedef struct irq_node {
- irqreturn_t (*handler)(int, void *, struct pt_regs *);
- unsigned long flags;
+ int (*handler)(int, void *, struct pt_regs *);
void *dev_id;
- const char *devname;
struct irq_node *next;
+ unsigned long flags;
+ const char *devname;
} irq_node_t;
/*
* This structure has only 4 elements for speed reasons
*/
typedef struct irq_handler {
- irqreturn_t (*handler)(int, void *, struct pt_regs *);
+ int (*handler)(int, void *, struct pt_regs *);
unsigned long flags;
void *dev_id;
const char *devname;
} irq_handler_t;
+struct irq_controller {
+ const char *name;
+ spinlock_t lock;
+ int (*startup)(unsigned int irq);
+ void (*shutdown)(unsigned int irq);
+ void (*enable)(unsigned int irq);
+ void (*disable)(unsigned int irq);
+};
+
+extern int m68k_irq_startup(unsigned int);
+extern void m68k_irq_shutdown(unsigned int);
+
/* count of spurious interrupts */
extern volatile unsigned int num_spurious;