From b5dc7840b3ebe9c7967dd8ba73db957767009ff9 Mon Sep 17 00:00:00 2001 From: Roman Zippel Date: Sun, 25 Jun 2006 05:47:00 -0700 Subject: [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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-m68k/atari_stdma.h | 2 +- include/asm-m68k/irq.h | 25 +++++++++++++++++++------ 2 files changed, 20 insertions(+), 7 deletions(-) (limited to 'include/asm-m68k') diff --git a/include/asm-m68k/atari_stdma.h b/include/asm-m68k/atari_stdma.h index 64f92880ce4..b4eadf85273 100644 --- a/include/asm-m68k/atari_stdma.h +++ b/include/asm-m68k/atari_stdma.h @@ -3,7 +3,7 @@ #define _atari_stdma_h -#include +#include /***************************** Prototypes *****************************/ 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 +#include +#include /* * # 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; -- cgit v1.2.3