int.h 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. /*
  2. *
  3. * BRIEF MODULE DESCRIPTION
  4. * Interrupt specific definitions
  5. *
  6. * Author: source@mvista.com
  7. *
  8. * This program is free software; you can distribute it and/or modify it
  9. * under the terms of the GNU General Public License (Version 2) as
  10. * published by the Free Software Foundation.
  11. *
  12. * This program is distributed in the hope it will be useful, but WITHOUT
  13. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  14. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  15. * for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License along
  18. * with this program; if not, write to the Free Software Foundation, Inc.,
  19. * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
  20. */
  21. #ifndef __PNX8550_INT_H
  22. #define __PNX8550_INT_H
  23. #define PNX8550_GIC_BASE 0xBBE3E000
  24. #define PNX8550_GIC_PRIMASK_0 *(volatile unsigned long *)(PNX8550_GIC_BASE + 0x000)
  25. #define PNX8550_GIC_PRIMASK_1 *(volatile unsigned long *)(PNX8550_GIC_BASE + 0x004)
  26. #define PNX8550_GIC_VECTOR_0 *(volatile unsigned long *)(PNX8550_GIC_BASE + 0x100)
  27. #define PNX8550_GIC_VECTOR_1 *(volatile unsigned long *)(PNX8550_GIC_BASE + 0x104)
  28. #define PNX8550_GIC_PEND_1_31 *(volatile unsigned long *)(PNX8550_GIC_BASE + 0x200)
  29. #define PNX8550_GIC_PEND_32_63 *(volatile unsigned long *)(PNX8550_GIC_BASE + 0x204)
  30. #define PNX8550_GIC_PEND_64_70 *(volatile unsigned long *)(PNX8550_GIC_BASE + 0x208)
  31. #define PNX8550_GIC_FEATURES *(volatile unsigned long *)(PNX8550_GIC_BASE + 0x300)
  32. #define PNX8550_GIC_REQ(x) *(volatile unsigned long *)(PNX8550_GIC_BASE + 0x400 + (x)*4)
  33. #define PNX8550_GIC_MOD_ID *(volatile unsigned long *)(PNX8550_GIC_BASE + 0xFFC)
  34. // cp0 is two software + six hw exceptions
  35. #define PNX8550_INT_CP0_TOTINT 8
  36. #define PNX8550_INT_CP0_MIN 0
  37. #define PNX8550_INT_CP0_MAX (PNX8550_INT_CP0_MIN + PNX8550_INT_CP0_TOTINT - 1)
  38. #define MIPS_CPU_GIC_IRQ 2
  39. #define MIPS_CPU_TIMER_IRQ 7
  40. // GIC are 71 exceptions connected to cp0's first hardware exception
  41. #define PNX8550_INT_GIC_TOTINT 71
  42. #define PNX8550_INT_GIC_MIN (PNX8550_INT_CP0_MAX+1)
  43. #define PNX8550_INT_GIC_MAX (PNX8550_INT_GIC_MIN + PNX8550_INT_GIC_TOTINT - 1)
  44. #define PNX8550_INT_UNDEF (PNX8550_INT_GIC_MIN+0)
  45. #define PNX8550_INT_IPC_TARGET0_MIPS (PNX8550_INT_GIC_MIN+1)
  46. #define PNX8550_INT_IPC_TARGET1_TM32_1 (PNX8550_INT_GIC_MIN+2)
  47. #define PNX8550_INT_IPC_TARGET1_TM32_2 (PNX8550_INT_GIC_MIN+3)
  48. #define PNX8550_INT_RESERVED_4 (PNX8550_INT_GIC_MIN+4)
  49. #define PNX8550_INT_USB (PNX8550_INT_GIC_MIN+5)
  50. #define PNX8550_INT_GPIO_EQ1 (PNX8550_INT_GIC_MIN+6)
  51. #define PNX8550_INT_GPIO_EQ2 (PNX8550_INT_GIC_MIN+7)
  52. #define PNX8550_INT_GPIO_EQ3 (PNX8550_INT_GIC_MIN+8)
  53. #define PNX8550_INT_GPIO_EQ4 (PNX8550_INT_GIC_MIN+9)
  54. #define PNX8550_INT_GPIO_EQ5 (PNX8550_INT_GIC_MIN+10)
  55. #define PNX8550_INT_GPIO_EQ6 (PNX8550_INT_GIC_MIN+11)
  56. #define PNX8550_INT_RESERVED_12 (PNX8550_INT_GIC_MIN+12)
  57. #define PNX8550_INT_QVCP1 (PNX8550_INT_GIC_MIN+13)
  58. #define PNX8550_INT_QVCP2 (PNX8550_INT_GIC_MIN+14)
  59. #define PNX8550_INT_I2C1 (PNX8550_INT_GIC_MIN+15)
  60. #define PNX8550_INT_I2C2 (PNX8550_INT_GIC_MIN+16)
  61. #define PNX8550_INT_ISO_UART1 (PNX8550_INT_GIC_MIN+17)
  62. #define PNX8550_INT_ISO_UART2 (PNX8550_INT_GIC_MIN+18)
  63. #define PNX8550_INT_UART1 (PNX8550_INT_GIC_MIN+19)
  64. #define PNX8550_INT_UART2 (PNX8550_INT_GIC_MIN+20)
  65. #define PNX8550_INT_QNTR (PNX8550_INT_GIC_MIN+21)
  66. #define PNX8550_INT_RESERVED22 (PNX8550_INT_GIC_MIN+22)
  67. #define PNX8550_INT_T_DSC (PNX8550_INT_GIC_MIN+23)
  68. #define PNX8550_INT_M_DSC (PNX8550_INT_GIC_MIN+24)
  69. #define PNX8550_INT_RESERVED25 (PNX8550_INT_GIC_MIN+25)
  70. #define PNX8550_INT_2D_DRAW_ENG (PNX8550_INT_GIC_MIN+26)
  71. #define PNX8550_INT_MEM_BASED_SCALAR1 (PNX8550_INT_GIC_MIN+27)
  72. #define PNX8550_INT_VIDEO_MPEG (PNX8550_INT_GIC_MIN+28)
  73. #define PNX8550_INT_VIDEO_INPUT_P1 (PNX8550_INT_GIC_MIN+29)
  74. #define PNX8550_INT_VIDEO_INPUT_P2 (PNX8550_INT_GIC_MIN+30)
  75. #define PNX8550_INT_SPDI1 (PNX8550_INT_GIC_MIN+31)
  76. #define PNX8550_INT_SPDO (PNX8550_INT_GIC_MIN+32)
  77. #define PNX8550_INT_AUDIO_INPUT1 (PNX8550_INT_GIC_MIN+33)
  78. #define PNX8550_INT_AUDIO_OUTPUT1 (PNX8550_INT_GIC_MIN+34)
  79. #define PNX8550_INT_AUDIO_INPUT2 (PNX8550_INT_GIC_MIN+35)
  80. #define PNX8550_INT_AUDIO_OUTPUT2 (PNX8550_INT_GIC_MIN+36)
  81. #define PNX8550_INT_MEMBASED_SCALAR2 (PNX8550_INT_GIC_MIN+37)
  82. #define PNX8550_INT_VPK (PNX8550_INT_GIC_MIN+38)
  83. #define PNX8550_INT_MPEG1_MIPS (PNX8550_INT_GIC_MIN+39)
  84. #define PNX8550_INT_MPEG1_TM (PNX8550_INT_GIC_MIN+40)
  85. #define PNX8550_INT_MPEG2_MIPS (PNX8550_INT_GIC_MIN+41)
  86. #define PNX8550_INT_MPEG2_TM (PNX8550_INT_GIC_MIN+42)
  87. #define PNX8550_INT_TS_DMA (PNX8550_INT_GIC_MIN+43)
  88. #define PNX8550_INT_EDMA (PNX8550_INT_GIC_MIN+44)
  89. #define PNX8550_INT_TM_DEBUG1 (PNX8550_INT_GIC_MIN+45)
  90. #define PNX8550_INT_TM_DEBUG2 (PNX8550_INT_GIC_MIN+46)
  91. #define PNX8550_INT_PCI_INTA (PNX8550_INT_GIC_MIN+47)
  92. #define PNX8550_INT_CLOCK_MODULE (PNX8550_INT_GIC_MIN+48)
  93. #define PNX8550_INT_PCI_XIO_INTA_PCI (PNX8550_INT_GIC_MIN+49)
  94. #define PNX8550_INT_PCI_XIO_INTB_DMA (PNX8550_INT_GIC_MIN+50)
  95. #define PNX8550_INT_PCI_XIO_INTC_GPPM (PNX8550_INT_GIC_MIN+51)
  96. #define PNX8550_INT_PCI_XIO_INTD_GPXIO (PNX8550_INT_GIC_MIN+52)
  97. #define PNX8550_INT_DVD_CSS (PNX8550_INT_GIC_MIN+53)
  98. #define PNX8550_INT_VLD (PNX8550_INT_GIC_MIN+54)
  99. #define PNX8550_INT_GPIO_TSU_7_0 (PNX8550_INT_GIC_MIN+55)
  100. #define PNX8550_INT_GPIO_TSU_15_8 (PNX8550_INT_GIC_MIN+56)
  101. #define PNX8550_INT_GPIO_CTU_IR (PNX8550_INT_GIC_MIN+57)
  102. #define PNX8550_INT_GPIO0 (PNX8550_INT_GIC_MIN+58)
  103. #define PNX8550_INT_GPIO1 (PNX8550_INT_GIC_MIN+59)
  104. #define PNX8550_INT_GPIO2 (PNX8550_INT_GIC_MIN+60)
  105. #define PNX8550_INT_GPIO3 (PNX8550_INT_GIC_MIN+61)
  106. #define PNX8550_INT_GPIO4 (PNX8550_INT_GIC_MIN+62)
  107. #define PNX8550_INT_GPIO5 (PNX8550_INT_GIC_MIN+63)
  108. #define PNX8550_INT_GPIO6 (PNX8550_INT_GIC_MIN+64)
  109. #define PNX8550_INT_GPIO7 (PNX8550_INT_GIC_MIN+65)
  110. #define PNX8550_INT_PMAN_SECURITY (PNX8550_INT_GIC_MIN+66)
  111. #define PNX8550_INT_I2C3 (PNX8550_INT_GIC_MIN+67)
  112. #define PNX8550_INT_RESERVED_68 (PNX8550_INT_GIC_MIN+68)
  113. #define PNX8550_INT_SPDI2 (PNX8550_INT_GIC_MIN+69)
  114. #define PNX8550_INT_I2C4 (PNX8550_INT_GIC_MIN+70)
  115. // Timer are 3 exceptions connected to cp0's 7th hardware exception
  116. #define PNX8550_INT_TIMER_TOTINT 3
  117. #define PNX8550_INT_TIMER_MIN (PNX8550_INT_GIC_MAX+1)
  118. #define PNX8550_INT_TIMER_MAX (PNX8550_INT_TIMER_MIN + PNX8550_INT_TIMER_TOTINT - 1)
  119. #define PNX8550_INT_TIMER1 (PNX8550_INT_TIMER_MIN+0)
  120. #define PNX8550_INT_TIMER2 (PNX8550_INT_TIMER_MIN+1)
  121. #define PNX8550_INT_TIMER3 (PNX8550_INT_TIMER_MIN+2)
  122. #define PNX8550_INT_WATCHDOG PNX8550_INT_TIMER3
  123. #endif