irq.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. #ifndef __ASM_SH_CPU_SH5_IRQ_H
  2. #define __ASM_SH_CPU_SH5_IRQ_H
  3. /*
  4. * include/asm-sh/cpu-sh5/irq.h
  5. *
  6. * Copyright (C) 2000, 2001 Paolo Alberelli
  7. *
  8. * This file is subject to the terms and conditions of the GNU General Public
  9. * License. See the file "COPYING" in the main directory of this archive
  10. * for more details.
  11. */
  12. /*
  13. * Encoded IRQs are not considered worth to be supported.
  14. * Main reason is that there's no per-encoded-interrupt
  15. * enable/disable mechanism (as there was in SH3/4).
  16. * An all enabled/all disabled is worth only if there's
  17. * a cascaded IC to disable/enable/ack on. Until such
  18. * IC is available there's no such support.
  19. *
  20. * Presumably Encoded IRQs may use extra IRQs beyond 64,
  21. * below. Some logic must be added to cope with IRQ_IRL?
  22. * in an exclusive way.
  23. *
  24. * Priorities are set at Platform level, when IRQ_IRL0-3
  25. * are set to 0 Encoding is allowed. Otherwise it's not
  26. * allowed.
  27. */
  28. /* Independent IRQs */
  29. #define IRQ_IRL0 0
  30. #define IRQ_IRL1 1
  31. #define IRQ_IRL2 2
  32. #define IRQ_IRL3 3
  33. #define IRQ_INTA 4
  34. #define IRQ_INTB 5
  35. #define IRQ_INTC 6
  36. #define IRQ_INTD 7
  37. #define IRQ_SERR 12
  38. #define IRQ_ERR 13
  39. #define IRQ_PWR3 14
  40. #define IRQ_PWR2 15
  41. #define IRQ_PWR1 16
  42. #define IRQ_PWR0 17
  43. #define IRQ_DMTE0 18
  44. #define IRQ_DMTE1 19
  45. #define IRQ_DMTE2 20
  46. #define IRQ_DMTE3 21
  47. #define IRQ_DAERR 22
  48. #define IRQ_TUNI0 32
  49. #define IRQ_TUNI1 33
  50. #define IRQ_TUNI2 34
  51. #define IRQ_TICPI2 35
  52. #define IRQ_ATI 36
  53. #define IRQ_PRI 37
  54. #define IRQ_CUI 38
  55. #define IRQ_ERI 39
  56. #define IRQ_RXI 40
  57. #define IRQ_BRI 41
  58. #define IRQ_TXI 42
  59. #define IRQ_ITI 63
  60. #define NR_INTC_IRQS 64
  61. #ifdef CONFIG_SH_CAYMAN
  62. #define NR_EXT_IRQS 32
  63. #define START_EXT_IRQS 64
  64. /* PCI bus 2 uses encoded external interrupts on the Cayman board */
  65. #define IRQ_P2INTA (START_EXT_IRQS + (3*8) + 0)
  66. #define IRQ_P2INTB (START_EXT_IRQS + (3*8) + 1)
  67. #define IRQ_P2INTC (START_EXT_IRQS + (3*8) + 2)
  68. #define IRQ_P2INTD (START_EXT_IRQS + (3*8) + 3)
  69. #define I8042_KBD_IRQ (START_EXT_IRQS + 2)
  70. #define I8042_AUX_IRQ (START_EXT_IRQS + 6)
  71. #define IRQ_CFCARD (START_EXT_IRQS + 7)
  72. #define IRQ_PCMCIA (0)
  73. #else
  74. #define NR_EXT_IRQS 0
  75. #endif
  76. /* Default IRQs, fixed */
  77. #define TIMER_IRQ IRQ_TUNI0
  78. #define RTC_IRQ IRQ_CUI
  79. /* Default Priorities, Platform may choose differently */
  80. #define NO_PRIORITY 0 /* Disabled */
  81. #define TIMER_PRIORITY 2
  82. #define RTC_PRIORITY TIMER_PRIORITY
  83. #define SCIF_PRIORITY 3
  84. #define INTD_PRIORITY 3
  85. #define IRL3_PRIORITY 4
  86. #define INTC_PRIORITY 6
  87. #define IRL2_PRIORITY 7
  88. #define INTB_PRIORITY 9
  89. #define IRL1_PRIORITY 10
  90. #define INTA_PRIORITY 12
  91. #define IRL0_PRIORITY 13
  92. #define TOP_PRIORITY 15
  93. extern int intc_evt_to_irq[(0xE20/0x20)+1];
  94. extern int platform_int_priority[NR_INTC_IRQS];
  95. #endif /* __ASM_SH_CPU_SH5_IRQ_H */