irq.h 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. #ifndef _M68K_IRQ_H_
  2. #define _M68K_IRQ_H_
  3. #include <linux/config.h>
  4. #include <asm/ptrace.h>
  5. #ifdef CONFIG_COLDFIRE
  6. /*
  7. * On the ColdFire we keep track of all vectors. That way drivers
  8. * can register whatever vector number they wish, and we can deal
  9. * with it.
  10. */
  11. #define SYS_IRQS 256
  12. #define NR_IRQS SYS_IRQS
  13. #else
  14. /*
  15. * # of m68k interrupts
  16. */
  17. #define SYS_IRQS 8
  18. #define NR_IRQS (24+SYS_IRQS)
  19. #endif /* CONFIG_COLDFIRE */
  20. /*
  21. * Interrupt source definitions
  22. * General interrupt sources are the level 1-7.
  23. * Adding an interrupt service routine for one of these sources
  24. * results in the addition of that routine to a chain of routines.
  25. * Each one is called in succession. Each individual interrupt
  26. * service routine should determine if the device associated with
  27. * that routine requires service.
  28. */
  29. #define IRQ1 (1) /* level 1 interrupt */
  30. #define IRQ2 (2) /* level 2 interrupt */
  31. #define IRQ3 (3) /* level 3 interrupt */
  32. #define IRQ4 (4) /* level 4 interrupt */
  33. #define IRQ5 (5) /* level 5 interrupt */
  34. #define IRQ6 (6) /* level 6 interrupt */
  35. #define IRQ7 (7) /* level 7 interrupt (non-maskable) */
  36. /*
  37. * Machine specific interrupt sources.
  38. *
  39. * Adding an interrupt service routine for a source with this bit
  40. * set indicates a special machine specific interrupt source.
  41. * The machine specific files define these sources.
  42. *
  43. * The IRQ_MACHSPEC bit is now gone - the only thing it did was to
  44. * introduce unnecessary overhead.
  45. *
  46. * All interrupt handling is actually machine specific so it is better
  47. * to use function pointers, as used by the Sparc port, and select the
  48. * interrupt handling functions when initializing the kernel. This way
  49. * we save some unnecessary overhead at run-time.
  50. * 01/11/97 - Jes
  51. */
  52. extern void (*mach_enable_irq)(unsigned int);
  53. extern void (*mach_disable_irq)(unsigned int);
  54. /*
  55. * various flags for request_irq() - the Amiga now uses the standard
  56. * mechanism like all other architectures - SA_INTERRUPT and SA_SHIRQ
  57. * are your friends.
  58. */
  59. #define IRQ_FLG_LOCK (0x0001) /* handler is not replaceable */
  60. #define IRQ_FLG_REPLACE (0x0002) /* replace existing handler */
  61. #define IRQ_FLG_FAST (0x0004)
  62. #define IRQ_FLG_SLOW (0x0008)
  63. #define IRQ_FLG_STD (0x8000) /* internally used */
  64. #ifdef CONFIG_M68360
  65. #define CPM_INTERRUPT IRQ4
  66. /* see MC68360 User's Manual, p. 7-377 */
  67. #define CPM_VECTOR_BASE 0x04 /* 3 MSbits of CPM vector */
  68. #endif /* CONFIG_M68360 */
  69. /*
  70. * Some drivers want these entry points
  71. */
  72. #define enable_irq(x) 0
  73. #define disable_irq(x) do { } while (0)
  74. #define disable_irq_nosync(x) disable_irq(x)
  75. struct irqaction;
  76. struct pt_regs;
  77. int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *);
  78. #endif /* _M68K_IRQ_H_ */