aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-m68k
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-m68k')
-rw-r--r--include/asm-m68k/irq.h65
-rw-r--r--include/asm-m68k/machdep.h6
-rw-r--r--include/asm-m68k/traps.h2
3 files changed, 25 insertions, 48 deletions
diff --git a/include/asm-m68k/irq.h b/include/asm-m68k/irq.h
index 7fa8733bb4cc..f4ae7d8feac6 100644
--- a/include/asm-m68k/irq.h
+++ b/include/asm-m68k/irq.h
@@ -1,25 +1,30 @@
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/linkage.h>
4#include <linux/hardirq.h> 5#include <linux/hardirq.h>
5#include <linux/spinlock_types.h> 6#include <linux/spinlock_types.h>
6 7
7/* 8/*
8 * # of m68k auto vector interrupts
9 */
10
11#define SYS_IRQS 8
12
13/*
14 * This should be the same as the max(NUM_X_SOURCES) for all the 9 * This should be the same as the max(NUM_X_SOURCES) for all the
15 * different m68k hosts compiled into the kernel. 10 * different m68k hosts compiled into the kernel.
16 * Currently the Atari has 72 and the Amiga 24, but if both are 11 * Currently the Atari has 72 and the Amiga 24, but if both are
17 * supported in the kernel it is better to make room for 72. 12 * supported in the kernel it is better to make room for 72.
18 */ 13 */
19#if defined(CONFIG_ATARI) || defined(CONFIG_MAC) 14#if defined(CONFIG_VME) || defined(CONFIG_SUN3) || defined(CONFIG_SUN3X)
20#define NR_IRQS (72+SYS_IRQS) 15#define NR_IRQS 200
16#elif defined(CONFIG_ATARI) || defined(CONFIG_MAC)
17#define NR_IRQS 72
18#elif defined(CONFIG_Q40)
19#define NR_IRQS 43
20#elif defined(CONFIG_AMIGA)
21#define NR_IRQS 32
22#elif defined(CONFIG_APOLLO)
23#define NR_IRQS 24
24#elif defined(CONFIG_HP300)
25#define NR_IRQS 8
21#else 26#else
22#define NR_IRQS (24+SYS_IRQS) 27#error unknown nr of irqs
23#endif 28#endif
24 29
25/* 30/*
@@ -53,39 +58,13 @@
53 58
54#define IRQ_USER 8 59#define IRQ_USER 8
55 60
56static __inline__ int irq_canonicalize(int irq) 61extern unsigned int irq_canonicalize(unsigned int irq);
57{ 62extern void enable_irq(unsigned int);
58 return irq; 63extern void disable_irq(unsigned int);
59}
60
61/*
62 * Machine specific interrupt sources.
63 *
64 * Adding an interrupt service routine for a source with this bit
65 * set indicates a special machine specific interrupt source.
66 * The machine specific files define these sources.
67 *
68 * The IRQ_MACHSPEC bit is now gone - the only thing it did was to
69 * introduce unnecessary overhead.
70 *
71 * All interrupt handling is actually machine specific so it is better
72 * to use function pointers, as used by the Sparc port, and select the
73 * interrupt handling functions when initializing the kernel. This way
74 * we save some unnecessary overhead at run-time.
75 * 01/11/97 - Jes
76 */
77
78extern void (*enable_irq)(unsigned int);
79extern void (*disable_irq)(unsigned int);
80#define disable_irq_nosync disable_irq 64#define disable_irq_nosync disable_irq
81 65
82struct pt_regs; 66struct pt_regs;
83 67
84extern int cpu_request_irq(unsigned int,
85 int (*)(int, void *, struct pt_regs *),
86 unsigned long, const char *, void *);
87extern void cpu_free_irq(unsigned int, void *);
88
89/* 68/*
90 * various flags for request_irq() - the Amiga now uses the standard 69 * various flags for request_irq() - the Amiga now uses the standard
91 * mechanism like all other architectures - SA_INTERRUPT and SA_SHIRQ 70 * mechanism like all other architectures - SA_INTERRUPT and SA_SHIRQ
@@ -133,12 +112,16 @@ struct irq_controller {
133extern int m68k_irq_startup(unsigned int); 112extern int m68k_irq_startup(unsigned int);
134extern void m68k_irq_shutdown(unsigned int); 113extern void m68k_irq_shutdown(unsigned int);
135 114
136/* count of spurious interrupts */
137extern volatile unsigned int num_spurious;
138
139/* 115/*
140 * This function returns a new irq_node_t 116 * This function returns a new irq_node_t
141 */ 117 */
142extern irq_node_t *new_irq_node(void); 118extern irq_node_t *new_irq_node(void);
143 119
120extern void m68k_setup_auto_interrupt(void (*handler)(unsigned int, struct pt_regs *));
121extern void m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt,
122 void (*handler)(unsigned int, struct pt_regs *));
123extern void m68k_setup_irq_controller(struct irq_controller *, unsigned int, unsigned int);
124
125asmlinkage void m68k_handle_int(unsigned int, struct pt_regs *);
126
144#endif /* _M68K_IRQ_H_ */ 127#endif /* _M68K_IRQ_H_ */
diff --git a/include/asm-m68k/machdep.h b/include/asm-m68k/machdep.h
index 7d3fee342369..df898f27e434 100644
--- a/include/asm-m68k/machdep.h
+++ b/include/asm-m68k/machdep.h
@@ -13,14 +13,8 @@ struct buffer_head;
13extern void (*mach_sched_init) (irqreturn_t (*handler)(int, void *, struct pt_regs *)); 13extern void (*mach_sched_init) (irqreturn_t (*handler)(int, void *, struct pt_regs *));
14/* machine dependent irq functions */ 14/* machine dependent irq functions */
15extern void (*mach_init_IRQ) (void); 15extern void (*mach_init_IRQ) (void);
16extern irqreturn_t (*(*mach_default_handler)[]) (int, void *, struct pt_regs *);
17extern int (*mach_request_irq) (unsigned int irq, irqreturn_t (*handler)(int, void *, struct pt_regs *),
18 unsigned long flags, const char *devname, void *dev_id);
19extern void (*mach_free_irq) (unsigned int irq, void *dev_id);
20extern void (*mach_get_model) (char *model); 16extern void (*mach_get_model) (char *model);
21extern int (*mach_get_hardware_list) (char *buffer); 17extern int (*mach_get_hardware_list) (char *buffer);
22extern int (*mach_get_irq_list) (struct seq_file *p, void *v);
23extern irqreturn_t (*mach_process_int) (int irq, struct pt_regs *fp);
24/* machine dependent timer functions */ 18/* machine dependent timer functions */
25extern unsigned long (*mach_gettimeoffset)(void); 19extern unsigned long (*mach_gettimeoffset)(void);
26extern int (*mach_hwclk)(int, struct rtc_time*); 20extern int (*mach_hwclk)(int, struct rtc_time*);
diff --git a/include/asm-m68k/traps.h b/include/asm-m68k/traps.h
index 771519473285..8caef25624c7 100644
--- a/include/asm-m68k/traps.h
+++ b/include/asm-m68k/traps.h
@@ -19,7 +19,7 @@
19typedef void (*e_vector)(void); 19typedef void (*e_vector)(void);
20 20
21asmlinkage void auto_inthandler(void); 21asmlinkage void auto_inthandler(void);
22asmlinkage void mach_inthandler(void); 22asmlinkage void user_inthandler(void);
23asmlinkage void bad_inthandler(void); 23asmlinkage void bad_inthandler(void);
24 24
25extern e_vector vectors[]; 25extern e_vector vectors[];