irq.h 2.6 KB

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