irq-sh73180.h 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350
  1. #ifndef __ASM_SH_IRQ_SH73180_H
  2. #define __ASM_SH_IRQ_SH73180_H
  3. /*
  4. * linux/include/asm-sh/irq-sh73180.h
  5. *
  6. * Copyright (C) 2004 Takashi SHUDO <shudo@hitachi-ul.co.jp>
  7. */
  8. #undef INTC_IPRA
  9. #undef INTC_IPRB
  10. #undef INTC_IPRC
  11. #undef INTC_IPRD
  12. #undef DMTE0_IRQ
  13. #undef DMTE1_IRQ
  14. #undef DMTE2_IRQ
  15. #undef DMTE3_IRQ
  16. #undef DMTE4_IRQ
  17. #undef DMTE5_IRQ
  18. #undef DMTE6_IRQ
  19. #undef DMTE7_IRQ
  20. #undef DMAE_IRQ
  21. #undef DMA_IPR_ADDR
  22. #undef DMA_IPR_POS
  23. #undef DMA_PRIORITY
  24. #undef NR_IRQS
  25. #undef __irq_demux
  26. #undef irq_demux
  27. #undef INTC_IMCR0
  28. #undef INTC_IMCR1
  29. #undef INTC_IMCR2
  30. #undef INTC_IMCR3
  31. #undef INTC_IMCR4
  32. #undef INTC_IMCR5
  33. #undef INTC_IMCR6
  34. #undef INTC_IMCR7
  35. #undef INTC_IMCR8
  36. #undef INTC_IMCR9
  37. #undef INTC_IMCR10
  38. #define INTC_IPRA 0xA4080000UL
  39. #define INTC_IPRB 0xA4080004UL
  40. #define INTC_IPRC 0xA4080008UL
  41. #define INTC_IPRD 0xA408000CUL
  42. #define INTC_IPRE 0xA4080010UL
  43. #define INTC_IPRF 0xA4080014UL
  44. #define INTC_IPRG 0xA4080018UL
  45. #define INTC_IPRH 0xA408001CUL
  46. #define INTC_IPRI 0xA4080020UL
  47. #define INTC_IPRJ 0xA4080024UL
  48. #define INTC_IPRK 0xA4080028UL
  49. #define INTC_IMR0 0xA4080080UL
  50. #define INTC_IMR1 0xA4080084UL
  51. #define INTC_IMR2 0xA4080088UL
  52. #define INTC_IMR3 0xA408008CUL
  53. #define INTC_IMR4 0xA4080090UL
  54. #define INTC_IMR5 0xA4080094UL
  55. #define INTC_IMR6 0xA4080098UL
  56. #define INTC_IMR7 0xA408009CUL
  57. #define INTC_IMR8 0xA40800A0UL
  58. #define INTC_IMR9 0xA40800A4UL
  59. #define INTC_IMR10 0xA40800A8UL
  60. #define INTC_IMR11 0xA40800ACUL
  61. #define INTC_IMCR0 0xA40800C0UL
  62. #define INTC_IMCR1 0xA40800C4UL
  63. #define INTC_IMCR2 0xA40800C8UL
  64. #define INTC_IMCR3 0xA40800CCUL
  65. #define INTC_IMCR4 0xA40800D0UL
  66. #define INTC_IMCR5 0xA40800D4UL
  67. #define INTC_IMCR6 0xA40800D8UL
  68. #define INTC_IMCR7 0xA40800DCUL
  69. #define INTC_IMCR8 0xA40800E0UL
  70. #define INTC_IMCR9 0xA40800E4UL
  71. #define INTC_IMCR10 0xA40800E8UL
  72. #define INTC_IMCR11 0xA40800ECUL
  73. #define INTC_ICR0 0xA4140000UL
  74. #define INTC_ICR1 0xA414001CUL
  75. #define INTMSK0 0xa4140044
  76. #define INTMSKCLR0 0xa4140064
  77. #define INTC_INTPRI0 0xa4140010
  78. /*
  79. NOTE:
  80. *_IRQ = (INTEVT2 - 0x200)/0x20
  81. */
  82. /* TMU0 */
  83. #define TMU0_IRQ 16
  84. #define TMU0_IPR_ADDR INTC_IPRA
  85. #define TMU0_IPR_POS 3
  86. #define TMU0_PRIORITY 2
  87. #define TIMER_IRQ 16
  88. #define TIMER_IPR_ADDR INTC_IPRA
  89. #define TIMER_IPR_POS 3
  90. #define TIMER_PRIORITY 2
  91. /* TMU1 */
  92. #define TMU1_IRQ 17
  93. #define TMU1_IPR_ADDR INTC_IPRA
  94. #define TMU1_IPR_POS 2
  95. #define TMU1_PRIORITY 2
  96. /* TMU2 */
  97. #define TMU2_IRQ 18
  98. #define TMU2_IPR_ADDR INTC_IPRA
  99. #define TMU2_IPR_POS 1
  100. #define TMU2_PRIORITY 2
  101. /* LCDC */
  102. #define LCDC_IRQ 28
  103. #define LCDC_IPR_ADDR INTC_IPRB
  104. #define LCDC_IPR_POS 2
  105. #define LCDC_PRIORITY 2
  106. /* VIO (Video I/O) */
  107. #define CEU_IRQ 52
  108. #define BEU_IRQ 53
  109. #define VEU_IRQ 54
  110. #define VOU_IRQ 55
  111. #define VIO_IPR_ADDR INTC_IPRE
  112. #define VIO_IPR_POS 2
  113. #define VIO_PRIORITY 2
  114. /* MFI (Multi Functional Interface) */
  115. #define MFI_IRQ 56
  116. #define MFI_IPR_ADDR INTC_IPRE
  117. #define MFI_IPR_POS 1
  118. #define MFI_PRIORITY 2
  119. /* VPU (Video Processing Unit) */
  120. #define VPU_IRQ 60
  121. #define VPU_IPR_ADDR INTC_IPRE
  122. #define VPU_IPR_POS 0
  123. #define VPU_PRIORITY 2
  124. /* 3DG */
  125. #define TDG_IRQ 63
  126. #define TDG_IPR_ADDR INTC_IPRJ
  127. #define TDG_IPR_POS 2
  128. #define TDG_PRIORITY 2
  129. /* DMAC(1) */
  130. #define DMTE0_IRQ 48
  131. #define DMTE1_IRQ 49
  132. #define DMTE2_IRQ 50
  133. #define DMTE3_IRQ 51
  134. #define DMA1_IPR_ADDR INTC_IPRE
  135. #define DMA1_IPR_POS 3
  136. #define DMA1_PRIORITY 7
  137. /* DMAC(2) */
  138. #define DMTE4_IRQ 76
  139. #define DMTE5_IRQ 77
  140. #define DMA2_IPR_ADDR INTC_IPRF
  141. #define DMA2_IPR_POS 2
  142. #define DMA2_PRIORITY 7
  143. /* SCIF0 */
  144. #define SCIF_ERI_IRQ 80
  145. #define SCIF_RXI_IRQ 81
  146. #define SCIF_BRI_IRQ 82
  147. #define SCIF_TXI_IRQ 83
  148. #define SCIF_IPR_ADDR INTC_IPRG
  149. #define SCIF_IPR_POS 3
  150. #define SCIF_PRIORITY 3
  151. /* SIOF0 */
  152. #define SIOF0_IRQ 84
  153. #define SIOF0_IPR_ADDR INTC_IPRH
  154. #define SIOF0_IPR_POS 3
  155. #define SIOF0_PRIORITY 3
  156. /* FLCTL (Flash Memory Controller) */
  157. #define FLSTE_IRQ 92
  158. #define FLTEND_IRQ 93
  159. #define FLTRQ0_IRQ 94
  160. #define FLTRQ1_IRQ 95
  161. #define FLCTL_IPR_ADDR INTC_IPRH
  162. #define FLCTL_IPR_POS 1
  163. #define FLCTL_PRIORITY 3
  164. /* IIC(0) (IIC Bus Interface) */
  165. #define IIC0_ALI_IRQ 96
  166. #define IIC0_TACKI_IRQ 97
  167. #define IIC0_WAITI_IRQ 98
  168. #define IIC0_DTEI_IRQ 99
  169. #define IIC0_IPR_ADDR INTC_IPRH
  170. #define IIC0_IPR_POS 0
  171. #define IIC0_PRIORITY 3
  172. /* IIC(1) (IIC Bus Interface) */
  173. #define IIC1_ALI_IRQ 44
  174. #define IIC1_TACKI_IRQ 45
  175. #define IIC1_WAITI_IRQ 46
  176. #define IIC1_DTEI_IRQ 47
  177. #define IIC1_IPR_ADDR INTC_IPRG
  178. #define IIC1_IPR_POS 0
  179. #define IIC1_PRIORITY 3
  180. /* SIO0 */
  181. #define SIO0_IRQ 88
  182. #define SIO0_IPR_ADDR INTC_IPRI
  183. #define SIO0_IPR_POS 3
  184. #define SIO0_PRIORITY 3
  185. /* SDHI */
  186. #define SDHI_SDHII0_IRQ 100
  187. #define SDHI_SDHII1_IRQ 101
  188. #define SDHI_SDHII2_IRQ 102
  189. #define SDHI_SDHII3_IRQ 103
  190. #define SDHI_IPR_ADDR INTC_IPRK
  191. #define SDHI_IPR_POS 0
  192. #define SDHI_PRIORITY 3
  193. /* SIU (Sound Interface Unit) */
  194. #define SIU_IRQ 108
  195. #define SIU_IPR_ADDR INTC_IPRJ
  196. #define SIU_IPR_POS 1
  197. #define SIU_PRIORITY 3
  198. /* ONCHIP_NR_IRQS */
  199. #define NR_IRQS 109
  200. /* In a generic kernel, NR_IRQS is an upper bound, and we should use
  201. * ACTUAL_NR_IRQS (which uses the machine vector) to get the correct value.
  202. */
  203. #define ACTUAL_NR_IRQS NR_IRQS
  204. extern void disable_irq(unsigned int);
  205. extern void disable_irq_nosync(unsigned int);
  206. extern void enable_irq(unsigned int);
  207. /*
  208. * Simple Mask Register Support
  209. */
  210. extern void make_maskreg_irq(unsigned int irq);
  211. extern unsigned short *irq_mask_register;
  212. /*
  213. * Function for "on chip support modules".
  214. */
  215. extern void make_ipr_irq(unsigned int irq, unsigned int addr,
  216. int pos, int priority);
  217. extern void make_imask_irq(unsigned int irq);
  218. #define PORT_PACR 0xA4050100UL
  219. #define PORT_PBCR 0xA4050102UL
  220. #define PORT_PCCR 0xA4050104UL
  221. #define PORT_PDCR 0xA4050106UL
  222. #define PORT_PECR 0xA4050108UL
  223. #define PORT_PFCR 0xA405010AUL
  224. #define PORT_PGCR 0xA405010CUL
  225. #define PORT_PHCR 0xA405010EUL
  226. #define PORT_PJCR 0xA4050110UL
  227. #define PORT_PKCR 0xA4050112UL
  228. #define PORT_PLCR 0xA4050114UL
  229. #define PORT_SCPCR 0xA4050116UL
  230. #define PORT_PMCR 0xA4050118UL
  231. #define PORT_PNCR 0xA405011AUL
  232. #define PORT_PQCR 0xA405011CUL
  233. #define PORT_PRCR 0xA405011EUL
  234. #define PORT_PTCR 0xA405014CUL
  235. #define PORT_PUCR 0xA405014EUL
  236. #define PORT_PVCR 0xA4050150UL
  237. #define PORT_PSELA 0xA4050140UL
  238. #define PORT_PSELB 0xA4050142UL
  239. #define PORT_PSELC 0xA4050144UL
  240. #define PORT_PSELE 0xA4050158UL
  241. #define PORT_HIZCRA 0xA4050146UL
  242. #define PORT_HIZCRB 0xA4050148UL
  243. #define PORT_DRVCR 0xA405014AUL
  244. #define PORT_PADR 0xA4050120UL
  245. #define PORT_PBDR 0xA4050122UL
  246. #define PORT_PCDR 0xA4050124UL
  247. #define PORT_PDDR 0xA4050126UL
  248. #define PORT_PEDR 0xA4050128UL
  249. #define PORT_PFDR 0xA405012AUL
  250. #define PORT_PGDR 0xA405012CUL
  251. #define PORT_PHDR 0xA405012EUL
  252. #define PORT_PJDR 0xA4050130UL
  253. #define PORT_PKDR 0xA4050132UL
  254. #define PORT_PLDR 0xA4050134UL
  255. #define PORT_SCPDR 0xA4050136UL
  256. #define PORT_PMDR 0xA4050138UL
  257. #define PORT_PNDR 0xA405013AUL
  258. #define PORT_PQDR 0xA405013CUL
  259. #define PORT_PRDR 0xA405013EUL
  260. #define PORT_PTDR 0xA405016CUL
  261. #define PORT_PUDR 0xA405016EUL
  262. #define PORT_PVDR 0xA4050170UL
  263. #define IRQ0_IRQ 32
  264. #define IRQ1_IRQ 33
  265. #define IRQ2_IRQ 34
  266. #define IRQ3_IRQ 35
  267. #define IRQ4_IRQ 36
  268. #define IRQ5_IRQ 37
  269. #define IRQ6_IRQ 38
  270. #define IRQ7_IRQ 39
  271. #define INTPRI00 0xA4140010UL
  272. #define IRQ0_IPR_ADDR INTPRI00
  273. #define IRQ1_IPR_ADDR INTPRI00
  274. #define IRQ2_IPR_ADDR INTPRI00
  275. #define IRQ3_IPR_ADDR INTPRI00
  276. #define IRQ4_IPR_ADDR INTPRI00
  277. #define IRQ5_IPR_ADDR INTPRI00
  278. #define IRQ6_IPR_ADDR INTPRI00
  279. #define IRQ7_IPR_ADDR INTPRI00
  280. #define IRQ0_IPR_POS 7
  281. #define IRQ1_IPR_POS 6
  282. #define IRQ2_IPR_POS 5
  283. #define IRQ3_IPR_POS 4
  284. #define IRQ4_IPR_POS 3
  285. #define IRQ5_IPR_POS 2
  286. #define IRQ6_IPR_POS 1
  287. #define IRQ7_IPR_POS 0
  288. #define IRQ0_PRIORITY 1
  289. #define IRQ1_PRIORITY 1
  290. #define IRQ2_PRIORITY 1
  291. #define IRQ3_PRIORITY 1
  292. #define IRQ4_PRIORITY 1
  293. #define IRQ5_PRIORITY 1
  294. #define IRQ6_PRIORITY 1
  295. #define IRQ7_PRIORITY 1
  296. extern int shmse_irq_demux(int irq);
  297. #define __irq_demux(irq) shmse_irq_demux(irq)
  298. #define irq_demux(irq) __irq_demux(irq)
  299. #endif /* __ASM_SH_IRQ_SH73180_H */