irqs.h 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. /* linux/arch/arm/mach-s5p64x0/include/mach/irqs.h
  2. *
  3. * Copyright 2009-2010 Samsung Electronics Co., Ltd.
  4. * http://www.samsung.com
  5. *
  6. * S5P64X0 - IRQ definitions
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. */
  12. #ifndef __ASM_ARCH_IRQS_H
  13. #define __ASM_ARCH_IRQS_H __FILE__
  14. #include <plat/irqs.h>
  15. /* VIC0 */
  16. #define IRQ_EINT0_3 S5P_IRQ_VIC0(0)
  17. #define IRQ_EINT4_11 S5P_IRQ_VIC0(1)
  18. #define IRQ_RTC_TIC S5P_IRQ_VIC0(2)
  19. #define IRQ_IIS1 S5P_IRQ_VIC0(3) /* for only S5P6450 */
  20. #define IRQ_IIS2 S5P_IRQ_VIC0(4) /* for only S5P6450 */
  21. #define IRQ_IIC1 S5P_IRQ_VIC0(5)
  22. #define IRQ_I2SV40 S5P_IRQ_VIC0(6)
  23. #define IRQ_GPS S5P_IRQ_VIC0(7) /* for only S5P6450 */
  24. #define IRQ_2D S5P_IRQ_VIC0(11)
  25. #define IRQ_TIMER0_VIC S5P_IRQ_VIC0(23)
  26. #define IRQ_TIMER1_VIC S5P_IRQ_VIC0(24)
  27. #define IRQ_TIMER2_VIC S5P_IRQ_VIC0(25)
  28. #define IRQ_WDT S5P_IRQ_VIC0(26)
  29. #define IRQ_TIMER3_VIC S5P_IRQ_VIC0(27)
  30. #define IRQ_TIMER4_VIC S5P_IRQ_VIC0(28)
  31. #define IRQ_DISPCON0 S5P_IRQ_VIC0(29)
  32. #define IRQ_DISPCON1 S5P_IRQ_VIC0(30)
  33. #define IRQ_DISPCON2 S5P_IRQ_VIC0(31)
  34. /* VIC1 */
  35. #define IRQ_EINT12_15 S5P_IRQ_VIC1(0)
  36. #define IRQ_PCM0 S5P_IRQ_VIC1(2)
  37. #define IRQ_PCM1 S5P_IRQ_VIC1(3) /* for only S5P6450 */
  38. #define IRQ_PCM2 S5P_IRQ_VIC1(4) /* for only S5P6450 */
  39. #define IRQ_UART0 S5P_IRQ_VIC1(5)
  40. #define IRQ_UART1 S5P_IRQ_VIC1(6)
  41. #define IRQ_UART2 S5P_IRQ_VIC1(7)
  42. #define IRQ_UART3 S5P_IRQ_VIC1(8)
  43. #define IRQ_DMA0 S5P_IRQ_VIC1(9)
  44. #define IRQ_UART4 S5P_IRQ_VIC1(10) /* S5P6450 */
  45. #define IRQ_UART5 S5P_IRQ_VIC1(11) /* S5P6450 */
  46. #define IRQ_NFC S5P_IRQ_VIC1(13)
  47. #define IRQ_USI S5P_IRQ_VIC1(15) /* S5P6450 */
  48. #define IRQ_SPI0 S5P_IRQ_VIC1(16)
  49. #define IRQ_SPI1 S5P_IRQ_VIC1(17)
  50. #define IRQ_HSMMC2 S5P_IRQ_VIC1(17) /* Shared */
  51. #define IRQ_IIC S5P_IRQ_VIC1(18)
  52. #define IRQ_DISPCON3 S5P_IRQ_VIC1(19)
  53. #define IRQ_EINT_GROUPS S5P_IRQ_VIC1(21)
  54. #define IRQ_PMU S5P_IRQ_VIC1(23) /* S5P6440 */
  55. #define IRQ_HSMMC0 S5P_IRQ_VIC1(24)
  56. #define IRQ_HSMMC1 S5P_IRQ_VIC1(25)
  57. #define IRQ_OTG S5P_IRQ_VIC1(26)
  58. #define IRQ_DSI S5P_IRQ_VIC1(27)
  59. #define IRQ_RTC_ALARM S5P_IRQ_VIC1(28)
  60. #define IRQ_TSI S5P_IRQ_VIC1(29)
  61. #define IRQ_PENDN S5P_IRQ_VIC1(30)
  62. #define IRQ_TC IRQ_PENDN
  63. #define IRQ_ADC S5P_IRQ_VIC1(31)
  64. /* UART interrupts, S5P6450 has 5 UARTs */
  65. #define IRQ_S5P_UART_BASE4 (96)
  66. #define IRQ_S5P_UART_BASE5 (100)
  67. #define IRQ_S5P_UART_RX4 (IRQ_S5P_UART_BASE4 + UART_IRQ_RXD)
  68. #define IRQ_S5P_UART_TX4 (IRQ_S5P_UART_BASE4 + UART_IRQ_TXD)
  69. #define IRQ_S5P_UART_ERR4 (IRQ_S5P_UART_BASE4 + UART_IRQ_ERR)
  70. #define IRQ_S5P_UART_RX5 (IRQ_S5P_UART_BASE5 + UART_IRQ_RXD)
  71. #define IRQ_S5P_UART_TX5 (IRQ_S5P_UART_BASE5 + UART_IRQ_TXD)
  72. #define IRQ_S5P_UART_ERR5 (IRQ_S5P_UART_BASE5 + UART_IRQ_ERR)
  73. /* S3C compatibilty defines */
  74. #define IRQ_S3CUART_RX4 IRQ_S5P_UART_RX4
  75. #define IRQ_S3CUART_RX5 IRQ_S5P_UART_RX5
  76. #define IRQ_I2S0 IRQ_I2SV40
  77. #define IRQ_LCD_FIFO IRQ_DISPCON0
  78. #define IRQ_LCD_VSYNC IRQ_DISPCON1
  79. #define IRQ_LCD_SYSTEM IRQ_DISPCON2
  80. /* S5P6450 EINT feature will be added */
  81. /*
  82. * Since the IRQ_EINT(x) are a linear mapping on s5p6440 we just defined
  83. * them as an IRQ_EINT(x) macro from S5P_IRQ_EINT_BASE which we place
  84. * after the pair of VICs.
  85. */
  86. #define S5P_IRQ_EINT_BASE (S5P_IRQ_VIC1(31) + 6)
  87. #define S5P_EINT(x) ((x) + S5P_IRQ_EINT_BASE)
  88. #define S5P_EINT_BASE1 (S5P_IRQ_EINT_BASE)
  89. /*
  90. * S5P6440 has 0-15 external interrupts in group 0. Only these can be used
  91. * to wake up from sleep. If request is beyond this range, by mistake, a large
  92. * return value for an irq number should be indication of something amiss.
  93. */
  94. #define S5P_EINT_BASE2 (0xf0000000)
  95. /*
  96. * Next the external interrupt groups. These are similar to the IRQ_EINT(x)
  97. * that they are sourced from the GPIO pins but with a different scheme for
  98. * priority and source indication.
  99. *
  100. * The IRQ_EINT(x) can be thought of as 'group 0' of the available GPIO
  101. * interrupts, but for historical reasons they are kept apart from these
  102. * next interrupts.
  103. *
  104. * Use IRQ_EINT_GROUP(group, offset) to get the number for use in the
  105. * machine specific support files.
  106. */
  107. /* Actually, #6 and #7 are missing in the EINT_GROUP1 */
  108. #define IRQ_EINT_GROUP1_NR (15)
  109. #define IRQ_EINT_GROUP2_NR (8)
  110. #define IRQ_EINT_GROUP5_NR (7)
  111. #define IRQ_EINT_GROUP6_NR (10)
  112. /* Actually, #0, #1 and #2 are missing in the EINT_GROUP8 */
  113. #define IRQ_EINT_GROUP8_NR (11)
  114. #define IRQ_EINT_GROUP_BASE S5P_EINT(16)
  115. #define IRQ_EINT_GROUP1_BASE (IRQ_EINT_GROUP_BASE + 0)
  116. #define IRQ_EINT_GROUP2_BASE (IRQ_EINT_GROUP1_BASE + IRQ_EINT_GROUP1_NR)
  117. #define IRQ_EINT_GROUP5_BASE (IRQ_EINT_GROUP2_BASE + IRQ_EINT_GROUP2_NR)
  118. #define IRQ_EINT_GROUP6_BASE (IRQ_EINT_GROUP5_BASE + IRQ_EINT_GROUP5_NR)
  119. #define IRQ_EINT_GROUP8_BASE (IRQ_EINT_GROUP6_BASE + IRQ_EINT_GROUP6_NR)
  120. #define IRQ_EINT_GROUP(grp, x) (IRQ_EINT_GROUP##grp##_BASE + (x))
  121. #define IRQ_TIMER_BASE (11)
  122. /* Set the default NR_IRQS */
  123. #define NR_IRQS (IRQ_EINT_GROUP8_BASE + IRQ_EINT_GROUP8_NR + 1)
  124. #endif /* __ASM_ARCH_IRQS_H */