···11-#ifdef __uClinux__22-#include "irq_no.h"11+#ifndef _M68K_IRQ_H_22+#define _M68K_IRQ_H_33+44+/*55+ * This should be the same as the max(NUM_X_SOURCES) for all the66+ * different m68k hosts compiled into the kernel.77+ * Currently the Atari has 72 and the Amiga 24, but if both are88+ * supported in the kernel it is better to make room for 72.99+ */1010+#if defined(CONFIG_COLDFIRE)1111+#define NR_IRQS 2561212+#elif defined(CONFIG_VME) || defined(CONFIG_SUN3) || defined(CONFIG_SUN3X)1313+#define NR_IRQS 2001414+#elif defined(CONFIG_ATARI) || defined(CONFIG_MAC)1515+#define NR_IRQS 721616+#elif defined(CONFIG_Q40)1717+#define NR_IRQS 431818+#elif defined(CONFIG_AMIGA) || !defined(CONFIG_MMU)1919+#define NR_IRQS 322020+#elif defined(CONFIG_APOLLO)2121+#define NR_IRQS 242222+#elif defined(CONFIG_HP300)2323+#define NR_IRQS 8324#else44-#include "irq_mm.h"2525+#define NR_IRQS 0526#endif2727+2828+#ifdef CONFIG_MMU2929+3030+#include <linux/linkage.h>3131+#include <linux/hardirq.h>3232+#include <linux/irqreturn.h>3333+#include <linux/spinlock_types.h>3434+3535+/*3636+ * The hardirq mask has to be large enough to have3737+ * space for potentially all IRQ sources in the system3838+ * nesting on a single CPU:3939+ */4040+#if (1 << HARDIRQ_BITS) < NR_IRQS4141+# error HARDIRQ_BITS is too low!4242+#endif4343+4444+/*4545+ * Interrupt source definitions4646+ * General interrupt sources are the level 1-7.4747+ * Adding an interrupt service routine for one of these sources4848+ * results in the addition of that routine to a chain of routines.4949+ * Each one is called in succession. Each individual interrupt5050+ * service routine should determine if the device associated with5151+ * that routine requires service.5252+ */5353+5454+#define IRQ_SPURIOUS 05555+5656+#define IRQ_AUTO_1 1 /* level 1 interrupt */5757+#define IRQ_AUTO_2 2 /* level 2 interrupt */5858+#define IRQ_AUTO_3 3 /* level 3 interrupt */5959+#define IRQ_AUTO_4 4 /* level 4 interrupt */6060+#define IRQ_AUTO_5 5 /* level 5 interrupt */6161+#define IRQ_AUTO_6 6 /* level 6 interrupt */6262+#define IRQ_AUTO_7 7 /* level 7 interrupt (non-maskable) */6363+6464+#define IRQ_USER 86565+6666+extern unsigned int irq_canonicalize(unsigned int irq);6767+6868+struct pt_regs;6969+7070+/*7171+ * various flags for request_irq() - the Amiga now uses the standard7272+ * mechanism like all other architectures - IRQF_DISABLED and7373+ * IRQF_SHARED are your friends.7474+ */7575+#ifndef MACH_AMIGA_ONLY7676+#define IRQ_FLG_LOCK (0x0001) /* handler is not replaceable */7777+#define IRQ_FLG_REPLACE (0x0002) /* replace existing handler */7878+#define IRQ_FLG_FAST (0x0004)7979+#define IRQ_FLG_SLOW (0x0008)8080+#define IRQ_FLG_STD (0x8000) /* internally used */8181+#endif8282+8383+/*8484+ * This structure is used to chain together the ISRs for a particular8585+ * interrupt source (if it supports chaining).8686+ */8787+typedef struct irq_node {8888+ irqreturn_t (*handler)(int, void *);8989+ void *dev_id;9090+ struct irq_node *next;9191+ unsigned long flags;9292+ const char *devname;9393+} irq_node_t;9494+9595+/*9696+ * This structure has only 4 elements for speed reasons9797+ */9898+struct irq_handler {9999+ int (*handler)(int, void *);100100+ unsigned long flags;101101+ void *dev_id;102102+ const char *devname;103103+};104104+105105+struct irq_controller {106106+ const char *name;107107+ spinlock_t lock;108108+ int (*startup)(unsigned int irq);109109+ void (*shutdown)(unsigned int irq);110110+ void (*enable)(unsigned int irq);111111+ void (*disable)(unsigned int irq);112112+};113113+114114+extern int m68k_irq_startup(unsigned int);115115+extern void m68k_irq_shutdown(unsigned int);116116+117117+/*118118+ * This function returns a new irq_node_t119119+ */120120+extern irq_node_t *new_irq_node(void);121121+122122+extern void m68k_setup_auto_interrupt(void (*handler)(unsigned int, struct pt_regs *));123123+extern void m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt,124124+ void (*handler)(unsigned int, struct pt_regs *));125125+extern void m68k_setup_irq_controller(struct irq_controller *, unsigned int, unsigned int);126126+127127+asmlinkage void m68k_handle_int(unsigned int);128128+asmlinkage void __m68k_handle_int(unsigned int, struct pt_regs *);129129+130130+#else131131+#define irq_canonicalize(irq) (irq)132132+#endif /* CONFIG_MMU */133133+134134+#endif /* _M68K_IRQ_H_ */
-126
arch/m68k/include/asm/irq_mm.h
···11-#ifndef _M68K_IRQ_H_22-#define _M68K_IRQ_H_33-44-#include <linux/linkage.h>55-#include <linux/hardirq.h>66-#include <linux/irqreturn.h>77-#include <linux/spinlock_types.h>88-99-/*1010- * This should be the same as the max(NUM_X_SOURCES) for all the1111- * different m68k hosts compiled into the kernel.1212- * Currently the Atari has 72 and the Amiga 24, but if both are1313- * supported in the kernel it is better to make room for 72.1414- */1515-#if defined(CONFIG_VME) || defined(CONFIG_SUN3) || defined(CONFIG_SUN3X)1616-#define NR_IRQS 2001717-#elif defined(CONFIG_ATARI) || defined(CONFIG_MAC)1818-#define NR_IRQS 721919-#elif defined(CONFIG_Q40)2020-#define NR_IRQS 432121-#elif defined(CONFIG_AMIGA)2222-#define NR_IRQS 322323-#elif defined(CONFIG_APOLLO)2424-#define NR_IRQS 242525-#elif defined(CONFIG_HP300)2626-#define NR_IRQS 82727-#else2828-#define NR_IRQS 02929-#endif3030-3131-/*3232- * The hardirq mask has to be large enough to have3333- * space for potentially all IRQ sources in the system3434- * nesting on a single CPU:3535- */3636-#if (1 << HARDIRQ_BITS) < NR_IRQS3737-# error HARDIRQ_BITS is too low!3838-#endif3939-4040-/*4141- * Interrupt source definitions4242- * General interrupt sources are the level 1-7.4343- * Adding an interrupt service routine for one of these sources4444- * results in the addition of that routine to a chain of routines.4545- * Each one is called in succession. Each individual interrupt4646- * service routine should determine if the device associated with4747- * that routine requires service.4848- */4949-5050-#define IRQ_SPURIOUS 05151-5252-#define IRQ_AUTO_1 1 /* level 1 interrupt */5353-#define IRQ_AUTO_2 2 /* level 2 interrupt */5454-#define IRQ_AUTO_3 3 /* level 3 interrupt */5555-#define IRQ_AUTO_4 4 /* level 4 interrupt */5656-#define IRQ_AUTO_5 5 /* level 5 interrupt */5757-#define IRQ_AUTO_6 6 /* level 6 interrupt */5858-#define IRQ_AUTO_7 7 /* level 7 interrupt (non-maskable) */5959-6060-#define IRQ_USER 86161-6262-extern unsigned int irq_canonicalize(unsigned int irq);6363-6464-struct pt_regs;6565-6666-/*6767- * various flags for request_irq() - the Amiga now uses the standard6868- * mechanism like all other architectures - IRQF_DISABLED and6969- * IRQF_SHARED are your friends.7070- */7171-#ifndef MACH_AMIGA_ONLY7272-#define IRQ_FLG_LOCK (0x0001) /* handler is not replaceable */7373-#define IRQ_FLG_REPLACE (0x0002) /* replace existing handler */7474-#define IRQ_FLG_FAST (0x0004)7575-#define IRQ_FLG_SLOW (0x0008)7676-#define IRQ_FLG_STD (0x8000) /* internally used */7777-#endif7878-7979-/*8080- * This structure is used to chain together the ISRs for a particular8181- * interrupt source (if it supports chaining).8282- */8383-typedef struct irq_node {8484- irqreturn_t (*handler)(int, void *);8585- void *dev_id;8686- struct irq_node *next;8787- unsigned long flags;8888- const char *devname;8989-} irq_node_t;9090-9191-/*9292- * This structure has only 4 elements for speed reasons9393- */9494-struct irq_handler {9595- int (*handler)(int, void *);9696- unsigned long flags;9797- void *dev_id;9898- const char *devname;9999-};100100-101101-struct irq_controller {102102- const char *name;103103- spinlock_t lock;104104- int (*startup)(unsigned int irq);105105- void (*shutdown)(unsigned int irq);106106- void (*enable)(unsigned int irq);107107- void (*disable)(unsigned int irq);108108-};109109-110110-extern int m68k_irq_startup(unsigned int);111111-extern void m68k_irq_shutdown(unsigned int);112112-113113-/*114114- * This function returns a new irq_node_t115115- */116116-extern irq_node_t *new_irq_node(void);117117-118118-extern void m68k_setup_auto_interrupt(void (*handler)(unsigned int, struct pt_regs *));119119-extern void m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt,120120- void (*handler)(unsigned int, struct pt_regs *));121121-extern void m68k_setup_irq_controller(struct irq_controller *, unsigned int, unsigned int);122122-123123-asmlinkage void m68k_handle_int(unsigned int);124124-asmlinkage void __m68k_handle_int(unsigned int, struct pt_regs *);125125-126126-#endif /* _M68K_IRQ_H_ */
-26
arch/m68k/include/asm/irq_no.h
···11-#ifndef _M68KNOMMU_IRQ_H_22-#define _M68KNOMMU_IRQ_H_33-44-#ifdef CONFIG_COLDFIRE55-/*66- * On the ColdFire we keep track of all vectors. That way drivers77- * can register whatever vector number they wish, and we can deal88- * with it.99- */1010-#define SYS_IRQS 2561111-#define NR_IRQS SYS_IRQS1212-1313-#else1414-1515-/*1616- * # of m68k interrupts1717- */1818-#define SYS_IRQS 81919-#define NR_IRQS (24 + SYS_IRQS)2020-2121-#endif /* CONFIG_COLDFIRE */2222-2323-2424-#define irq_canonicalize(irq) (irq)2525-2626-#endif /* _M68KNOMMU_IRQ_H_ */