diff options
author | Roman Zippel <zippel@linux-m68k.org> | 2006-06-25 12:47:01 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-25 17:00:57 (GMT) |
commit | 68387c448b7f2b3e2bfa0f606391cd3b602b1997 (patch) | |
tree | a6a5d209ae09a3bbaf4e1614ea4b2bd4920e6c56 /include | |
parent | b5dc7840b3ebe9c7967dd8ba73db957767009ff9 (diff) | |
download | linux-fsl-qoriq-68387c448b7f2b3e2bfa0f606391cd3b602b1997.tar.xz |
[PATCH] m68k: convert generic irq code to irq controller
Convert the generic irq code to use irq controller, this gets rid of the
machine specific callbacks and gives better control over irq handling without
duplicating lots of code.
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')
-rw-r--r-- | include/asm-m68k/irq.h | 65 | ||||
-rw-r--r-- | include/asm-m68k/machdep.h | 6 | ||||
-rw-r--r-- | include/asm-m68k/traps.h | 2 |
3 files changed, 25 insertions, 48 deletions
diff --git a/include/asm-m68k/irq.h b/include/asm-m68k/irq.h index 7fa8733..f4ae7d8 100644 --- a/include/asm-m68k/irq.h +++ b/include/asm-m68k/irq.h @@ -1,25 +1,30 @@ #ifndef _M68K_IRQ_H_ #define _M68K_IRQ_H_ +#include <linux/linkage.h> #include <linux/hardirq.h> #include <linux/spinlock_types.h> /* - * # of m68k auto vector interrupts - */ - -#define SYS_IRQS 8 - -/* * This should be the same as the max(NUM_X_SOURCES) for all the * different m68k hosts compiled into the kernel. * Currently the Atari has 72 and the Amiga 24, but if both are * supported in the kernel it is better to make room for 72. */ -#if defined(CONFIG_ATARI) || defined(CONFIG_MAC) -#define NR_IRQS (72+SYS_IRQS) +#if defined(CONFIG_VME) || defined(CONFIG_SUN3) || defined(CONFIG_SUN3X) +#define NR_IRQS 200 +#elif defined(CONFIG_ATARI) || defined(CONFIG_MAC) +#define NR_IRQS 72 +#elif defined(CONFIG_Q40) +#define NR_IRQS 43 +#elif defined(CONFIG_AMIGA) +#define NR_IRQS 32 +#elif defined(CONFIG_APOLLO) +#define NR_IRQS 24 +#elif defined(CONFIG_HP300) +#define NR_IRQS 8 #else -#define NR_IRQS (24+SYS_IRQS) +#error unknown nr of irqs #endif /* @@ -53,39 +58,13 @@ #define IRQ_USER 8 -static __inline__ int irq_canonicalize(int irq) -{ - return irq; -} - -/* - * Machine specific interrupt sources. - * - * Adding an interrupt service routine for a source with this bit - * set indicates a special machine specific interrupt source. - * The machine specific files define these sources. - * - * The IRQ_MACHSPEC bit is now gone - the only thing it did was to - * introduce unnecessary overhead. - * - * All interrupt handling is actually machine specific so it is better - * to use function pointers, as used by the Sparc port, and select the - * interrupt handling functions when initializing the kernel. This way - * we save some unnecessary overhead at run-time. - * 01/11/97 - Jes - */ - -extern void (*enable_irq)(unsigned int); -extern void (*disable_irq)(unsigned int); +extern unsigned int irq_canonicalize(unsigned int irq); +extern void enable_irq(unsigned int); +extern void disable_irq(unsigned int); #define disable_irq_nosync disable_irq struct pt_regs; -extern int cpu_request_irq(unsigned int, - int (*)(int, void *, struct pt_regs *), - unsigned long, const char *, void *); -extern void cpu_free_irq(unsigned int, void *); - /* * various flags for request_irq() - the Amiga now uses the standard * mechanism like all other architectures - SA_INTERRUPT and SA_SHIRQ @@ -133,12 +112,16 @@ struct irq_controller { extern int m68k_irq_startup(unsigned int); extern void m68k_irq_shutdown(unsigned int); -/* count of spurious interrupts */ -extern volatile unsigned int num_spurious; - /* * This function returns a new irq_node_t */ extern irq_node_t *new_irq_node(void); +extern void m68k_setup_auto_interrupt(void (*handler)(unsigned int, struct pt_regs *)); +extern void m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt, + void (*handler)(unsigned int, struct pt_regs *)); +extern void m68k_setup_irq_controller(struct irq_controller *, unsigned int, unsigned int); + +asmlinkage void m68k_handle_int(unsigned int, struct pt_regs *); + #endif /* _M68K_IRQ_H_ */ diff --git a/include/asm-m68k/machdep.h b/include/asm-m68k/machdep.h index 7d3fee3..df898f2 100644 --- a/include/asm-m68k/machdep.h +++ b/include/asm-m68k/machdep.h @@ -13,14 +13,8 @@ struct buffer_head; extern void (*mach_sched_init) (irqreturn_t (*handler)(int, void *, struct pt_regs *)); /* machine dependent irq functions */ extern void (*mach_init_IRQ) (void); -extern irqreturn_t (*(*mach_default_handler)[]) (int, void *, struct pt_regs *); -extern int (*mach_request_irq) (unsigned int irq, irqreturn_t (*handler)(int, void *, struct pt_regs *), - unsigned long flags, const char *devname, void *dev_id); -extern void (*mach_free_irq) (unsigned int irq, void *dev_id); extern void (*mach_get_model) (char *model); extern int (*mach_get_hardware_list) (char *buffer); -extern int (*mach_get_irq_list) (struct seq_file *p, void *v); -extern irqreturn_t (*mach_process_int) (int irq, struct pt_regs *fp); /* machine dependent timer functions */ extern unsigned long (*mach_gettimeoffset)(void); extern int (*mach_hwclk)(int, struct rtc_time*); diff --git a/include/asm-m68k/traps.h b/include/asm-m68k/traps.h index 7715194..8caef25 100644 --- a/include/asm-m68k/traps.h +++ b/include/asm-m68k/traps.h @@ -19,7 +19,7 @@ typedef void (*e_vector)(void); asmlinkage void auto_inthandler(void); -asmlinkage void mach_inthandler(void); +asmlinkage void user_inthandler(void); asmlinkage void bad_inthandler(void); extern e_vector vectors[]; |