msp_cic_int.h 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. /*
  2. * Defines for the MSP interrupt controller.
  3. *
  4. * Copyright (C) 1999 MIPS Technologies, Inc. All rights reserved.
  5. * Author: Carsten Langgaard, carstenl@mips.com
  6. *
  7. * ########################################################################
  8. *
  9. * This program is free software; you can distribute it and/or modify it
  10. * under the terms of the GNU General Public License (Version 2) as
  11. * published by the Free Software Foundation.
  12. *
  13. * This program is distributed in the hope it will be useful, but WITHOUT
  14. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  15. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  16. * for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License along
  19. * with this program; if not, write to the Free Software Foundation, Inc.,
  20. * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
  21. *
  22. * ########################################################################
  23. */
  24. #ifndef _MSP_CIC_INT_H
  25. #define _MSP_CIC_INT_H
  26. /*
  27. * The PMC-Sierra CIC interrupts are all centrally managed by the
  28. * CIC sub-system.
  29. * We attempt to keep the interrupt numbers as consistent as possible
  30. * across all of the MSP devices, but some differences will creep in ...
  31. * The interrupts which are directly forwarded to the MIPS core interrupts
  32. * are assigned interrupts in the range 0-7, interrupts cascaded through
  33. * the CIC are assigned interrupts 8-39. The cascade occurs on C_IRQ4
  34. * (MSP_INT_CIC). Currently we don't really distinguish between VPE1
  35. * and VPE0 (or thread contexts for that matter). Will have to fix.
  36. * The PER interrupts are assigned interrupts in the range 40-71.
  37. */
  38. /*
  39. * IRQs directly forwarded to the CPU
  40. */
  41. #define MSP_MIPS_INTBASE 0
  42. #define MSP_INT_SW0 0 /* IRQ for swint0, C_SW0 */
  43. #define MSP_INT_SW1 1 /* IRQ for swint1, C_SW1 */
  44. #define MSP_INT_MAC0 2 /* IRQ for MAC 0, C_IRQ0 */
  45. #define MSP_INT_MAC1 3 /* IRQ for MAC 1, C_IRQ1 */
  46. #define MSP_INT_USB 4 /* IRQ for USB, C_IRQ2 */
  47. #define MSP_INT_SAR 5 /* IRQ for ADSL2+ SAR, C_IRQ3 */
  48. #define MSP_INT_CIC 6 /* IRQ for CIC block, C_IRQ4 */
  49. #define MSP_INT_SEC 7 /* IRQ for Sec engine, C_IRQ5 */
  50. /*
  51. * IRQs cascaded on CPU interrupt 4 (CAUSE bit 12, C_IRQ4)
  52. * These defines should be tied to the register definitions for the CIC
  53. * interrupt routine. For now, just use hard-coded values.
  54. */
  55. #define MSP_CIC_INTBASE (MSP_MIPS_INTBASE + 8)
  56. #define MSP_INT_EXT0 (MSP_CIC_INTBASE + 0)
  57. /* External interrupt 0 */
  58. #define MSP_INT_EXT1 (MSP_CIC_INTBASE + 1)
  59. /* External interrupt 1 */
  60. #define MSP_INT_EXT2 (MSP_CIC_INTBASE + 2)
  61. /* External interrupt 2 */
  62. #define MSP_INT_EXT3 (MSP_CIC_INTBASE + 3)
  63. /* External interrupt 3 */
  64. #define MSP_INT_CPUIF (MSP_CIC_INTBASE + 4)
  65. /* CPU interface interrupt */
  66. #define MSP_INT_EXT4 (MSP_CIC_INTBASE + 5)
  67. /* External interrupt 4 */
  68. #define MSP_INT_CIC_USB (MSP_CIC_INTBASE + 6)
  69. /* Cascaded IRQ for USB */
  70. #define MSP_INT_MBOX (MSP_CIC_INTBASE + 7)
  71. /* Sec engine mailbox IRQ */
  72. #define MSP_INT_EXT5 (MSP_CIC_INTBASE + 8)
  73. /* External interrupt 5 */
  74. #define MSP_INT_TDM (MSP_CIC_INTBASE + 9)
  75. /* TDM interrupt */
  76. #define MSP_INT_CIC_MAC0 (MSP_CIC_INTBASE + 10)
  77. /* Cascaded IRQ for MAC 0 */
  78. #define MSP_INT_CIC_MAC1 (MSP_CIC_INTBASE + 11)
  79. /* Cascaded IRQ for MAC 1 */
  80. #define MSP_INT_CIC_SEC (MSP_CIC_INTBASE + 12)
  81. /* Cascaded IRQ for sec engine */
  82. #define MSP_INT_PER (MSP_CIC_INTBASE + 13)
  83. /* Peripheral interrupt */
  84. #define MSP_INT_TIMER0 (MSP_CIC_INTBASE + 14)
  85. /* SLP timer 0 */
  86. #define MSP_INT_TIMER1 (MSP_CIC_INTBASE + 15)
  87. /* SLP timer 1 */
  88. #define MSP_INT_TIMER2 (MSP_CIC_INTBASE + 16)
  89. /* SLP timer 2 */
  90. #define MSP_INT_VPE0_TIMER (MSP_CIC_INTBASE + 17)
  91. /* VPE0 MIPS timer */
  92. #define MSP_INT_BLKCP (MSP_CIC_INTBASE + 18)
  93. /* Block Copy */
  94. #define MSP_INT_UART0 (MSP_CIC_INTBASE + 19)
  95. /* UART 0 */
  96. #define MSP_INT_PCI (MSP_CIC_INTBASE + 20)
  97. /* PCI subsystem */
  98. #define MSP_INT_EXT6 (MSP_CIC_INTBASE + 21)
  99. /* External interrupt 5 */
  100. #define MSP_INT_PCI_MSI (MSP_CIC_INTBASE + 22)
  101. /* PCI Message Signal */
  102. #define MSP_INT_CIC_SAR (MSP_CIC_INTBASE + 23)
  103. /* Cascaded ADSL2+ SAR IRQ */
  104. #define MSP_INT_DSL (MSP_CIC_INTBASE + 24)
  105. /* ADSL2+ IRQ */
  106. #define MSP_INT_CIC_ERR (MSP_CIC_INTBASE + 25)
  107. /* SLP error condition */
  108. #define MSP_INT_VPE1_TIMER (MSP_CIC_INTBASE + 26)
  109. /* VPE1 MIPS timer */
  110. #define MSP_INT_VPE0_PC (MSP_CIC_INTBASE + 27)
  111. /* VPE0 Performance counter */
  112. #define MSP_INT_VPE1_PC (MSP_CIC_INTBASE + 28)
  113. /* VPE1 Performance counter */
  114. #define MSP_INT_EXT7 (MSP_CIC_INTBASE + 29)
  115. /* External interrupt 5 */
  116. #define MSP_INT_VPE0_SW (MSP_CIC_INTBASE + 30)
  117. /* VPE0 Software interrupt */
  118. #define MSP_INT_VPE1_SW (MSP_CIC_INTBASE + 31)
  119. /* VPE0 Software interrupt */
  120. /*
  121. * IRQs cascaded on CIC PER interrupt (MSP_INT_PER)
  122. */
  123. #define MSP_PER_INTBASE (MSP_CIC_INTBASE + 32)
  124. /* Reserved 0-1 */
  125. #define MSP_INT_UART1 (MSP_PER_INTBASE + 2)
  126. /* UART 1 */
  127. /* Reserved 3-5 */
  128. #define MSP_INT_2WIRE (MSP_PER_INTBASE + 6)
  129. /* 2-wire */
  130. #define MSP_INT_TM0 (MSP_PER_INTBASE + 7)
  131. /* Peripheral timer block out 0 */
  132. #define MSP_INT_TM1 (MSP_PER_INTBASE + 8)
  133. /* Peripheral timer block out 1 */
  134. /* Reserved 9 */
  135. #define MSP_INT_SPRX (MSP_PER_INTBASE + 10)
  136. /* SPI RX complete */
  137. #define MSP_INT_SPTX (MSP_PER_INTBASE + 11)
  138. /* SPI TX complete */
  139. #define MSP_INT_GPIO (MSP_PER_INTBASE + 12)
  140. /* GPIO */
  141. #define MSP_INT_PER_ERR (MSP_PER_INTBASE + 13)
  142. /* Peripheral error */
  143. /* Reserved 14-31 */
  144. #endif /* !_MSP_CIC_INT_H */