aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-m68k
diff options
context:
space:
mode:
authorRoman Zippel <zippel@linux-m68k.org>2006-06-25 08:47:00 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-25 13:00:57 -0400
commitb5dc7840b3ebe9c7967dd8ba73db957767009ff9 (patch)
tree0c5d45c592f140937e4e3e49ac9bc4ea8fc2cef7 /include/asm-m68k
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')
-rw-r--r--include/asm-m68k/atari_stdma.h2
-rw-r--r--include/asm-m68k/irq.h25
2 files changed, 20 insertions, 7 deletions
diff --git a/include/asm-m68k/atari_stdma.h b/include/asm-m68k/atari_stdma.h
index 64f92880ce43..b4eadf852738 100644
--- a/include/asm-m68k/atari_stdma.h
+++ b/include/asm-m68k/atari_stdma.h
@@ -3,7 +3,7 @@
3#define _atari_stdma_h 3#define _atari_stdma_h
4 4
5 5
6#include <asm/irq.h> 6#include <linux/interrupt.h>
7 7
8 8
9/***************************** Prototypes *****************************/ 9/***************************** Prototypes *****************************/
diff --git a/include/asm-m68k/irq.h b/include/asm-m68k/irq.h
index 320a084bbd11..7fa8733bb4cc 100644
--- a/include/asm-m68k/irq.h
+++ b/include/asm-m68k/irq.h
@@ -1,7 +1,8 @@
1#ifndef _M68K_IRQ_H_ 1#ifndef _M68K_IRQ_H_
2#define _M68K_IRQ_H_ 2#define _M68K_IRQ_H_
3 3
4#include <linux/interrupt.h> 4#include <linux/hardirq.h>
5#include <linux/spinlock_types.h>
5 6
6/* 7/*
7 * # of m68k auto vector interrupts 8 * # of m68k auto vector interrupts
@@ -81,7 +82,7 @@ extern void (*disable_irq)(unsigned int);
81struct pt_regs; 82struct pt_regs;
82 83
83extern int cpu_request_irq(unsigned int, 84extern int cpu_request_irq(unsigned int,
84 irqreturn_t (*)(int, void *, struct pt_regs *), 85 int (*)(int, void *, struct pt_regs *),
85 unsigned long, const char *, void *); 86 unsigned long, const char *, void *);
86extern void cpu_free_irq(unsigned int, void *); 87extern void cpu_free_irq(unsigned int, void *);
87 88
@@ -103,23 +104,35 @@ extern void cpu_free_irq(unsigned int, void *);
103 * interrupt source (if it supports chaining). 104 * interrupt source (if it supports chaining).
104 */ 105 */
105typedef struct irq_node { 106typedef struct irq_node {
106 irqreturn_t (*handler)(int, void *, struct pt_regs *); 107 int (*handler)(int, void *, struct pt_regs *);
107 unsigned long flags;
108 void *dev_id; 108 void *dev_id;
109 const char *devname;
110 struct irq_node *next; 109 struct irq_node *next;
110 unsigned long flags;
111 const char *devname;
111} irq_node_t; 112} irq_node_t;
112 113
113/* 114/*
114 * This structure has only 4 elements for speed reasons 115 * This structure has only 4 elements for speed reasons
115 */ 116 */
116typedef struct irq_handler { 117typedef struct irq_handler {
117 irqreturn_t (*handler)(int, void *, struct pt_regs *); 118 int (*handler)(int, void *, struct pt_regs *);
118 unsigned long flags; 119 unsigned long flags;
119 void *dev_id; 120 void *dev_id;
120 const char *devname; 121 const char *devname;
121} irq_handler_t; 122} irq_handler_t;
122 123
124struct irq_controller {
125 const char *name;
126 spinlock_t lock;
127 int (*startup)(unsigned int irq);
128 void (*shutdown)(unsigned int irq);
129 void (*enable)(unsigned int irq);
130 void (*disable)(unsigned int irq);
131};
132
133extern int m68k_irq_startup(unsigned int);
134extern void m68k_irq_shutdown(unsigned int);
135
123/* count of spurious interrupts */ 136/* count of spurious interrupts */
124extern volatile unsigned int num_spurious; 137extern volatile unsigned int num_spurious;
125 138