irqs-s3c24xx.h 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Copyright (c) 2003-2005 Simtec Electronics
  4. * Ben Dooks <[email protected]>
  5. */
  6. #ifndef __ASM_ARCH_IRQS_H
  7. #define __ASM_ARCH_IRQS_H __FILE__
  8. /* we keep the first set of CPU IRQs out of the range of
  9. * the ISA space, so that the PC104 has them to itself
  10. * and we don't end up having to do horrible things to the
  11. * standard ISA drivers....
  12. */
  13. #define S3C2410_CPUIRQ_OFFSET (16)
  14. #define S3C2410_IRQ(x) ((x) + S3C2410_CPUIRQ_OFFSET)
  15. /* main cpu interrupts */
  16. #define IRQ_EINT0 S3C2410_IRQ(0) /* 16 */
  17. #define IRQ_EINT1 S3C2410_IRQ(1)
  18. #define IRQ_EINT2 S3C2410_IRQ(2)
  19. #define IRQ_EINT3 S3C2410_IRQ(3)
  20. #define IRQ_EINT4t7 S3C2410_IRQ(4) /* 20 */
  21. #define IRQ_EINT8t23 S3C2410_IRQ(5)
  22. #define IRQ_RESERVED6 S3C2410_IRQ(6) /* for s3c2410 */
  23. #define IRQ_CAM S3C2410_IRQ(6) /* for s3c2440,s3c2443 */
  24. #define IRQ_BATT_FLT S3C2410_IRQ(7)
  25. #define IRQ_TICK S3C2410_IRQ(8) /* 24 */
  26. #define IRQ_WDT S3C2410_IRQ(9) /* WDT/AC97 for s3c2443 */
  27. #define IRQ_TIMER0 S3C2410_IRQ(10)
  28. #define IRQ_TIMER1 S3C2410_IRQ(11)
  29. #define IRQ_TIMER2 S3C2410_IRQ(12)
  30. #define IRQ_TIMER3 S3C2410_IRQ(13)
  31. #define IRQ_TIMER4 S3C2410_IRQ(14)
  32. #define IRQ_UART2 S3C2410_IRQ(15)
  33. #define IRQ_LCD S3C2410_IRQ(16) /* 32 */
  34. #define IRQ_DMA0 S3C2410_IRQ(17) /* IRQ_DMA for s3c2443 */
  35. #define IRQ_DMA1 S3C2410_IRQ(18)
  36. #define IRQ_DMA2 S3C2410_IRQ(19)
  37. #define IRQ_DMA3 S3C2410_IRQ(20)
  38. #define IRQ_SDI S3C2410_IRQ(21)
  39. #define IRQ_SPI0 S3C2410_IRQ(22)
  40. #define IRQ_UART1 S3C2410_IRQ(23)
  41. #define IRQ_RESERVED24 S3C2410_IRQ(24) /* 40 */
  42. #define IRQ_NFCON S3C2410_IRQ(24) /* for s3c2440 */
  43. #define IRQ_USBD S3C2410_IRQ(25)
  44. #define IRQ_USBH S3C2410_IRQ(26)
  45. #define IRQ_IIC S3C2410_IRQ(27)
  46. #define IRQ_UART0 S3C2410_IRQ(28) /* 44 */
  47. #define IRQ_SPI1 S3C2410_IRQ(29)
  48. #define IRQ_RTC S3C2410_IRQ(30)
  49. #define IRQ_ADCPARENT S3C2410_IRQ(31)
  50. /* interrupts generated from the external interrupts sources */
  51. #define IRQ_EINT0_2412 S3C2410_IRQ(32)
  52. #define IRQ_EINT1_2412 S3C2410_IRQ(33)
  53. #define IRQ_EINT2_2412 S3C2410_IRQ(34)
  54. #define IRQ_EINT3_2412 S3C2410_IRQ(35)
  55. #define IRQ_EINT4 S3C2410_IRQ(36) /* 52 */
  56. #define IRQ_EINT5 S3C2410_IRQ(37)
  57. #define IRQ_EINT6 S3C2410_IRQ(38)
  58. #define IRQ_EINT7 S3C2410_IRQ(39)
  59. #define IRQ_EINT8 S3C2410_IRQ(40)
  60. #define IRQ_EINT9 S3C2410_IRQ(41)
  61. #define IRQ_EINT10 S3C2410_IRQ(42)
  62. #define IRQ_EINT11 S3C2410_IRQ(43)
  63. #define IRQ_EINT12 S3C2410_IRQ(44)
  64. #define IRQ_EINT13 S3C2410_IRQ(45)
  65. #define IRQ_EINT14 S3C2410_IRQ(46)
  66. #define IRQ_EINT15 S3C2410_IRQ(47)
  67. #define IRQ_EINT16 S3C2410_IRQ(48)
  68. #define IRQ_EINT17 S3C2410_IRQ(49)
  69. #define IRQ_EINT18 S3C2410_IRQ(50)
  70. #define IRQ_EINT19 S3C2410_IRQ(51)
  71. #define IRQ_EINT20 S3C2410_IRQ(52) /* 68 */
  72. #define IRQ_EINT21 S3C2410_IRQ(53)
  73. #define IRQ_EINT22 S3C2410_IRQ(54)
  74. #define IRQ_EINT23 S3C2410_IRQ(55)
  75. #define IRQ_EINT_BIT(x) ((x) - IRQ_EINT4 + 4)
  76. #define IRQ_EINT(x) (((x) >= 4) ? (IRQ_EINT4 + (x) - 4) : (IRQ_EINT0 + (x)))
  77. #define IRQ_LCD_FIFO S3C2410_IRQ(56)
  78. #define IRQ_LCD_FRAME S3C2410_IRQ(57)
  79. /* IRQs for the interal UARTs, and ADC
  80. * these need to be ordered in number of appearance in the
  81. * SUBSRC mask register
  82. */
  83. #define S3C2410_IRQSUB(x) S3C2410_IRQ((x)+58)
  84. #define IRQ_S3CUART_RX0 S3C2410_IRQSUB(0) /* 74 */
  85. #define IRQ_S3CUART_TX0 S3C2410_IRQSUB(1)
  86. #define IRQ_S3CUART_ERR0 S3C2410_IRQSUB(2)
  87. #define IRQ_S3CUART_RX1 S3C2410_IRQSUB(3) /* 77 */
  88. #define IRQ_S3CUART_TX1 S3C2410_IRQSUB(4)
  89. #define IRQ_S3CUART_ERR1 S3C2410_IRQSUB(5)
  90. #define IRQ_S3CUART_RX2 S3C2410_IRQSUB(6) /* 80 */
  91. #define IRQ_S3CUART_TX2 S3C2410_IRQSUB(7)
  92. #define IRQ_S3CUART_ERR2 S3C2410_IRQSUB(8)
  93. #define IRQ_TC S3C2410_IRQSUB(9)
  94. #define IRQ_ADC S3C2410_IRQSUB(10)
  95. #define NR_IRQS_S3C2410 (S3C2410_IRQSUB(10) + 1)
  96. /* extra irqs for s3c2412 */
  97. #define IRQ_S3C2412_CFSDI S3C2410_IRQ(21)
  98. #define IRQ_S3C2412_SDI S3C2410_IRQSUB(13)
  99. #define IRQ_S3C2412_CF S3C2410_IRQSUB(14)
  100. #define NR_IRQS_S3C2412 (S3C2410_IRQSUB(14) + 1)
  101. #define IRQ_S3C2416_EINT8t15 S3C2410_IRQ(5)
  102. #define IRQ_S3C2416_DMA S3C2410_IRQ(17)
  103. #define IRQ_S3C2416_UART3 S3C2410_IRQ(18)
  104. #define IRQ_S3C2416_SDI1 S3C2410_IRQ(20)
  105. #define IRQ_S3C2416_SDI0 S3C2410_IRQ(21)
  106. #define IRQ_S3C2416_LCD2 S3C2410_IRQSUB(15)
  107. #define IRQ_S3C2416_LCD3 S3C2410_IRQSUB(16)
  108. #define IRQ_S3C2416_LCD4 S3C2410_IRQSUB(17)
  109. #define IRQ_S3C2416_DMA0 S3C2410_IRQSUB(18)
  110. #define IRQ_S3C2416_DMA1 S3C2410_IRQSUB(19)
  111. #define IRQ_S3C2416_DMA2 S3C2410_IRQSUB(20)
  112. #define IRQ_S3C2416_DMA3 S3C2410_IRQSUB(21)
  113. #define IRQ_S3C2416_DMA4 S3C2410_IRQSUB(22)
  114. #define IRQ_S3C2416_DMA5 S3C2410_IRQSUB(23)
  115. #define IRQ_S32416_WDT S3C2410_IRQSUB(27)
  116. #define IRQ_S32416_AC97 S3C2410_IRQSUB(28)
  117. /* second interrupt-register of s3c2416/s3c2450 */
  118. #define S3C2416_IRQ(x) S3C2410_IRQ((x) + 58 + 29)
  119. #define IRQ_S3C2416_2D S3C2416_IRQ(0)
  120. #define IRQ_S3C2416_IIC1 S3C2416_IRQ(1)
  121. #define IRQ_S3C2416_RESERVED2 S3C2416_IRQ(2)
  122. #define IRQ_S3C2416_RESERVED3 S3C2416_IRQ(3)
  123. #define IRQ_S3C2416_PCM0 S3C2416_IRQ(4)
  124. #define IRQ_S3C2416_PCM1 S3C2416_IRQ(5)
  125. #define IRQ_S3C2416_I2S0 S3C2416_IRQ(6)
  126. #define IRQ_S3C2416_I2S1 S3C2416_IRQ(7)
  127. #define NR_IRQS_S3C2416 (S3C2416_IRQ(7) + 1)
  128. /* extra irqs for s3c2440/s3c2442 */
  129. #define IRQ_S3C2440_CAM_C S3C2410_IRQSUB(11) /* S3C2443 too */
  130. #define IRQ_S3C2440_CAM_P S3C2410_IRQSUB(12) /* S3C2443 too */
  131. #define NR_IRQS_S3C2442 (S3C2410_IRQSUB(12) + 1)
  132. #define IRQ_S3C2440_WDT S3C2410_IRQSUB(13)
  133. #define IRQ_S3C2440_AC97 S3C2410_IRQSUB(14)
  134. #define NR_IRQS_S3C2440 (S3C2410_IRQSUB(14) + 1)
  135. /* irqs for s3c2443 */
  136. #define IRQ_S3C2443_DMA S3C2410_IRQ(17) /* IRQ_DMA1 */
  137. #define IRQ_S3C2443_UART3 S3C2410_IRQ(18) /* IRQ_DMA2 */
  138. #define IRQ_S3C2443_CFCON S3C2410_IRQ(19) /* IRQ_DMA3 */
  139. #define IRQ_S3C2443_HSMMC S3C2410_IRQ(20) /* IRQ_SDI */
  140. #define IRQ_S3C2443_NAND S3C2410_IRQ(24) /* reserved */
  141. #define IRQ_S3C2416_HSMMC0 S3C2410_IRQ(21) /* S3C2416/S3C2450 */
  142. #define IRQ_HSMMC0 IRQ_S3C2416_HSMMC0
  143. #define IRQ_HSMMC1 IRQ_S3C2443_HSMMC
  144. #define IRQ_S3C2443_LCD1 S3C2410_IRQSUB(14)
  145. #define IRQ_S3C2443_LCD2 S3C2410_IRQSUB(15)
  146. #define IRQ_S3C2443_LCD3 S3C2410_IRQSUB(16)
  147. #define IRQ_S3C2443_LCD4 S3C2410_IRQSUB(17)
  148. #define IRQ_S3C2443_DMA0 S3C2410_IRQSUB(18)
  149. #define IRQ_S3C2443_DMA1 S3C2410_IRQSUB(19)
  150. #define IRQ_S3C2443_DMA2 S3C2410_IRQSUB(20)
  151. #define IRQ_S3C2443_DMA3 S3C2410_IRQSUB(21)
  152. #define IRQ_S3C2443_DMA4 S3C2410_IRQSUB(22)
  153. #define IRQ_S3C2443_DMA5 S3C2410_IRQSUB(23)
  154. /* UART3 */
  155. #define IRQ_S3C2443_RX3 S3C2410_IRQSUB(24)
  156. #define IRQ_S3C2443_TX3 S3C2410_IRQSUB(25)
  157. #define IRQ_S3C2443_ERR3 S3C2410_IRQSUB(26)
  158. #define IRQ_S3C2443_WDT S3C2410_IRQSUB(27)
  159. #define IRQ_S3C2443_AC97 S3C2410_IRQSUB(28)
  160. #define NR_IRQS_S3C2443 (S3C2410_IRQSUB(28) + 1)
  161. /* compatibility define. */
  162. #define IRQ_UART3 IRQ_S3C2443_UART3
  163. #define IRQ_S3CUART_RX3 IRQ_S3C2443_RX3
  164. #define IRQ_S3CUART_TX3 IRQ_S3C2443_TX3
  165. #define IRQ_S3CUART_ERR3 IRQ_S3C2443_ERR3
  166. #define IRQ_LCD_VSYNC IRQ_S3C2443_LCD3
  167. #define IRQ_LCD_SYSTEM IRQ_S3C2443_LCD2
  168. #ifdef CONFIG_CPU_S3C2440
  169. #define IRQ_S3C244X_AC97 IRQ_S3C2440_AC97
  170. #else
  171. #define IRQ_S3C244X_AC97 IRQ_S3C2443_AC97
  172. #endif
  173. /* Our FIQs are routable from IRQ_EINT0 to IRQ_ADCPARENT */
  174. #define FIQ_START IRQ_EINT0
  175. #endif /* __ASM_ARCH_IRQ_H */