root/include/asm-m68k/irq.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 #ifndef _M68K_IRQ_H_
   2 #define _M68K_IRQ_H_
   3 
   4 extern void disable_irq(unsigned int);
   5 extern void enable_irq(unsigned int);
   6 
   7 #include <linux/config.h>
   8 
   9 /*
  10  * This should be the same as the max(NUM_X_SOURCES) for all the
  11  * different m68k hosts compiled into the kernel.
  12  * Currently the Atari has 72 and the Amiga 24, but if both are
  13  * supported in the kernel it is better to make room for 72.
  14  */
  15 #if defined(CONFIG_ATARI)
  16 #define NR_IRQS 72
  17 #else
  18 #define NR_IRQS 24
  19 #endif
  20 
  21 /*
  22  * Interrupt source definitions
  23  * General interrupt sources are the level 1-7.
  24  * Adding an interrupt service routine for one of these sources
  25  * results in the addition of that routine to a chain of routines.
  26  * Each one is called in succession.  Each individual interrupt
  27  * service routine should determine if the device associated with
  28  * that routine requires service.
  29  */
  30 
  31 #define IRQ1             (1)    /* level 1 interrupt */
  32 #define IRQ2             (2)    /* level 2 interrupt */
  33 #define IRQ3             (3)    /* level 3 interrupt */
  34 #define IRQ4             (4)    /* level 4 interrupt */
  35 #define IRQ5             (5)    /* level 5 interrupt */
  36 #define IRQ6             (6)    /* level 6 interrupt */
  37 #define IRQ7             (7)    /* level 7 interrupt (non-maskable) */
  38 
  39 /*
  40  * "Generic" interrupt sources
  41  */
  42 
  43 #define IRQ_SCHED_TIMER  (8)    /* interrupt source for scheduling timer */
  44 
  45 /*
  46  * Machine specific interrupt sources.
  47  *
  48  * Adding an interrupt service routine for a source with this bit
  49  * set indicates a special machine specific interrupt source.
  50  * The machine specific files define these sources.
  51  */
  52 
  53 #define IRQ_MACHSPEC     (0x10000000L)
  54 
  55 #ifndef ISRFUNC_T
  56 struct pt_regs;
  57 typedef void (*isrfunc) (int irq, struct pt_regs * regs, void *data);
  58 #define ISRFUNC_T
  59 #endif /* ISRFUNC_T */
  60 
  61 /*
  62  * This structure is used to chain together the ISRs for a particular
  63  * interrupt source (if it supports chaining).
  64  */
  65 typedef struct isr_node {
  66     isrfunc         isr;
  67     int             pri;
  68     void            *data;
  69     char            *name;
  70     struct isr_node *next;
  71 } isr_node_t;
  72 
  73 /* count of spurious interrupts */
  74 extern volatile unsigned long num_spurious;
  75 
  76 /*
  77  * This function returns a new isr_node_t
  78  */
  79 extern isr_node_t *new_isr_node(void);
  80 
  81 /*
  82  * This function is used to add a specific interrupt service routine
  83  * for the specified interrupt source.
  84  *
  85  * If the source is machine specific, it will be passed along to the
  86  * machine specific routine.
  87  *
  88  * "data" is user specified data which will be passed to the isr routine.
  89  *
  90  * (isrfunc is defined in linux/config.h)
  91  */
  92 extern int add_isr (unsigned long source, isrfunc isr, int pri, void
  93                     *data, char *name);
  94 
  95 /*
  96  * This routine will remove an isr for the specified interrupt source.
  97  */
  98 extern int remove_isr (unsigned long source, isrfunc isr);
  99 
 100 /*
 101  * This routine will insert an isr_node_t into a chain of nodes, using
 102  * the priority stored in the node.
 103  */
 104 extern void insert_isr (isr_node_t **listp, isr_node_t *node);
 105 
 106 /*
 107  * This routine will delete the isr node for isr from a chain of nodes
 108  */
 109 extern void delete_isr (isr_node_t **listp, isrfunc isr);
 110 
 111 /*
 112  * This routine may be used to call the isr routines in the passed list.
 113  */
 114 extern void call_isr_list (int irq, isr_node_t *p, struct pt_regs *fp);
 115 
 116 #endif /* _M68K_IRQ_H_ */

/* [previous][next][first][last][top][bottom][index][help] */