tx4927.h 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525
  1. /*
  2. * Author: MontaVista Software, Inc.
  3. * source@mvista.com
  4. *
  5. * Copyright 2001-2002 MontaVista Software Inc.
  6. *
  7. * This program is free software; you can redistribute it and/or modify it
  8. * under the terms of the GNU General Public License as published by the
  9. * Free Software Foundation; either version 2 of the License, or (at your
  10. * option) any later version.
  11. *
  12. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
  13. * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  16. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  17. * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  18. * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  19. * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
  20. * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
  21. * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  22. *
  23. * You should have received a copy of the GNU General Public License along
  24. * with this program; if not, write to the Free Software Foundation, Inc.,
  25. * 675 Mass Ave, Cambridge, MA 02139, USA.
  26. */
  27. #ifndef __ASM_TX4927_TX4927_H
  28. #define __ASM_TX4927_TX4927_H
  29. #include <asm/tx4927/tx4927_mips.h>
  30. /*
  31. This register naming came from the intergrate cpu/controoler name TX4927
  32. followed by the device name from table 4.2.2 on page 4-3 and then followed
  33. by the register name from table 4.2.3 on pages 4-4 to 4-8. The manaul
  34. used is "TMPR4927BT Preliminary Rev 0.1 20.Jul.2001".
  35. */
  36. #define TX4927_SIO_0_BASE
  37. /* TX4927 controller */
  38. #define TX4927_BASE 0xfff1f0000
  39. #define TX4927_BASE 0xfff1f0000
  40. #define TX4927_LIMIT 0xfff1fffff
  41. /* TX4927 SDRAM controller (64-bit registers) */
  42. #define TX4927_SDRAMC_BASE 0x8000
  43. #define TX4927_SDRAMC_SDCCR0 0x8000
  44. #define TX4927_SDRAMC_SDCCR1 0x8008
  45. #define TX4927_SDRAMC_SDCCR2 0x8010
  46. #define TX4927_SDRAMC_SDCCR3 0x8018
  47. #define TX4927_SDRAMC_SDCTR 0x8040
  48. #define TX4927_SDRAMC_SDCMD 0x8058
  49. #define TX4927_SDRAMC_LIMIT 0x8fff
  50. /* TX4927 external bus controller (64-bit registers) */
  51. #define TX4927_EBUSC_BASE 0x9000
  52. #define TX4927_EBUSC_EBCCR0 0x9000
  53. #define TX4927_EBUSC_EBCCR1 0x9008
  54. #define TX4927_EBUSC_EBCCR2 0x9010
  55. #define TX4927_EBUSC_EBCCR3 0x9018
  56. #define TX4927_EBUSC_EBCCR4 0x9020
  57. #define TX4927_EBUSC_EBCCR5 0x9028
  58. #define TX4927_EBUSC_EBCCR6 0x9030
  59. #define TX4927_EBUSC_EBCCR7 0x9008
  60. #define TX4927_EBUSC_LIMIT 0x9fff
  61. /* TX4927 SDRRAM Error Check Correction (64-bit registers) */
  62. #define TX4927_ECC_BASE 0xa000
  63. #define TX4927_ECC_ECCCR 0xa000
  64. #define TX4927_ECC_ECCSR 0xa008
  65. #define TX4927_ECC_LIMIT 0xafff
  66. /* TX4927 DMA Controller (64-bit registers) */
  67. #define TX4927_DMAC_BASE 0xb000
  68. #define TX4927_DMAC_TBD 0xb000
  69. #define TX4927_DMAC_LIMIT 0xbfff
  70. /* TX4927 PCI Controller (32-bit registers) */
  71. #define TX4927_PCIC_BASE 0xd000
  72. #define TX4927_PCIC_TBD 0xb000
  73. #define TX4927_PCIC_LIMIT 0xdfff
  74. /* TX4927 Configuration registers (64-bit registers) */
  75. #define TX4927_CONFIG_BASE 0xe000
  76. #define TX4927_CONFIG_CCFG 0xe000
  77. #define TX4927_CONFIG_CCFG_RESERVED_42_63 BM_63_42
  78. #define TX4927_CONFIG_CCFG_WDRST BM_41_41
  79. #define TX4927_CONFIG_CCFG_WDREXEN BM_40_40
  80. #define TX4927_CONFIG_CCFG_BCFG BM_39_32
  81. #define TX4927_CONFIG_CCFG_RESERVED_27_31 BM_31_27
  82. #define TX4927_CONFIG_CCFG_GTOT BM_26_25
  83. #define TX4927_CONFIG_CCFG_GTOT_4096 BM_26_25
  84. #define TX4927_CONFIG_CCFG_GTOT_2048 BM_26_26
  85. #define TX4927_CONFIG_CCFG_GTOT_1024 BM_25_25
  86. #define TX4927_CONFIG_CCFG_GTOT_0512 (~BM_26_25)
  87. #define TX4927_CONFIG_CCFG_TINTDIS BM_24_24
  88. #define TX4927_CONFIG_CCFG_PCI66 BM_23_23
  89. #define TX4927_CONFIG_CCFG_PCIMODE BM_22_22
  90. #define TX4927_CONFIG_CCFG_RESERVED_20_21 BM_21_20
  91. #define TX4927_CONFIG_CCFG_DIVMODE BM_19_17
  92. #define TX4927_CONFIG_CCFG_DIVMODE_2_0 BM_19_19
  93. #define TX4927_CONFIG_CCFG_DIVMODE_3_0 (BM_19_19|BM_17_17)
  94. #define TX4927_CONFIG_CCFG_DIVMODE_4_0 BM_19_18
  95. #define TX4927_CONFIG_CCFG_DIVMODE_2_5 BM_19_17
  96. #define TX4927_CONFIG_CCFG_DIVMODE_8_0 (~BM_19_17)
  97. #define TX4927_CONFIG_CCFG_DIVMODE_12_0 BM_17_17
  98. #define TX4927_CONFIG_CCFG_DIVMODE_16_0 BM_18_18
  99. #define TX4927_CONFIG_CCFG_DIVMODE_10_0 BM_18_17
  100. #define TX4927_CONFIG_CCFG_BEOW BM_16_16
  101. #define TX4927_CONFIG_CCFG_WR BM_15_15
  102. #define TX4927_CONFIG_CCFG_TOE BM_14_14
  103. #define TX4927_CONFIG_CCFG_PCIARB BM_13_13
  104. #define TX4927_CONFIG_CCFG_PCIDIVMODE BM_12_11
  105. #define TX4927_CONFIG_CCFG_RESERVED_08_10 BM_10_08
  106. #define TX4927_CONFIG_CCFG_SYSSP BM_07_06
  107. #define TX4927_CONFIG_CCFG_RESERVED_03_05 BM_05_03
  108. #define TX4927_CONFIG_CCFG_ENDIAN BM_02_02
  109. #define TX4927_CONFIG_CCFG_ARMODE BM_01_01
  110. #define TX4927_CONFIG_CCFG_ACEHOLD BM_00_00
  111. #define TX4927_CONFIG_REVID 0xe008
  112. #define TX4927_CONFIG_REVID_RESERVED_32_63 BM_32_63
  113. #define TX4927_CONFIG_REVID_PCODE BM_16_31
  114. #define TX4927_CONFIG_REVID_MJERREV BM_12_15
  115. #define TX4927_CONFIG_REVID_MINEREV BM_08_11
  116. #define TX4927_CONFIG_REVID_MJREV BM_04_07
  117. #define TX4927_CONFIG_REVID_MINREV BM_00_03
  118. #define TX4927_CONFIG_PCFG 0xe010
  119. #define TX4927_CONFIG_PCFG_RESERVED_57_63 BM_57_63
  120. #define TX4927_CONFIG_PCFG_DRVDATA BM_56_56
  121. #define TX4927_CONFIG_PCFG_DRVCB BM_55_55
  122. #define TX4927_CONFIG_PCFG_DRVDQM BM_54_54
  123. #define TX4927_CONFIG_PCFG_DRVADDR BM_53_53
  124. #define TX4927_CONFIG_PCFG_DRVCKE BM_52_52
  125. #define TX4927_CONFIG_PCFG_DRVRAS BM_51_51
  126. #define TX4927_CONFIG_PCFG_DRVCAS BM_50_50
  127. #define TX4927_CONFIG_PCFG_DRVWE BM_49_49
  128. #define TX4927_CONFIG_PCFG_DRVCS3 BM_48_48
  129. #define TX4927_CONFIG_PCFG_DRVCS2 BM_47_47
  130. #define TX4927_CONFIG_PCFG_DRVCS1 BM_46_4k
  131. #define TX4927_CONFIG_PCFG_DRVCS0 BM_45_45
  132. #define TX4927_CONFIG_PCFG_DRVCK3 BM_44_44
  133. #define TX4927_CONFIG_PCFG_DRVCK2 BM_43_43
  134. #define TX4927_CONFIG_PCFG_DRVCK1 BM_42_42
  135. #define TX4927_CONFIG_PCFG_DRVCK0 BM_41_41
  136. #define TX4927_CONFIG_PCFG_DRVCKIN BM_40_40
  137. #define TX4927_CONFIG_PCFG_RESERVED_33_39 BM_33_39
  138. #define TX4927_CONFIG_PCFG_BYPASS_PLL BM_32_32
  139. #define TX4927_CONFIG_PCFG_RESERVED_30_31 BM_30_31
  140. #define TX4927_CONFIG_PCFG_SDCLKDLY BM_28_29
  141. #define TX4927_CONFIG_PCFG_SDCLKDLY_DELAY_1 (~BM_28_29)
  142. #define TX4927_CONFIG_PCFG_SDCLKDLY_DELAY_2 BM_28_28
  143. #define TX4927_CONFIG_PCFG_SDCLKDLY_DELAY_3 BM_29_29
  144. #define TX4927_CONFIG_PCFG_SDCLKDLY_DELAY_4 BM_28_29
  145. #define TX4927_CONFIG_PCFG_SYSCLKEN BM_27_27
  146. #define TX4927_CONFIG_PCFG_SDCLKEN3 BM_26_26
  147. #define TX4927_CONFIG_PCFG_SDCLKEN2 BM_25_25
  148. #define TX4927_CONFIG_PCFG_SDCLKEN1 BM_24_24
  149. #define TX4927_CONFIG_PCFG_SDCLKEN0 BM_23_23
  150. #define TX4927_CONFIG_PCFG_SDCLKINEN BM_22_22
  151. #define TX4927_CONFIG_PCFG_PCICLKEN5 BM_21_21
  152. #define TX4927_CONFIG_PCFG_PCICLKEN4 BM_20_20
  153. #define TX4927_CONFIG_PCFG_PCICLKEN3 BM_19_19
  154. #define TX4927_CONFIG_PCFG_PCICLKEN2 BM_18_18
  155. #define TX4927_CONFIG_PCFG_PCICLKEN1 BM_17_17
  156. #define TX4927_CONFIG_PCFG_PCICLKEN0 BM_16_16
  157. #define TX4927_CONFIG_PCFG_RESERVED_10_15 BM_10_15
  158. #define TX4927_CONFIG_PCFG_SEL2 BM_09_09
  159. #define TX4927_CONFIG_PCFG_SEL1 BM_08_08
  160. #define TX4927_CONFIG_PCFG_DMASEL3 BM_06_07
  161. #define TX4927_CONFIG_PCFG_DMASEL3_DMAREQ3 (~BM_06_07)
  162. #define TX4927_CONFIG_PCFG_DMASEL3_SIO0 BM_06_06
  163. #define TX4927_CONFIG_PCFG_DMASEL3_ACLC3 BM_07_07
  164. #define TX4927_CONFIG_PCFG_DMASEL3_ACLC1 BM_06_07
  165. #define TX4927_CONFIG_PCFG_DMASEL2 BM_06_07
  166. #define TX4927_CONFIG_PCFG_DMASEL2_SEL2_0_DMAREQ2 (~BM_06_07)
  167. #define TX4927_CONFIG_PCFG_DMASEL2_SEL2_0_SIO0 BM_06_06
  168. #define TX4927_CONFIG_PCFG_DMASEL2_SEL2_0_RESERVED_10 BM_07_07
  169. #define TX4927_CONFIG_PCFG_DMASEL2_SEL2_0_RESERVED_11 BM_06_07
  170. #define TX4927_CONFIG_PCFG_DMASEL2_SEL2_1_ACLC1 (~BM_06_07)
  171. #define TX4927_CONFIG_PCFG_DMASEL2_SEL2_1_SIO0 BM_06_06
  172. #define TX4927_CONFIG_PCFG_DMASEL2_SEL2_1_ACLC2 BM_07_07
  173. #define TX4927_CONFIG_PCFG_DMASEL2_SEL2_1_ACLC0 BM_06_07
  174. #define TX4927_CONFIG_PCFG_DMASEL1 BM_02_03
  175. #define TX4927_CONFIG_PCFG_DMASEL1_DMAREQ1 (~BM_02_03)
  176. #define TX4927_CONFIG_PCFG_DMASEL1_SIO1 BM_02_02
  177. #define TX4927_CONFIG_PCFG_DMASEL1_ACLC1 BM_03_03
  178. #define TX4927_CONFIG_PCFG_DMASEL1_ACLC3 BM_02_03
  179. #define TX4927_CONFIG_PCFG_DMASEL0 BM_00_01
  180. #define TX4927_CONFIG_PCFG_DMASEL0_DMAREQ0 (~BM_00_01)
  181. #define TX4927_CONFIG_PCFG_DMASEL0_SIO1 BM_00_00
  182. #define TX4927_CONFIG_PCFG_DMASEL0_ACLC0 BM_01_01
  183. #define TX4927_CONFIG_PCFG_DMASEL0_ACLC2 BM_00_01
  184. #define TX4927_CONFIG_TOEA 0xe018
  185. #define TX4927_CONFIG_TOEA_RESERVED_36_63 BM_36_63
  186. #define TX4927_CONFIG_TOEA_TOEA BM_00_35
  187. #define TX4927_CONFIG_CLKCTR 0xe020
  188. #define TX4927_CONFIG_CLKCTR_RESERVED_26_63 BM_26_63
  189. #define TX4927_CONFIG_CLKCTR_ACLCKD BM_25_25
  190. #define TX4927_CONFIG_CLKCTR_PIOCKD BM_24_24
  191. #define TX4927_CONFIG_CLKCTR_DMACKD BM_23_23
  192. #define TX4927_CONFIG_CLKCTR_PCICKD BM_22_22
  193. #define TX4927_CONFIG_CLKCTR_SET_21 BM_21_21
  194. #define TX4927_CONFIG_CLKCTR_TM0CKD BM_20_20
  195. #define TX4927_CONFIG_CLKCTR_TM1CKD BM_19_19
  196. #define TX4927_CONFIG_CLKCTR_TM2CKD BM_18_18
  197. #define TX4927_CONFIG_CLKCTR_SIO0CKD BM_17_17
  198. #define TX4927_CONFIG_CLKCTR_SIO1CKD BM_16_16
  199. #define TX4927_CONFIG_CLKCTR_RESERVED_10_15 BM_10_15
  200. #define TX4927_CONFIG_CLKCTR_ACLRST BM_09_09
  201. #define TX4927_CONFIG_CLKCTR_PIORST BM_08_08
  202. #define TX4927_CONFIG_CLKCTR_DMARST BM_07_07
  203. #define TX4927_CONFIG_CLKCTR_PCIRST BM_06_06
  204. #define TX4927_CONFIG_CLKCTR_RESERVED_05_05 BM_05_05
  205. #define TX4927_CONFIG_CLKCTR_TM0RST BM_04_04
  206. #define TX4927_CONFIG_CLKCTR_TM1RST BM_03_03
  207. #define TX4927_CONFIG_CLKCTR_TM2RST BM_02_02
  208. #define TX4927_CONFIG_CLKCTR_SIO0RST BM_01_01
  209. #define TX4927_CONFIG_CLKCTR_SIO1RST BM_00_00
  210. #define TX4927_CONFIG_GARBC 0xe030
  211. #define TX4927_CONFIG_GARBC_RESERVED_10_63 BM_10_63
  212. #define TX4927_CONFIG_GARBC_SET_09 BM_09_09
  213. #define TX4927_CONFIG_GARBC_ARBMD BM_08_08
  214. #define TX4927_CONFIG_GARBC_RESERVED_06_07 BM_06_07
  215. #define TX4927_CONFIG_GARBC_PRIORITY_H1 BM_04_05
  216. #define TX4927_CONFIG_GARBC_PRIORITY_H1_PCI (~BM_04_05)
  217. #define TX4927_CONFIG_GARBC_PRIORITY_H1_PDMAC BM_04_04
  218. #define TX4927_CONFIG_GARBC_PRIORITY_H1_DMAC BM_05_05
  219. #define TX4927_CONFIG_GARBC_PRIORITY_H1_BAD_VALUE BM_04_05
  220. #define TX4927_CONFIG_GARBC_PRIORITY_H2 BM_02_03
  221. #define TX4927_CONFIG_GARBC_PRIORITY_H2_PCI (~BM_02_03)
  222. #define TX4927_CONFIG_GARBC_PRIORITY_H2_PDMAC BM_02_02
  223. #define TX4927_CONFIG_GARBC_PRIORITY_H2_DMAC BM_03_03
  224. #define TX4927_CONFIG_GARBC_PRIORITY_H2_BAD_VALUE BM_02_03
  225. #define TX4927_CONFIG_GARBC_PRIORITY_H3 BM_00_01
  226. #define TX4927_CONFIG_GARBC_PRIORITY_H3_PCI (~BM_00_01)
  227. #define TX4927_CONFIG_GARBC_PRIORITY_H3_PDMAC BM_00_00
  228. #define TX4927_CONFIG_GARBC_PRIORITY_H3_DMAC BM_01_01
  229. #define TX4927_CONFIG_GARBC_PRIORITY_H3_BAD_VALUE BM_00_01
  230. #define TX4927_CONFIG_RAMP 0xe048
  231. #define TX4927_CONFIG_RAMP_RESERVED_20_63 BM_20_63
  232. #define TX4927_CONFIG_RAMP_RAMP BM_00_19
  233. #define TX4927_CONFIG_LIMIT 0xefff
  234. /* TX4927 Timer 0 (32-bit registers) */
  235. #define TX4927_TMR0_BASE 0xf000
  236. #define TX4927_TMR0_TMTCR0 0xf004
  237. #define TX4927_TMR0_TMTISR0 0xf008
  238. #define TX4927_TMR0_TMCPRA0 0xf008
  239. #define TX4927_TMR0_TMCPRB0 0xf00c
  240. #define TX4927_TMR0_TMITMR0 0xf010
  241. #define TX4927_TMR0_TMCCDR0 0xf020
  242. #define TX4927_TMR0_TMPGMR0 0xf030
  243. #define TX4927_TMR0_TMTRR0 0xf0f0
  244. #define TX4927_TMR0_LIMIT 0xf0ff
  245. /* TX4927 Timer 1 (32-bit registers) */
  246. #define TX4927_TMR1_BASE 0xf100
  247. #define TX4927_TMR1_TMTCR1 0xf104
  248. #define TX4927_TMR1_TMTISR1 0xf108
  249. #define TX4927_TMR1_TMCPRA1 0xf108
  250. #define TX4927_TMR1_TMCPRB1 0xf10c
  251. #define TX4927_TMR1_TMITMR1 0xf110
  252. #define TX4927_TMR1_TMCCDR1 0xf120
  253. #define TX4927_TMR1_TMPGMR1 0xf130
  254. #define TX4927_TMR1_TMTRR1 0xf1f0
  255. #define TX4927_TMR1_LIMIT 0xf1ff
  256. /* TX4927 Timer 2 (32-bit registers) */
  257. #define TX4927_TMR2_BASE 0xf200
  258. #define TX4927_TMR2_TMTCR2 0xf104
  259. #define TX4927_TMR2_TMTISR2 0xf208
  260. #define TX4927_TMR2_TMCPRA2 0xf208
  261. #define TX4927_TMR2_TMCPRB2 0xf20c
  262. #define TX4927_TMR2_TMITMR2 0xf210
  263. #define TX4927_TMR2_TMCCDR2 0xf220
  264. #define TX4927_TMR2_TMPGMR2 0xf230
  265. #define TX4927_TMR2_TMTRR2 0xf2f0
  266. #define TX4927_TMR2_LIMIT 0xf2ff
  267. /* TX4927 serial port 0 (32-bit registers) */
  268. #define TX4927_SIO0_BASE 0xf300
  269. #define TX4927_SIO0_SILCR0 0xf300
  270. #define TX4927_SIO0_SILCR0_RESERVED_16_31 BM_16_31
  271. #define TX4927_SIO0_SILCR0_RWUB BM_15_15
  272. #define TX4927_SIO0_SILCR0_TWUB BM_14_14
  273. #define TX4927_SIO0_SILCR0_UODE BM_13_13
  274. #define TX4927_SIO0_SILCR0_RESERVED_07_12 BM_07_12
  275. #define TX4927_SIO0_SILCR0_SCS BM_05_06
  276. #define TX4927_SIO0_SILCR0_SCS_IMBUSCLK_IC (~BM_05_06)
  277. #define TX4927_SIO0_SILCR0_SCS_IMBUSCLK_BRG BM_05_05
  278. #define TX4927_SIO0_SILCR0_SCS_SCLK_EC BM_06_06
  279. #define TX4927_SIO0_SILCR0_SCS_SCLK_BRG BM_05_06
  280. #define TX4927_SIO0_SILCR0_UEPS BM_04_04
  281. #define TX4927_SIO0_SILCR0_UPEN BM_03_03
  282. #define TX4927_SIO0_SILCR0_USBL BM_02_02
  283. #define TX4927_SIO0_SILCR0_UMODE BM_00_01
  284. #define TX4927_SIO0_SILCR0_UMODE_DATA_8_BIT BM_00_01
  285. #define TX4927_SIO0_SILCR0_UMODE_DATA_7_BIT (~BM_00_01)
  286. #define TX4927_SIO0_SILCR0_UMODE_DATA_8_BIT_MC BM_01_01
  287. #define TX4927_SIO0_SILCR0_UMODE_DATA_7_BIT_MC BM_00_01
  288. #define TX4927_SIO0_SIDICR0 0xf304
  289. #define TX4927_SIO0_SIDICR0_RESERVED_16_31 BM_16_31
  290. #define TX4927_SIO0_SIDICR0_TDE BM_15_15
  291. #define TX4927_SIO0_SIDICR0_RDE BM_14_14
  292. #define TX4927_SIO0_SIDICR0_TIE BM_13_13
  293. #define TX4927_SIO0_SIDICR0_RIE BM_12_12
  294. #define TX4927_SIO0_SIDICR0_SPIE BM_11_11
  295. #define TX4927_SIO0_SIDICR0_CTSAC BM_09_10
  296. #define TX4927_SIO0_SIDICR0_CTSAC_NONE (~BM_09_10)
  297. #define TX4927_SIO0_SIDICR0_CTSAC_RISE BM_09_09
  298. #define TX4927_SIO0_SIDICR0_CTSAC_FALL BM_10_10
  299. #define TX4927_SIO0_SIDICR0_CTSAC_BOTH BM_09_10
  300. #define TX4927_SIO0_SIDICR0_RESERVED_06_08 BM_06_08
  301. #define TX4927_SIO0_SIDICR0_STIE BM_00_05
  302. #define TX4927_SIO0_SIDICR0_STIE_NONE (~BM_00_05)
  303. #define TX4927_SIO0_SIDICR0_STIE_OERS BM_05_05
  304. #define TX4927_SIO0_SIDICR0_STIE_CTSAC BM_04_04
  305. #define TX4927_SIO0_SIDICR0_STIE_RBRKD BM_03_03
  306. #define TX4927_SIO0_SIDICR0_STIE_TRDY BM_02_02
  307. #define TX4927_SIO0_SIDICR0_STIE_TXALS BM_01_01
  308. #define TX4927_SIO0_SIDICR0_STIE_UBRKD BM_00_00
  309. #define TX4927_SIO0_SIDISR0 0xf308
  310. #define TX4927_SIO0_SIDISR0_RESERVED_16_31 BM_16_31
  311. #define TX4927_SIO0_SIDISR0_UBRK BM_15_15
  312. #define TX4927_SIO0_SIDISR0_UVALID BM_14_14
  313. #define TX4927_SIO0_SIDISR0_UFER BM_13_13
  314. #define TX4927_SIO0_SIDISR0_UPER BM_12_12
  315. #define TX4927_SIO0_SIDISR0_UOER BM_11_11
  316. #define TX4927_SIO0_SIDISR0_ERI BM_10_10
  317. #define TX4927_SIO0_SIDISR0_TOUT BM_09_09
  318. #define TX4927_SIO0_SIDISR0_TDIS BM_08_08
  319. #define TX4927_SIO0_SIDISR0_RDIS BM_07_07
  320. #define TX4927_SIO0_SIDISR0_STIS BM_06_06
  321. #define TX4927_SIO0_SIDISR0_RESERVED_05_05 BM_05_05
  322. #define TX4927_SIO0_SIDISR0_RFDN BM_00_04
  323. #define TX4927_SIO0_SISCISR0 0xf30c
  324. #define TX4927_SIO0_SISCISR0_RESERVED_06_31 BM_06_31
  325. #define TX4927_SIO0_SISCISR0_OERS BM_05_05
  326. #define TX4927_SIO0_SISCISR0_CTSS BM_04_04
  327. #define TX4927_SIO0_SISCISR0_RBRKD BM_03_03
  328. #define TX4927_SIO0_SISCISR0_TRDY BM_02_02
  329. #define TX4927_SIO0_SISCISR0_TXALS BM_01_01
  330. #define TX4927_SIO0_SISCISR0_UBRKD BM_00_00
  331. #define TX4927_SIO0_SIFCR0 0xf310
  332. #define TX4927_SIO0_SIFCR0_RESERVED_16_31 BM_16_31
  333. #define TX4927_SIO0_SIFCR0_SWRST BM_16_31
  334. #define TX4927_SIO0_SIFCR0_RESERVED_09_14 BM_09_14
  335. #define TX4927_SIO0_SIFCR0_RDIL BM_16_31
  336. #define TX4927_SIO0_SIFCR0_RDIL_BYTES_1 (~BM_07_08)
  337. #define TX4927_SIO0_SIFCR0_RDIL_BYTES_4 BM_07_07
  338. #define TX4927_SIO0_SIFCR0_RDIL_BYTES_8 BM_08_08
  339. #define TX4927_SIO0_SIFCR0_RDIL_BYTES_12 BM_07_08
  340. #define TX4927_SIO0_SIFCR0_RESERVED_05_06 BM_05_06
  341. #define TX4927_SIO0_SIFCR0_TDIL BM_03_04
  342. #define TX4927_SIO0_SIFCR0_TDIL_BYTES_1 (~BM_03_04)
  343. #define TX4927_SIO0_SIFCR0_TDIL_BYTES_4 BM_03_03
  344. #define TX4927_SIO0_SIFCR0_TDIL_BYTES_8 BM_04_04
  345. #define TX4927_SIO0_SIFCR0_TDIL_BYTES_0 BM_03_04
  346. #define TX4927_SIO0_SIFCR0_TFRST BM_02_02
  347. #define TX4927_SIO0_SIFCR0_RFRST BM_01_01
  348. #define TX4927_SIO0_SIFCR0_FRSTE BM_00_00
  349. #define TX4927_SIO0_SIFLCR0 0xf314
  350. #define TX4927_SIO0_SIFLCR0_RESERVED_13_31 BM_13_31
  351. #define TX4927_SIO0_SIFLCR0_RCS BM_12_12
  352. #define TX4927_SIO0_SIFLCR0_TES BM_11_11
  353. #define TX4927_SIO0_SIFLCR0_RESERVED_10_10 BM_10_10
  354. #define TX4927_SIO0_SIFLCR0_RTSSC BM_09_09
  355. #define TX4927_SIO0_SIFLCR0_RSDE BM_08_08
  356. #define TX4927_SIO0_SIFLCR0_TSDE BM_07_07
  357. #define TX4927_SIO0_SIFLCR0_RESERVED_05_06 BM_05_06
  358. #define TX4927_SIO0_SIFLCR0_RTSTL BM_01_04
  359. #define TX4927_SIO0_SIFLCR0_TBRK BM_00_00
  360. #define TX4927_SIO0_SIBGR0 0xf318
  361. #define TX4927_SIO0_SIBGR0_RESERVED_10_31 BM_10_31
  362. #define TX4927_SIO0_SIBGR0_BCLK BM_08_09
  363. #define TX4927_SIO0_SIBGR0_BCLK_T0 (~BM_08_09)
  364. #define TX4927_SIO0_SIBGR0_BCLK_T2 BM_08_08
  365. #define TX4927_SIO0_SIBGR0_BCLK_T4 BM_09_09
  366. #define TX4927_SIO0_SIBGR0_BCLK_T6 BM_08_09
  367. #define TX4927_SIO0_SIBGR0_BRD BM_00_07
  368. #define TX4927_SIO0_SITFIF00 0xf31c
  369. #define TX4927_SIO0_SITFIF00_RESERVED_08_31 BM_08_31
  370. #define TX4927_SIO0_SITFIF00_TXD BM_00_07
  371. #define TX4927_SIO0_SIRFIFO0 0xf320
  372. #define TX4927_SIO0_SIRFIFO0_RESERVED_08_31 BM_08_31
  373. #define TX4927_SIO0_SIRFIFO0_RXD BM_00_07
  374. #define TX4927_SIO0_SIRFIFO0 0xf320
  375. #define TX4927_SIO0_LIMIT 0xf3ff
  376. /* TX4927 serial port 1 (32-bit registers) */
  377. #define TX4927_SIO1_BASE 0xf400
  378. #define TX4927_SIO1_SILCR1 0xf400
  379. #define TX4927_SIO1_SIDICR1 0xf404
  380. #define TX4927_SIO1_SIDISR1 0xf408
  381. #define TX4927_SIO1_SISCISR1 0xf40c
  382. #define TX4927_SIO1_SIFCR1 0xf410
  383. #define TX4927_SIO1_SIFLCR1 0xf414
  384. #define TX4927_SIO1_SIBGR1 0xf418
  385. #define TX4927_SIO1_SITFIF01 0xf41c
  386. #define TX4927_SIO1_SIRFIFO1 0xf420
  387. #define TX4927_SIO1_LIMIT 0xf4ff
  388. /* TX4927 parallel port (32-bit registers) */
  389. #define TX4927_PIO_BASE 0xf500
  390. #define TX4927_PIO_PIOD0 0xf500
  391. #define TX4927_PIO_PIODI 0xf504
  392. #define TX4927_PIO_PIODIR 0xf508
  393. #define TX4927_PIO_PIOOD 0xf50c
  394. #define TX4927_PIO_LIMIT 0xf50f
  395. /* TX4927 Interrupt Controller (32-bit registers) */
  396. #define TX4927_IRC_BASE 0xf510
  397. #define TX4927_IRC_IRFLAG0 0xf510
  398. #define TX4927_IRC_IRFLAG1 0xf514
  399. #define TX4927_IRC_IRPOL 0xf518
  400. #define TX4927_IRC_IRRCNT 0xf51c
  401. #define TX4927_IRC_IRMASKINT 0xf520
  402. #define TX4927_IRC_IRMASKEXT 0xf524
  403. #define TX4927_IRC_IRDEN 0xf600
  404. #define TX4927_IRC_IRDM0 0xf604
  405. #define TX4927_IRC_IRDM1 0xf608
  406. #define TX4927_IRC_IRLVL0 0xf610
  407. #define TX4927_IRC_IRLVL1 0xf614
  408. #define TX4927_IRC_IRLVL2 0xf618
  409. #define TX4927_IRC_IRLVL3 0xf61c
  410. #define TX4927_IRC_IRLVL4 0xf620
  411. #define TX4927_IRC_IRLVL5 0xf624
  412. #define TX4927_IRC_IRLVL6 0xf628
  413. #define TX4927_IRC_IRLVL7 0xf62c
  414. #define TX4927_IRC_IRMSK 0xf640
  415. #define TX4927_IRC_IREDC 0xf660
  416. #define TX4927_IRC_IRPND 0xf680
  417. #define TX4927_IRC_IRCS 0xf6a0
  418. #define TX4927_IRC_LIMIT 0xf6ff
  419. /* TX4927 AC-link controller (32-bit registers) */
  420. #define TX4927_ACLC_BASE 0xf700
  421. #define TX4927_ACLC_ACCTLEN 0xf700
  422. #define TX4927_ACLC_ACCTLDIS 0xf704
  423. #define TX4927_ACLC_ACREGACC 0xf708
  424. #define TX4927_ACLC_ACINTSTS 0xf710
  425. #define TX4927_ACLC_ACINTMSTS 0xf714
  426. #define TX4927_ACLC_ACINTEN 0xf718
  427. #define TX4927_ACLC_ACINTDIS 0xf71c
  428. #define TX4927_ACLC_ACSEMAPH 0xf720
  429. #define TX4927_ACLC_ACGPIDAT 0xf740
  430. #define TX4927_ACLC_ACGPODAT 0xf744
  431. #define TX4927_ACLC_ACSLTEN 0xf748
  432. #define TX4927_ACLC_ACSLTDIS 0xf74c
  433. #define TX4927_ACLC_ACFIFOSTS 0xf750
  434. #define TX4927_ACLC_ACDMASTS 0xf780
  435. #define TX4927_ACLC_ACDMASEL 0xf784
  436. #define TX4927_ACLC_ACAUDODAT 0xf7a0
  437. #define TX4927_ACLC_ACSURRDAT 0xf7a4
  438. #define TX4927_ACLC_ACCENTDAT 0xf7a8
  439. #define TX4927_ACLC_ACLFEDAT 0xf7ac
  440. #define TX4927_ACLC_ACAUDIDAT 0xf7b0
  441. #define TX4927_ACLC_ACMODODAT 0xf7b8
  442. #define TX4927_ACLC_ACMODIDAT 0xf7bc
  443. #define TX4927_ACLC_ACREVID 0xf7fc
  444. #define TX4927_ACLC_LIMIT 0xf7ff
  445. #define TX4927_REG(x) ((TX4927_BASE)+(x))
  446. #define TX4927_RD08( reg ) (*(vu08*)(reg))
  447. #define TX4927_WR08( reg, val ) ((*(vu08*)(reg))=(val))
  448. #define TX4927_RD16( reg ) (*(vu16*)(reg))
  449. #define TX4927_WR16( reg, val ) ((*(vu16*)(reg))=(val))
  450. #define TX4927_RD32( reg ) (*(vu32*)(reg))
  451. #define TX4927_WR32( reg, val ) ((*(vu32*)(reg))=(val))
  452. #define TX4927_RD64( reg ) (*(vu64*)(reg))
  453. #define TX4927_WR64( reg, val ) ((*(vu64*)(reg))=(val))
  454. #define TX4927_RD( reg ) TX4927_RD32( reg )
  455. #define TX4927_WR( reg, val ) TX4927_WR32( reg, val )
  456. #define MI8259_IRQ_ISA_RAW_BEG 0 /* optional backplane i8259 */
  457. #define MI8259_IRQ_ISA_RAW_END 15
  458. #define TX4927_IRQ_CP0_RAW_BEG 0 /* tx4927 cpu built-in cp0 */
  459. #define TX4927_IRQ_CP0_RAW_END 7
  460. #define TX4927_IRQ_PIC_RAW_BEG 0 /* tx4927 cpu build-in pic */
  461. #define TX4927_IRQ_PIC_RAW_END 31
  462. #define MI8259_IRQ_ISA_BEG MI8259_IRQ_ISA_RAW_BEG /* 0 */
  463. #define MI8259_IRQ_ISA_END MI8259_IRQ_ISA_RAW_END /* 15 */
  464. #define TX4927_IRQ_CP0_BEG ((MI8259_IRQ_ISA_END+1)+TX4927_IRQ_CP0_RAW_BEG) /* 16 */
  465. #define TX4927_IRQ_CP0_END ((MI8259_IRQ_ISA_END+1)+TX4927_IRQ_CP0_RAW_END) /* 23 */
  466. #define TX4927_IRQ_PIC_BEG ((TX4927_IRQ_CP0_END+1)+TX4927_IRQ_PIC_RAW_BEG) /* 24 */
  467. #define TX4927_IRQ_PIC_END ((TX4927_IRQ_CP0_END+1)+TX4927_IRQ_PIC_RAW_END) /* 55 */
  468. #define TX4927_IRQ_USER0 (TX4927_IRQ_CP0_BEG+0)
  469. #define TX4927_IRQ_USER1 (TX4927_IRQ_CP0_BEG+1)
  470. #define TX4927_IRQ_NEST_PIC_ON_CP0 (TX4927_IRQ_CP0_BEG+2)
  471. #define TX4927_IRQ_CPU_TIMER (TX4927_IRQ_CP0_BEG+7)
  472. #define TX4927_IRQ_NEST_EXT_ON_PIC (TX4927_IRQ_PIC_BEG+3)
  473. #endif /* __ASM_TX4927_TX4927_H */