irqs.h 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. #ifndef _IOP13XX_IRQS_H_
  2. #define _IOP13XX_IRQS_H_
  3. #ifndef __ASSEMBLER__
  4. #include <linux/types.h>
  5. #include <asm/system.h> /* local_irq_save */
  6. #include <asm/arch/iop13xx.h> /* iop13xx_cp6_* */
  7. /* INTPND0 CP6 R0 Page 3
  8. */
  9. static inline u32 read_intpnd_0(void)
  10. {
  11. u32 val;
  12. asm volatile("mrc p6, 0, %0, c0, c3, 0":"=r" (val));
  13. return val;
  14. }
  15. /* INTPND1 CP6 R1 Page 3
  16. */
  17. static inline u32 read_intpnd_1(void)
  18. {
  19. u32 val;
  20. asm volatile("mrc p6, 0, %0, c1, c3, 0":"=r" (val));
  21. return val;
  22. }
  23. /* INTPND2 CP6 R2 Page 3
  24. */
  25. static inline u32 read_intpnd_2(void)
  26. {
  27. u32 val;
  28. asm volatile("mrc p6, 0, %0, c2, c3, 0":"=r" (val));
  29. return val;
  30. }
  31. /* INTPND3 CP6 R3 Page 3
  32. */
  33. static inline u32 read_intpnd_3(void)
  34. {
  35. u32 val;
  36. asm volatile("mrc p6, 0, %0, c3, c3, 0":"=r" (val));
  37. return val;
  38. }
  39. static inline void
  40. iop13xx_cp6_enable_irq_save(unsigned long *cp_flags, unsigned long *irq_flags)
  41. {
  42. local_irq_save(*irq_flags);
  43. *cp_flags = iop13xx_cp6_save();
  44. }
  45. static inline void
  46. iop13xx_cp6_irq_restore(unsigned long *cp_flags,
  47. unsigned long *irq_flags)
  48. {
  49. iop13xx_cp6_restore(*cp_flags);
  50. local_irq_restore(*irq_flags);
  51. }
  52. #endif
  53. #define INTBASE 0
  54. #define INTSIZE_4 1
  55. /*
  56. * iop34x chipset interrupts
  57. */
  58. #define IOP13XX_IRQ(x) (IOP13XX_IRQ_OFS + (x))
  59. /*
  60. * On IRQ or FIQ register
  61. */
  62. #define IRQ_IOP13XX_ADMA0_EOT (0)
  63. #define IRQ_IOP13XX_ADMA0_EOC (1)
  64. #define IRQ_IOP13XX_ADMA1_EOT (2)
  65. #define IRQ_IOP13XX_ADMA1_EOC (3)
  66. #define IRQ_IOP13XX_ADMA2_EOT (4)
  67. #define IRQ_IOP13XX_ADMA2_EOC (5)
  68. #define IRQ_IOP134_WATCHDOG (6)
  69. #define IRQ_IOP13XX_RSVD_7 (7)
  70. #define IRQ_IOP13XX_TIMER0 (8)
  71. #define IRQ_IOP13XX_TIMER1 (9)
  72. #define IRQ_IOP13XX_I2C_0 (10)
  73. #define IRQ_IOP13XX_I2C_1 (11)
  74. #define IRQ_IOP13XX_MSG (12)
  75. #define IRQ_IOP13XX_MSGIBQ (13)
  76. #define IRQ_IOP13XX_ATU_IM (14)
  77. #define IRQ_IOP13XX_ATU_BIST (15)
  78. #define IRQ_IOP13XX_PPMU (16)
  79. #define IRQ_IOP13XX_COREPMU (17)
  80. #define IRQ_IOP13XX_CORECACHE (18)
  81. #define IRQ_IOP13XX_RSVD_19 (19)
  82. #define IRQ_IOP13XX_RSVD_20 (20)
  83. #define IRQ_IOP13XX_RSVD_21 (21)
  84. #define IRQ_IOP13XX_RSVD_22 (22)
  85. #define IRQ_IOP13XX_RSVD_23 (23)
  86. #define IRQ_IOP13XX_XINT0 (24)
  87. #define IRQ_IOP13XX_XINT1 (25)
  88. #define IRQ_IOP13XX_XINT2 (26)
  89. #define IRQ_IOP13XX_XINT3 (27)
  90. #define IRQ_IOP13XX_XINT4 (28)
  91. #define IRQ_IOP13XX_XINT5 (29)
  92. #define IRQ_IOP13XX_XINT6 (30)
  93. #define IRQ_IOP13XX_XINT7 (31)
  94. /* IINTSRC1 bit */
  95. #define IRQ_IOP13XX_XINT8 (32) /* 0 */
  96. #define IRQ_IOP13XX_XINT9 (33) /* 1 */
  97. #define IRQ_IOP13XX_XINT10 (34) /* 2 */
  98. #define IRQ_IOP13XX_XINT11 (35) /* 3 */
  99. #define IRQ_IOP13XX_XINT12 (36) /* 4 */
  100. #define IRQ_IOP13XX_XINT13 (37) /* 5 */
  101. #define IRQ_IOP13XX_XINT14 (38) /* 6 */
  102. #define IRQ_IOP13XX_XINT15 (39) /* 7 */
  103. #define IRQ_IOP13XX_RSVD_40 (40) /* 8 */
  104. #define IRQ_IOP13XX_RSVD_41 (41) /* 9 */
  105. #define IRQ_IOP13XX_RSVD_42 (42) /* 10 */
  106. #define IRQ_IOP13XX_RSVD_43 (43) /* 11 */
  107. #define IRQ_IOP13XX_RSVD_44 (44) /* 12 */
  108. #define IRQ_IOP13XX_RSVD_45 (45) /* 13 */
  109. #define IRQ_IOP13XX_RSVD_46 (46) /* 14 */
  110. #define IRQ_IOP13XX_RSVD_47 (47) /* 15 */
  111. #define IRQ_IOP13XX_RSVD_48 (48) /* 16 */
  112. #define IRQ_IOP13XX_RSVD_49 (49) /* 17 */
  113. #define IRQ_IOP13XX_RSVD_50 (50) /* 18 */
  114. #define IRQ_IOP13XX_UART0 (51) /* 19 */
  115. #define IRQ_IOP13XX_UART1 (52) /* 20 */
  116. #define IRQ_IOP13XX_PBIE (53) /* 21 */
  117. #define IRQ_IOP13XX_ATU_CRW (54) /* 22 */
  118. #define IRQ_IOP13XX_ATU_ERR (55) /* 23 */
  119. #define IRQ_IOP13XX_MCU_ERR (56) /* 24 */
  120. #define IRQ_IOP13XX_ADMA0_ERR (57) /* 25 */
  121. #define IRQ_IOP13XX_ADMA1_ERR (58) /* 26 */
  122. #define IRQ_IOP13XX_ADMA2_ERR (59) /* 27 */
  123. #define IRQ_IOP13XX_RSVD_60 (60) /* 28 */
  124. #define IRQ_IOP13XX_RSVD_61 (61) /* 29 */
  125. #define IRQ_IOP13XX_MSG_ERR (62) /* 30 */
  126. #define IRQ_IOP13XX_RSVD_63 (63) /* 31 */
  127. /* IINTSRC2 bit */
  128. #define IRQ_IOP13XX_INTERPROC (64) /* 0 */
  129. #define IRQ_IOP13XX_RSVD_65 (65) /* 1 */
  130. #define IRQ_IOP13XX_RSVD_66 (66) /* 2 */
  131. #define IRQ_IOP13XX_RSVD_67 (67) /* 3 */
  132. #define IRQ_IOP13XX_RSVD_68 (68) /* 4 */
  133. #define IRQ_IOP13XX_RSVD_69 (69) /* 5 */
  134. #define IRQ_IOP13XX_RSVD_70 (70) /* 6 */
  135. #define IRQ_IOP13XX_RSVD_71 (71) /* 7 */
  136. #define IRQ_IOP13XX_RSVD_72 (72) /* 8 */
  137. #define IRQ_IOP13XX_RSVD_73 (73) /* 9 */
  138. #define IRQ_IOP13XX_RSVD_74 (74) /* 10 */
  139. #define IRQ_IOP13XX_RSVD_75 (75) /* 11 */
  140. #define IRQ_IOP13XX_RSVD_76 (76) /* 12 */
  141. #define IRQ_IOP13XX_RSVD_77 (77) /* 13 */
  142. #define IRQ_IOP13XX_RSVD_78 (78) /* 14 */
  143. #define IRQ_IOP13XX_RSVD_79 (79) /* 15 */
  144. #define IRQ_IOP13XX_RSVD_80 (80) /* 16 */
  145. #define IRQ_IOP13XX_RSVD_81 (81) /* 17 */
  146. #define IRQ_IOP13XX_RSVD_82 (82) /* 18 */
  147. #define IRQ_IOP13XX_RSVD_83 (83) /* 19 */
  148. #define IRQ_IOP13XX_RSVD_84 (84) /* 20 */
  149. #define IRQ_IOP13XX_RSVD_85 (85) /* 21 */
  150. #define IRQ_IOP13XX_RSVD_86 (86) /* 22 */
  151. #define IRQ_IOP13XX_RSVD_87 (87) /* 23 */
  152. #define IRQ_IOP13XX_RSVD_88 (88) /* 24 */
  153. #define IRQ_IOP13XX_RSVD_89 (89) /* 25 */
  154. #define IRQ_IOP13XX_RSVD_90 (90) /* 26 */
  155. #define IRQ_IOP13XX_RSVD_91 (91) /* 27 */
  156. #define IRQ_IOP13XX_RSVD_92 (92) /* 28 */
  157. #define IRQ_IOP13XX_RSVD_93 (93) /* 29 */
  158. #define IRQ_IOP13XX_SIB_ERR (94) /* 30 */
  159. #define IRQ_IOP13XX_SRAM_ERR (95) /* 31 */
  160. /* IINTSRC3 bit */
  161. #define IRQ_IOP13XX_I2C_2 (96) /* 0 */
  162. #define IRQ_IOP13XX_ATUE_BIST (97) /* 1 */
  163. #define IRQ_IOP13XX_ATUE_CRW (98) /* 2 */
  164. #define IRQ_IOP13XX_ATUE_ERR (99) /* 3 */
  165. #define IRQ_IOP13XX_IMU (100) /* 4 */
  166. #define IRQ_IOP13XX_RSVD_101 (101) /* 5 */
  167. #define IRQ_IOP13XX_RSVD_102 (102) /* 6 */
  168. #define IRQ_IOP13XX_TPMI0_OUT (103) /* 7 */
  169. #define IRQ_IOP13XX_TPMI1_OUT (104) /* 8 */
  170. #define IRQ_IOP13XX_TPMI2_OUT (105) /* 9 */
  171. #define IRQ_IOP13XX_TPMI3_OUT (106) /* 10 */
  172. #define IRQ_IOP13XX_ATUE_IMA (107) /* 11 */
  173. #define IRQ_IOP13XX_ATUE_IMB (108) /* 12 */
  174. #define IRQ_IOP13XX_ATUE_IMC (109) /* 13 */
  175. #define IRQ_IOP13XX_ATUE_IMD (110) /* 14 */
  176. #define IRQ_IOP13XX_MU_MSI_TB (111) /* 15 */
  177. #define IRQ_IOP13XX_RSVD_112 (112) /* 16 */
  178. #define IRQ_IOP13XX_RSVD_113 (113) /* 17 */
  179. #define IRQ_IOP13XX_RSVD_114 (114) /* 18 */
  180. #define IRQ_IOP13XX_RSVD_115 (115) /* 19 */
  181. #define IRQ_IOP13XX_RSVD_116 (116) /* 20 */
  182. #define IRQ_IOP13XX_RSVD_117 (117) /* 21 */
  183. #define IRQ_IOP13XX_RSVD_118 (118) /* 22 */
  184. #define IRQ_IOP13XX_RSVD_119 (119) /* 23 */
  185. #define IRQ_IOP13XX_RSVD_120 (120) /* 24 */
  186. #define IRQ_IOP13XX_RSVD_121 (121) /* 25 */
  187. #define IRQ_IOP13XX_RSVD_122 (122) /* 26 */
  188. #define IRQ_IOP13XX_RSVD_123 (123) /* 27 */
  189. #define IRQ_IOP13XX_RSVD_124 (124) /* 28 */
  190. #define IRQ_IOP13XX_RSVD_125 (125) /* 29 */
  191. #define IRQ_IOP13XX_RSVD_126 (126) /* 30 */
  192. #define IRQ_IOP13XX_HPI (127) /* 31 */
  193. #define NR_IOP13XX_IRQS (IRQ_IOP13XX_HPI + 1)
  194. #define NR_IRQS NR_IOP13XX_IRQS
  195. #endif /* _IOP13XX_IRQ_H_ */