au1000.h 40 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282
  1. /*
  2. *
  3. * BRIEF MODULE DESCRIPTION
  4. * Include file for Alchemy Semiconductor's Au1k CPU.
  5. *
  6. * Copyright 2000-2001, 2006-2008 MontaVista Software Inc.
  7. * Author: MontaVista Software, Inc. <source@mvista.com>
  8. *
  9. * This program is free software; you can redistribute it and/or modify it
  10. * under the terms of the GNU General Public License as published by the
  11. * Free Software Foundation; either version 2 of the License, or (at your
  12. * option) any later version.
  13. *
  14. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
  15. * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  16. * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
  17. * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  18. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  19. * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  20. * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
  21. * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  22. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  23. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  24. *
  25. * You should have received a copy of the GNU General Public License along
  26. * with this program; if not, write to the Free Software Foundation, Inc.,
  27. * 675 Mass Ave, Cambridge, MA 02139, USA.
  28. */
  29. /*
  30. * some definitions add by takuzo@sm.sony.co.jp and sato@sm.sony.co.jp
  31. */
  32. #ifndef _AU1000_H_
  33. #define _AU1000_H_
  34. /* SOC Interrupt numbers */
  35. /* Au1000-style (IC0/1): 2 controllers with 32 sources each */
  36. #define AU1000_INTC0_INT_BASE (MIPS_CPU_IRQ_BASE + 8)
  37. #define AU1000_INTC0_INT_LAST (AU1000_INTC0_INT_BASE + 31)
  38. #define AU1000_INTC1_INT_BASE (AU1000_INTC0_INT_LAST + 1)
  39. #define AU1000_INTC1_INT_LAST (AU1000_INTC1_INT_BASE + 31)
  40. #define AU1000_MAX_INTR AU1000_INTC1_INT_LAST
  41. /* Au1300-style (GPIC): 1 controller with up to 128 sources */
  42. #define ALCHEMY_GPIC_INT_BASE (MIPS_CPU_IRQ_BASE + 8)
  43. #define ALCHEMY_GPIC_INT_NUM 128
  44. #define ALCHEMY_GPIC_INT_LAST (ALCHEMY_GPIC_INT_BASE + ALCHEMY_GPIC_INT_NUM - 1)
  45. /* common clock names, shared among all variants. AUXPLL2 is Au1300 */
  46. #define ALCHEMY_ROOT_CLK "root_clk"
  47. #define ALCHEMY_CPU_CLK "cpu_clk"
  48. #define ALCHEMY_AUXPLL_CLK "auxpll_clk"
  49. #define ALCHEMY_AUXPLL2_CLK "auxpll2_clk"
  50. #define ALCHEMY_SYSBUS_CLK "sysbus_clk"
  51. #define ALCHEMY_PERIPH_CLK "periph_clk"
  52. #define ALCHEMY_MEM_CLK "mem_clk"
  53. #define ALCHEMY_LR_CLK "lr_clk"
  54. #define ALCHEMY_FG0_CLK "fg0_clk"
  55. #define ALCHEMY_FG1_CLK "fg1_clk"
  56. #define ALCHEMY_FG2_CLK "fg2_clk"
  57. #define ALCHEMY_FG3_CLK "fg3_clk"
  58. #define ALCHEMY_FG4_CLK "fg4_clk"
  59. #define ALCHEMY_FG5_CLK "fg5_clk"
  60. /* Au1300 peripheral interrupt numbers */
  61. #define AU1300_FIRST_INT (ALCHEMY_GPIC_INT_BASE)
  62. #define AU1300_UART1_INT (AU1300_FIRST_INT + 17)
  63. #define AU1300_UART2_INT (AU1300_FIRST_INT + 25)
  64. #define AU1300_UART3_INT (AU1300_FIRST_INT + 27)
  65. #define AU1300_SD1_INT (AU1300_FIRST_INT + 32)
  66. #define AU1300_SD2_INT (AU1300_FIRST_INT + 38)
  67. #define AU1300_PSC0_INT (AU1300_FIRST_INT + 48)
  68. #define AU1300_PSC1_INT (AU1300_FIRST_INT + 52)
  69. #define AU1300_PSC2_INT (AU1300_FIRST_INT + 56)
  70. #define AU1300_PSC3_INT (AU1300_FIRST_INT + 60)
  71. #define AU1300_NAND_INT (AU1300_FIRST_INT + 62)
  72. #define AU1300_DDMA_INT (AU1300_FIRST_INT + 75)
  73. #define AU1300_MMU_INT (AU1300_FIRST_INT + 76)
  74. #define AU1300_MPU_INT (AU1300_FIRST_INT + 77)
  75. #define AU1300_GPU_INT (AU1300_FIRST_INT + 78)
  76. #define AU1300_UDMA_INT (AU1300_FIRST_INT + 79)
  77. #define AU1300_TOY_INT (AU1300_FIRST_INT + 80)
  78. #define AU1300_TOY_MATCH0_INT (AU1300_FIRST_INT + 81)
  79. #define AU1300_TOY_MATCH1_INT (AU1300_FIRST_INT + 82)
  80. #define AU1300_TOY_MATCH2_INT (AU1300_FIRST_INT + 83)
  81. #define AU1300_RTC_INT (AU1300_FIRST_INT + 84)
  82. #define AU1300_RTC_MATCH0_INT (AU1300_FIRST_INT + 85)
  83. #define AU1300_RTC_MATCH1_INT (AU1300_FIRST_INT + 86)
  84. #define AU1300_RTC_MATCH2_INT (AU1300_FIRST_INT + 87)
  85. #define AU1300_UART0_INT (AU1300_FIRST_INT + 88)
  86. #define AU1300_SD0_INT (AU1300_FIRST_INT + 89)
  87. #define AU1300_USB_INT (AU1300_FIRST_INT + 90)
  88. #define AU1300_LCD_INT (AU1300_FIRST_INT + 91)
  89. #define AU1300_BSA_INT (AU1300_FIRST_INT + 92)
  90. #define AU1300_MPE_INT (AU1300_FIRST_INT + 93)
  91. #define AU1300_ITE_INT (AU1300_FIRST_INT + 94)
  92. #define AU1300_AES_INT (AU1300_FIRST_INT + 95)
  93. #define AU1300_CIM_INT (AU1300_FIRST_INT + 96)
  94. /**********************************************************************/
  95. /*
  96. * Physical base addresses for integrated peripherals
  97. * 0..au1000 1..au1500 2..au1100 3..au1550 4..au1200 5..au1300
  98. */
  99. #define AU1000_AC97_PHYS_ADDR 0x10000000 /* 012 */
  100. #define AU1300_ROM_PHYS_ADDR 0x10000000 /* 5 */
  101. #define AU1300_OTP_PHYS_ADDR 0x10002000 /* 5 */
  102. #define AU1300_VSS_PHYS_ADDR 0x10003000 /* 5 */
  103. #define AU1300_UART0_PHYS_ADDR 0x10100000 /* 5 */
  104. #define AU1300_UART1_PHYS_ADDR 0x10101000 /* 5 */
  105. #define AU1300_UART2_PHYS_ADDR 0x10102000 /* 5 */
  106. #define AU1300_UART3_PHYS_ADDR 0x10103000 /* 5 */
  107. #define AU1000_USB_OHCI_PHYS_ADDR 0x10100000 /* 012 */
  108. #define AU1000_USB_UDC_PHYS_ADDR 0x10200000 /* 0123 */
  109. #define AU1300_GPIC_PHYS_ADDR 0x10200000 /* 5 */
  110. #define AU1000_IRDA_PHYS_ADDR 0x10300000 /* 02 */
  111. #define AU1200_AES_PHYS_ADDR 0x10300000 /* 45 */
  112. #define AU1000_IC0_PHYS_ADDR 0x10400000 /* 01234 */
  113. #define AU1300_GPU_PHYS_ADDR 0x10500000 /* 5 */
  114. #define AU1000_MAC0_PHYS_ADDR 0x10500000 /* 023 */
  115. #define AU1000_MAC1_PHYS_ADDR 0x10510000 /* 023 */
  116. #define AU1000_MACEN_PHYS_ADDR 0x10520000 /* 023 */
  117. #define AU1100_SD0_PHYS_ADDR 0x10600000 /* 245 */
  118. #define AU1300_SD1_PHYS_ADDR 0x10601000 /* 5 */
  119. #define AU1300_SD2_PHYS_ADDR 0x10602000 /* 5 */
  120. #define AU1100_SD1_PHYS_ADDR 0x10680000 /* 24 */
  121. #define AU1300_SYS_PHYS_ADDR 0x10900000 /* 5 */
  122. #define AU1550_PSC2_PHYS_ADDR 0x10A00000 /* 3 */
  123. #define AU1550_PSC3_PHYS_ADDR 0x10B00000 /* 3 */
  124. #define AU1300_PSC0_PHYS_ADDR 0x10A00000 /* 5 */
  125. #define AU1300_PSC1_PHYS_ADDR 0x10A01000 /* 5 */
  126. #define AU1300_PSC2_PHYS_ADDR 0x10A02000 /* 5 */
  127. #define AU1300_PSC3_PHYS_ADDR 0x10A03000 /* 5 */
  128. #define AU1000_I2S_PHYS_ADDR 0x11000000 /* 02 */
  129. #define AU1500_MAC0_PHYS_ADDR 0x11500000 /* 1 */
  130. #define AU1500_MAC1_PHYS_ADDR 0x11510000 /* 1 */
  131. #define AU1500_MACEN_PHYS_ADDR 0x11520000 /* 1 */
  132. #define AU1000_UART0_PHYS_ADDR 0x11100000 /* 01234 */
  133. #define AU1200_SWCNT_PHYS_ADDR 0x1110010C /* 4 */
  134. #define AU1000_UART1_PHYS_ADDR 0x11200000 /* 0234 */
  135. #define AU1000_UART2_PHYS_ADDR 0x11300000 /* 0 */
  136. #define AU1000_UART3_PHYS_ADDR 0x11400000 /* 0123 */
  137. #define AU1000_SSI0_PHYS_ADDR 0x11600000 /* 02 */
  138. #define AU1000_SSI1_PHYS_ADDR 0x11680000 /* 02 */
  139. #define AU1500_GPIO2_PHYS_ADDR 0x11700000 /* 1234 */
  140. #define AU1000_IC1_PHYS_ADDR 0x11800000 /* 01234 */
  141. #define AU1000_SYS_PHYS_ADDR 0x11900000 /* 012345 */
  142. #define AU1550_PSC0_PHYS_ADDR 0x11A00000 /* 34 */
  143. #define AU1550_PSC1_PHYS_ADDR 0x11B00000 /* 34 */
  144. #define AU1000_MEM_PHYS_ADDR 0x14000000 /* 01234 */
  145. #define AU1000_STATIC_MEM_PHYS_ADDR 0x14001000 /* 01234 */
  146. #define AU1300_UDMA_PHYS_ADDR 0x14001800 /* 5 */
  147. #define AU1000_DMA_PHYS_ADDR 0x14002000 /* 012 */
  148. #define AU1550_DBDMA_PHYS_ADDR 0x14002000 /* 345 */
  149. #define AU1550_DBDMA_CONF_PHYS_ADDR 0x14003000 /* 345 */
  150. #define AU1000_MACDMA0_PHYS_ADDR 0x14004000 /* 0123 */
  151. #define AU1000_MACDMA1_PHYS_ADDR 0x14004200 /* 0123 */
  152. #define AU1200_CIM_PHYS_ADDR 0x14004000 /* 45 */
  153. #define AU1500_PCI_PHYS_ADDR 0x14005000 /* 13 */
  154. #define AU1550_PE_PHYS_ADDR 0x14008000 /* 3 */
  155. #define AU1200_MAEBE_PHYS_ADDR 0x14010000 /* 4 */
  156. #define AU1200_MAEFE_PHYS_ADDR 0x14012000 /* 4 */
  157. #define AU1300_MAEITE_PHYS_ADDR 0x14010000 /* 5 */
  158. #define AU1300_MAEMPE_PHYS_ADDR 0x14014000 /* 5 */
  159. #define AU1550_USB_OHCI_PHYS_ADDR 0x14020000 /* 3 */
  160. #define AU1200_USB_CTL_PHYS_ADDR 0x14020000 /* 4 */
  161. #define AU1200_USB_OTG_PHYS_ADDR 0x14020020 /* 4 */
  162. #define AU1200_USB_OHCI_PHYS_ADDR 0x14020100 /* 4 */
  163. #define AU1200_USB_EHCI_PHYS_ADDR 0x14020200 /* 4 */
  164. #define AU1200_USB_UDC_PHYS_ADDR 0x14022000 /* 4 */
  165. #define AU1300_USB_EHCI_PHYS_ADDR 0x14020000 /* 5 */
  166. #define AU1300_USB_OHCI0_PHYS_ADDR 0x14020400 /* 5 */
  167. #define AU1300_USB_OHCI1_PHYS_ADDR 0x14020800 /* 5 */
  168. #define AU1300_USB_CTL_PHYS_ADDR 0x14021000 /* 5 */
  169. #define AU1300_USB_OTG_PHYS_ADDR 0x14022000 /* 5 */
  170. #define AU1300_MAEBSA_PHYS_ADDR 0x14030000 /* 5 */
  171. #define AU1100_LCD_PHYS_ADDR 0x15000000 /* 2 */
  172. #define AU1200_LCD_PHYS_ADDR 0x15000000 /* 45 */
  173. #define AU1500_PCI_MEM_PHYS_ADDR 0x400000000ULL /* 13 */
  174. #define AU1500_PCI_IO_PHYS_ADDR 0x500000000ULL /* 13 */
  175. #define AU1500_PCI_CONFIG0_PHYS_ADDR 0x600000000ULL /* 13 */
  176. #define AU1500_PCI_CONFIG1_PHYS_ADDR 0x680000000ULL /* 13 */
  177. #define AU1000_PCMCIA_IO_PHYS_ADDR 0xF00000000ULL /* 012345 */
  178. #define AU1000_PCMCIA_ATTR_PHYS_ADDR 0xF40000000ULL /* 012345 */
  179. #define AU1000_PCMCIA_MEM_PHYS_ADDR 0xF80000000ULL /* 012345 */
  180. /**********************************************************************/
  181. /*
  182. * Au1300 GPIO+INT controller (GPIC) register offsets and bits
  183. * Registers are 128bits (0x10 bytes), divided into 4 "banks".
  184. */
  185. #define AU1300_GPIC_PINVAL 0x0000
  186. #define AU1300_GPIC_PINVALCLR 0x0010
  187. #define AU1300_GPIC_IPEND 0x0020
  188. #define AU1300_GPIC_PRIENC 0x0030
  189. #define AU1300_GPIC_IEN 0x0040 /* int_mask in manual */
  190. #define AU1300_GPIC_IDIS 0x0050 /* int_maskclr in manual */
  191. #define AU1300_GPIC_DMASEL 0x0060
  192. #define AU1300_GPIC_DEVSEL 0x0080
  193. #define AU1300_GPIC_DEVCLR 0x0090
  194. #define AU1300_GPIC_RSTVAL 0x00a0
  195. /* pin configuration space. one 32bit register for up to 128 IRQs */
  196. #define AU1300_GPIC_PINCFG 0x1000
  197. #define GPIC_GPIO_TO_BIT(gpio) \
  198. (1 << ((gpio) & 0x1f))
  199. #define GPIC_GPIO_BANKOFF(gpio) \
  200. (((gpio) >> 5) * 4)
  201. /* Pin Control bits: who owns the pin, what does it do */
  202. #define GPIC_CFG_PC_GPIN 0
  203. #define GPIC_CFG_PC_DEV 1
  204. #define GPIC_CFG_PC_GPOLOW 2
  205. #define GPIC_CFG_PC_GPOHIGH 3
  206. #define GPIC_CFG_PC_MASK 3
  207. /* assign pin to MIPS IRQ line */
  208. #define GPIC_CFG_IL_SET(x) (((x) & 3) << 2)
  209. #define GPIC_CFG_IL_MASK (3 << 2)
  210. /* pin interrupt type setup */
  211. #define GPIC_CFG_IC_OFF (0 << 4)
  212. #define GPIC_CFG_IC_LEVEL_LOW (1 << 4)
  213. #define GPIC_CFG_IC_LEVEL_HIGH (2 << 4)
  214. #define GPIC_CFG_IC_EDGE_FALL (5 << 4)
  215. #define GPIC_CFG_IC_EDGE_RISE (6 << 4)
  216. #define GPIC_CFG_IC_EDGE_BOTH (7 << 4)
  217. #define GPIC_CFG_IC_MASK (7 << 4)
  218. /* allow interrupt to wake cpu from 'wait' */
  219. #define GPIC_CFG_IDLEWAKE (1 << 7)
  220. /***********************************************************************/
  221. /* Au1000 SDRAM memory controller register offsets */
  222. #define AU1000_MEM_SDMODE0 0x0000
  223. #define AU1000_MEM_SDMODE1 0x0004
  224. #define AU1000_MEM_SDMODE2 0x0008
  225. #define AU1000_MEM_SDADDR0 0x000C
  226. #define AU1000_MEM_SDADDR1 0x0010
  227. #define AU1000_MEM_SDADDR2 0x0014
  228. #define AU1000_MEM_SDREFCFG 0x0018
  229. #define AU1000_MEM_SDPRECMD 0x001C
  230. #define AU1000_MEM_SDAUTOREF 0x0020
  231. #define AU1000_MEM_SDWRMD0 0x0024
  232. #define AU1000_MEM_SDWRMD1 0x0028
  233. #define AU1000_MEM_SDWRMD2 0x002C
  234. #define AU1000_MEM_SDSLEEP 0x0030
  235. #define AU1000_MEM_SDSMCKE 0x0034
  236. /* MEM_SDMODE register content definitions */
  237. #define MEM_SDMODE_F (1 << 22)
  238. #define MEM_SDMODE_SR (1 << 21)
  239. #define MEM_SDMODE_BS (1 << 20)
  240. #define MEM_SDMODE_RS (3 << 18)
  241. #define MEM_SDMODE_CS (7 << 15)
  242. #define MEM_SDMODE_TRAS (15 << 11)
  243. #define MEM_SDMODE_TMRD (3 << 9)
  244. #define MEM_SDMODE_TWR (3 << 7)
  245. #define MEM_SDMODE_TRP (3 << 5)
  246. #define MEM_SDMODE_TRCD (3 << 3)
  247. #define MEM_SDMODE_TCL (7 << 0)
  248. #define MEM_SDMODE_BS_2Bank (0 << 20)
  249. #define MEM_SDMODE_BS_4Bank (1 << 20)
  250. #define MEM_SDMODE_RS_11Row (0 << 18)
  251. #define MEM_SDMODE_RS_12Row (1 << 18)
  252. #define MEM_SDMODE_RS_13Row (2 << 18)
  253. #define MEM_SDMODE_RS_N(N) ((N) << 18)
  254. #define MEM_SDMODE_CS_7Col (0 << 15)
  255. #define MEM_SDMODE_CS_8Col (1 << 15)
  256. #define MEM_SDMODE_CS_9Col (2 << 15)
  257. #define MEM_SDMODE_CS_10Col (3 << 15)
  258. #define MEM_SDMODE_CS_11Col (4 << 15)
  259. #define MEM_SDMODE_CS_N(N) ((N) << 15)
  260. #define MEM_SDMODE_TRAS_N(N) ((N) << 11)
  261. #define MEM_SDMODE_TMRD_N(N) ((N) << 9)
  262. #define MEM_SDMODE_TWR_N(N) ((N) << 7)
  263. #define MEM_SDMODE_TRP_N(N) ((N) << 5)
  264. #define MEM_SDMODE_TRCD_N(N) ((N) << 3)
  265. #define MEM_SDMODE_TCL_N(N) ((N) << 0)
  266. /* MEM_SDADDR register contents definitions */
  267. #define MEM_SDADDR_E (1 << 20)
  268. #define MEM_SDADDR_CSBA (0x03FF << 10)
  269. #define MEM_SDADDR_CSMASK (0x03FF << 0)
  270. #define MEM_SDADDR_CSBA_N(N) ((N) & (0x03FF << 22) >> 12)
  271. #define MEM_SDADDR_CSMASK_N(N) ((N)&(0x03FF << 22) >> 22)
  272. /* MEM_SDREFCFG register content definitions */
  273. #define MEM_SDREFCFG_TRC (15 << 28)
  274. #define MEM_SDREFCFG_TRPM (3 << 26)
  275. #define MEM_SDREFCFG_E (1 << 25)
  276. #define MEM_SDREFCFG_RE (0x1ffffff << 0)
  277. #define MEM_SDREFCFG_TRC_N(N) ((N) << MEM_SDREFCFG_TRC)
  278. #define MEM_SDREFCFG_TRPM_N(N) ((N) << MEM_SDREFCFG_TRPM)
  279. #define MEM_SDREFCFG_REF_N(N) (N)
  280. /* Au1550 SDRAM Register Offsets */
  281. #define AU1550_MEM_SDMODE0 0x0800
  282. #define AU1550_MEM_SDMODE1 0x0808
  283. #define AU1550_MEM_SDMODE2 0x0810
  284. #define AU1550_MEM_SDADDR0 0x0820
  285. #define AU1550_MEM_SDADDR1 0x0828
  286. #define AU1550_MEM_SDADDR2 0x0830
  287. #define AU1550_MEM_SDCONFIGA 0x0840
  288. #define AU1550_MEM_SDCONFIGB 0x0848
  289. #define AU1550_MEM_SDSTAT 0x0850
  290. #define AU1550_MEM_SDERRADDR 0x0858
  291. #define AU1550_MEM_SDSTRIDE0 0x0860
  292. #define AU1550_MEM_SDSTRIDE1 0x0868
  293. #define AU1550_MEM_SDSTRIDE2 0x0870
  294. #define AU1550_MEM_SDWRMD0 0x0880
  295. #define AU1550_MEM_SDWRMD1 0x0888
  296. #define AU1550_MEM_SDWRMD2 0x0890
  297. #define AU1550_MEM_SDPRECMD 0x08C0
  298. #define AU1550_MEM_SDAUTOREF 0x08C8
  299. #define AU1550_MEM_SDSREF 0x08D0
  300. #define AU1550_MEM_SDSLEEP MEM_SDSREF
  301. /* Static Bus Controller register offsets */
  302. #define AU1000_MEM_STCFG0 0x000
  303. #define AU1000_MEM_STTIME0 0x004
  304. #define AU1000_MEM_STADDR0 0x008
  305. #define AU1000_MEM_STCFG1 0x010
  306. #define AU1000_MEM_STTIME1 0x014
  307. #define AU1000_MEM_STADDR1 0x018
  308. #define AU1000_MEM_STCFG2 0x020
  309. #define AU1000_MEM_STTIME2 0x024
  310. #define AU1000_MEM_STADDR2 0x028
  311. #define AU1000_MEM_STCFG3 0x030
  312. #define AU1000_MEM_STTIME3 0x034
  313. #define AU1000_MEM_STADDR3 0x038
  314. #define AU1000_MEM_STNDCTL 0x100
  315. #define AU1000_MEM_STSTAT 0x104
  316. #define MEM_STNAND_CMD 0x0
  317. #define MEM_STNAND_ADDR 0x4
  318. #define MEM_STNAND_DATA 0x20
  319. /* Programmable Counters 0 and 1 */
  320. #define AU1000_SYS_CNTRCTRL 0x14
  321. # define SYS_CNTRL_E1S (1 << 23)
  322. # define SYS_CNTRL_T1S (1 << 20)
  323. # define SYS_CNTRL_M21 (1 << 19)
  324. # define SYS_CNTRL_M11 (1 << 18)
  325. # define SYS_CNTRL_M01 (1 << 17)
  326. # define SYS_CNTRL_C1S (1 << 16)
  327. # define SYS_CNTRL_BP (1 << 14)
  328. # define SYS_CNTRL_EN1 (1 << 13)
  329. # define SYS_CNTRL_BT1 (1 << 12)
  330. # define SYS_CNTRL_EN0 (1 << 11)
  331. # define SYS_CNTRL_BT0 (1 << 10)
  332. # define SYS_CNTRL_E0 (1 << 8)
  333. # define SYS_CNTRL_E0S (1 << 7)
  334. # define SYS_CNTRL_32S (1 << 5)
  335. # define SYS_CNTRL_T0S (1 << 4)
  336. # define SYS_CNTRL_M20 (1 << 3)
  337. # define SYS_CNTRL_M10 (1 << 2)
  338. # define SYS_CNTRL_M00 (1 << 1)
  339. # define SYS_CNTRL_C0S (1 << 0)
  340. /* Programmable Counter 0 Registers */
  341. #define AU1000_SYS_TOYTRIM 0x00
  342. #define AU1000_SYS_TOYWRITE 0x04
  343. #define AU1000_SYS_TOYMATCH0 0x08
  344. #define AU1000_SYS_TOYMATCH1 0x0c
  345. #define AU1000_SYS_TOYMATCH2 0x10
  346. #define AU1000_SYS_TOYREAD 0x40
  347. /* Programmable Counter 1 Registers */
  348. #define AU1000_SYS_RTCTRIM 0x44
  349. #define AU1000_SYS_RTCWRITE 0x48
  350. #define AU1000_SYS_RTCMATCH0 0x4c
  351. #define AU1000_SYS_RTCMATCH1 0x50
  352. #define AU1000_SYS_RTCMATCH2 0x54
  353. #define AU1000_SYS_RTCREAD 0x58
  354. /* GPIO */
  355. #define AU1000_SYS_PINFUNC 0x2C
  356. # define SYS_PF_USB (1 << 15) /* 2nd USB device/host */
  357. # define SYS_PF_U3 (1 << 14) /* GPIO23/U3TXD */
  358. # define SYS_PF_U2 (1 << 13) /* GPIO22/U2TXD */
  359. # define SYS_PF_U1 (1 << 12) /* GPIO21/U1TXD */
  360. # define SYS_PF_SRC (1 << 11) /* GPIO6/SROMCKE */
  361. # define SYS_PF_CK5 (1 << 10) /* GPIO3/CLK5 */
  362. # define SYS_PF_CK4 (1 << 9) /* GPIO2/CLK4 */
  363. # define SYS_PF_IRF (1 << 8) /* GPIO15/IRFIRSEL */
  364. # define SYS_PF_UR3 (1 << 7) /* GPIO[14:9]/UART3 */
  365. # define SYS_PF_I2D (1 << 6) /* GPIO8/I2SDI */
  366. # define SYS_PF_I2S (1 << 5) /* I2S/GPIO[29:31] */
  367. # define SYS_PF_NI2 (1 << 4) /* NI2/GPIO[24:28] */
  368. # define SYS_PF_U0 (1 << 3) /* U0TXD/GPIO20 */
  369. # define SYS_PF_RD (1 << 2) /* IRTXD/GPIO19 */
  370. # define SYS_PF_A97 (1 << 1) /* AC97/SSL1 */
  371. # define SYS_PF_S0 (1 << 0) /* SSI_0/GPIO[16:18] */
  372. /* Au1100 only */
  373. # define SYS_PF_PC (1 << 18) /* PCMCIA/GPIO[207:204] */
  374. # define SYS_PF_LCD (1 << 17) /* extern lcd/GPIO[203:200] */
  375. # define SYS_PF_CS (1 << 16) /* EXTCLK0/32KHz to gpio2 */
  376. # define SYS_PF_EX0 (1 << 9) /* GPIO2/clock */
  377. /* Au1550 only. Redefines lots of pins */
  378. # define SYS_PF_PSC2_MASK (7 << 17)
  379. # define SYS_PF_PSC2_AC97 0
  380. # define SYS_PF_PSC2_SPI 0
  381. # define SYS_PF_PSC2_I2S (1 << 17)
  382. # define SYS_PF_PSC2_SMBUS (3 << 17)
  383. # define SYS_PF_PSC2_GPIO (7 << 17)
  384. # define SYS_PF_PSC3_MASK (7 << 20)
  385. # define SYS_PF_PSC3_AC97 0
  386. # define SYS_PF_PSC3_SPI 0
  387. # define SYS_PF_PSC3_I2S (1 << 20)
  388. # define SYS_PF_PSC3_SMBUS (3 << 20)
  389. # define SYS_PF_PSC3_GPIO (7 << 20)
  390. # define SYS_PF_PSC1_S1 (1 << 1)
  391. # define SYS_PF_MUST_BE_SET ((1 << 5) | (1 << 2))
  392. /* Au1200 only */
  393. #define SYS_PINFUNC_DMA (1 << 31)
  394. #define SYS_PINFUNC_S0A (1 << 30)
  395. #define SYS_PINFUNC_S1A (1 << 29)
  396. #define SYS_PINFUNC_LP0 (1 << 28)
  397. #define SYS_PINFUNC_LP1 (1 << 27)
  398. #define SYS_PINFUNC_LD16 (1 << 26)
  399. #define SYS_PINFUNC_LD8 (1 << 25)
  400. #define SYS_PINFUNC_LD1 (1 << 24)
  401. #define SYS_PINFUNC_LD0 (1 << 23)
  402. #define SYS_PINFUNC_P1A (3 << 21)
  403. #define SYS_PINFUNC_P1B (1 << 20)
  404. #define SYS_PINFUNC_FS3 (1 << 19)
  405. #define SYS_PINFUNC_P0A (3 << 17)
  406. #define SYS_PINFUNC_CS (1 << 16)
  407. #define SYS_PINFUNC_CIM (1 << 15)
  408. #define SYS_PINFUNC_P1C (1 << 14)
  409. #define SYS_PINFUNC_U1T (1 << 12)
  410. #define SYS_PINFUNC_U1R (1 << 11)
  411. #define SYS_PINFUNC_EX1 (1 << 10)
  412. #define SYS_PINFUNC_EX0 (1 << 9)
  413. #define SYS_PINFUNC_U0R (1 << 8)
  414. #define SYS_PINFUNC_MC (1 << 7)
  415. #define SYS_PINFUNC_S0B (1 << 6)
  416. #define SYS_PINFUNC_S0C (1 << 5)
  417. #define SYS_PINFUNC_P0B (1 << 4)
  418. #define SYS_PINFUNC_U0T (1 << 3)
  419. #define SYS_PINFUNC_S1B (1 << 2)
  420. /* Power Management */
  421. #define AU1000_SYS_SCRATCH0 0x18
  422. #define AU1000_SYS_SCRATCH1 0x1c
  423. #define AU1000_SYS_WAKEMSK 0x34
  424. #define AU1000_SYS_ENDIAN 0x38
  425. #define AU1000_SYS_POWERCTRL 0x3c
  426. #define AU1000_SYS_WAKESRC 0x5c
  427. #define AU1000_SYS_SLPPWR 0x78
  428. #define AU1000_SYS_SLEEP 0x7c
  429. #define SYS_WAKEMSK_D2 (1 << 9)
  430. #define SYS_WAKEMSK_M2 (1 << 8)
  431. #define SYS_WAKEMSK_GPIO(x) (1 << (x))
  432. /* Clock Controller */
  433. #define AU1000_SYS_FREQCTRL0 0x20
  434. # define SYS_FC_FRDIV2_BIT 22
  435. # define SYS_FC_FRDIV2_MASK (0xff << SYS_FC_FRDIV2_BIT)
  436. # define SYS_FC_FE2 (1 << 21)
  437. # define SYS_FC_FS2 (1 << 20)
  438. # define SYS_FC_FRDIV1_BIT 12
  439. # define SYS_FC_FRDIV1_MASK (0xff << SYS_FC_FRDIV1_BIT)
  440. # define SYS_FC_FE1 (1 << 11)
  441. # define SYS_FC_FS1 (1 << 10)
  442. # define SYS_FC_FRDIV0_BIT 2
  443. # define SYS_FC_FRDIV0_MASK (0xff << SYS_FC_FRDIV0_BIT)
  444. # define SYS_FC_FE0 (1 << 1)
  445. # define SYS_FC_FS0 (1 << 0)
  446. #define AU1000_SYS_FREQCTRL1 0x24
  447. # define SYS_FC_FRDIV5_BIT 22
  448. # define SYS_FC_FRDIV5_MASK (0xff << SYS_FC_FRDIV5_BIT)
  449. # define SYS_FC_FE5 (1 << 21)
  450. # define SYS_FC_FS5 (1 << 20)
  451. # define SYS_FC_FRDIV4_BIT 12
  452. # define SYS_FC_FRDIV4_MASK (0xff << SYS_FC_FRDIV4_BIT)
  453. # define SYS_FC_FE4 (1 << 11)
  454. # define SYS_FC_FS4 (1 << 10)
  455. # define SYS_FC_FRDIV3_BIT 2
  456. # define SYS_FC_FRDIV3_MASK (0xff << SYS_FC_FRDIV3_BIT)
  457. # define SYS_FC_FE3 (1 << 1)
  458. # define SYS_FC_FS3 (1 << 0)
  459. #define AU1000_SYS_CLKSRC 0x28
  460. # define SYS_CS_ME1_BIT 27
  461. # define SYS_CS_ME1_MASK (0x7 << SYS_CS_ME1_BIT)
  462. # define SYS_CS_DE1 (1 << 26)
  463. # define SYS_CS_CE1 (1 << 25)
  464. # define SYS_CS_ME0_BIT 22
  465. # define SYS_CS_ME0_MASK (0x7 << SYS_CS_ME0_BIT)
  466. # define SYS_CS_DE0 (1 << 21)
  467. # define SYS_CS_CE0 (1 << 20)
  468. # define SYS_CS_MI2_BIT 17
  469. # define SYS_CS_MI2_MASK (0x7 << SYS_CS_MI2_BIT)
  470. # define SYS_CS_DI2 (1 << 16)
  471. # define SYS_CS_CI2 (1 << 15)
  472. # define SYS_CS_ML_BIT 7
  473. # define SYS_CS_ML_MASK (0x7 << SYS_CS_ML_BIT)
  474. # define SYS_CS_DL (1 << 6)
  475. # define SYS_CS_CL (1 << 5)
  476. # define SYS_CS_MUH_BIT 12
  477. # define SYS_CS_MUH_MASK (0x7 << SYS_CS_MUH_BIT)
  478. # define SYS_CS_DUH (1 << 11)
  479. # define SYS_CS_CUH (1 << 10)
  480. # define SYS_CS_MUD_BIT 7
  481. # define SYS_CS_MUD_MASK (0x7 << SYS_CS_MUD_BIT)
  482. # define SYS_CS_DUD (1 << 6)
  483. # define SYS_CS_CUD (1 << 5)
  484. # define SYS_CS_MIR_BIT 2
  485. # define SYS_CS_MIR_MASK (0x7 << SYS_CS_MIR_BIT)
  486. # define SYS_CS_DIR (1 << 1)
  487. # define SYS_CS_CIR (1 << 0)
  488. # define SYS_CS_MUX_AUX 0x1
  489. # define SYS_CS_MUX_FQ0 0x2
  490. # define SYS_CS_MUX_FQ1 0x3
  491. # define SYS_CS_MUX_FQ2 0x4
  492. # define SYS_CS_MUX_FQ3 0x5
  493. # define SYS_CS_MUX_FQ4 0x6
  494. # define SYS_CS_MUX_FQ5 0x7
  495. #define AU1000_SYS_CPUPLL 0x60
  496. #define AU1000_SYS_AUXPLL 0x64
  497. #define AU1300_SYS_AUXPLL2 0x68
  498. /**********************************************************************/
  499. /* The PCI chip selects are outside the 32bit space, and since we can't
  500. * just program the 36bit addresses into BARs, we have to take a chunk
  501. * out of the 32bit space and reserve it for PCI. When these addresses
  502. * are ioremap()ed, they'll be fixed up to the real 36bit address before
  503. * being passed to the real ioremap function.
  504. */
  505. #define ALCHEMY_PCI_MEMWIN_START (AU1500_PCI_MEM_PHYS_ADDR >> 4)
  506. #define ALCHEMY_PCI_MEMWIN_END (ALCHEMY_PCI_MEMWIN_START + 0x0FFFFFFF)
  507. /* for PCI IO it's simpler because we get to do the ioremap ourselves and then
  508. * adjust the device's resources.
  509. */
  510. #define ALCHEMY_PCI_IOWIN_START 0x00001000
  511. #define ALCHEMY_PCI_IOWIN_END 0x0000FFFF
  512. #ifdef CONFIG_PCI
  513. #define IOPORT_RESOURCE_START 0x00001000 /* skip legacy probing */
  514. #define IOPORT_RESOURCE_END 0xffffffff
  515. #define IOMEM_RESOURCE_START 0x10000000
  516. #define IOMEM_RESOURCE_END 0xfffffffffULL
  517. #else
  518. /* Don't allow any legacy ports probing */
  519. #define IOPORT_RESOURCE_START 0x10000000
  520. #define IOPORT_RESOURCE_END 0xffffffff
  521. #define IOMEM_RESOURCE_START 0x10000000
  522. #define IOMEM_RESOURCE_END 0xfffffffffULL
  523. #endif
  524. /* PCI controller block register offsets */
  525. #define PCI_REG_CMEM 0x0000
  526. #define PCI_REG_CONFIG 0x0004
  527. #define PCI_REG_B2BMASK_CCH 0x0008
  528. #define PCI_REG_B2BBASE0_VID 0x000C
  529. #define PCI_REG_B2BBASE1_SID 0x0010
  530. #define PCI_REG_MWMASK_DEV 0x0014
  531. #define PCI_REG_MWBASE_REV_CCL 0x0018
  532. #define PCI_REG_ERR_ADDR 0x001C
  533. #define PCI_REG_SPEC_INTACK 0x0020
  534. #define PCI_REG_ID 0x0100
  535. #define PCI_REG_STATCMD 0x0104
  536. #define PCI_REG_CLASSREV 0x0108
  537. #define PCI_REG_PARAM 0x010C
  538. #define PCI_REG_MBAR 0x0110
  539. #define PCI_REG_TIMEOUT 0x0140
  540. /* PCI controller block register bits */
  541. #define PCI_CMEM_E (1 << 28) /* enable cacheable memory */
  542. #define PCI_CMEM_CMBASE(x) (((x) & 0x3fff) << 14)
  543. #define PCI_CMEM_CMMASK(x) ((x) & 0x3fff)
  544. #define PCI_CONFIG_ERD (1 << 27) /* pci error during R/W */
  545. #define PCI_CONFIG_ET (1 << 26) /* error in target mode */
  546. #define PCI_CONFIG_EF (1 << 25) /* fatal error */
  547. #define PCI_CONFIG_EP (1 << 24) /* parity error */
  548. #define PCI_CONFIG_EM (1 << 23) /* multiple errors */
  549. #define PCI_CONFIG_BM (1 << 22) /* bad master error */
  550. #define PCI_CONFIG_PD (1 << 20) /* PCI Disable */
  551. #define PCI_CONFIG_BME (1 << 19) /* Byte Mask Enable for reads */
  552. #define PCI_CONFIG_NC (1 << 16) /* mark mem access non-coherent */
  553. #define PCI_CONFIG_IA (1 << 15) /* INTA# enabled (target mode) */
  554. #define PCI_CONFIG_IP (1 << 13) /* int on PCI_PERR# */
  555. #define PCI_CONFIG_IS (1 << 12) /* int on PCI_SERR# */
  556. #define PCI_CONFIG_IMM (1 << 11) /* int on master abort */
  557. #define PCI_CONFIG_ITM (1 << 10) /* int on target abort (as master) */
  558. #define PCI_CONFIG_ITT (1 << 9) /* int on target abort (as target) */
  559. #define PCI_CONFIG_IPB (1 << 8) /* int on PERR# in bus master acc */
  560. #define PCI_CONFIG_SIC_NO (0 << 6) /* no byte mask changes */
  561. #define PCI_CONFIG_SIC_BA_ADR (1 << 6) /* on byte/hw acc, invert adr bits */
  562. #define PCI_CONFIG_SIC_HWA_DAT (2 << 6) /* on halfword acc, swap data */
  563. #define PCI_CONFIG_SIC_ALL (3 << 6) /* swap data bytes on all accesses */
  564. #define PCI_CONFIG_ST (1 << 5) /* swap data by target transactions */
  565. #define PCI_CONFIG_SM (1 << 4) /* swap data from PCI ctl */
  566. #define PCI_CONFIG_AEN (1 << 3) /* enable internal arbiter */
  567. #define PCI_CONFIG_R2H (1 << 2) /* REQ2# to hi-prio arbiter */
  568. #define PCI_CONFIG_R1H (1 << 1) /* REQ1# to hi-prio arbiter */
  569. #define PCI_CONFIG_CH (1 << 0) /* PCI ctl to hi-prio arbiter */
  570. #define PCI_B2BMASK_B2BMASK(x) (((x) & 0xffff) << 16)
  571. #define PCI_B2BMASK_CCH(x) ((x) & 0xffff) /* 16 upper bits of class code */
  572. #define PCI_B2BBASE0_VID_B0(x) (((x) & 0xffff) << 16)
  573. #define PCI_B2BBASE0_VID_SV(x) ((x) & 0xffff)
  574. #define PCI_B2BBASE1_SID_B1(x) (((x) & 0xffff) << 16)
  575. #define PCI_B2BBASE1_SID_SI(x) ((x) & 0xffff)
  576. #define PCI_MWMASKDEV_MWMASK(x) (((x) & 0xffff) << 16)
  577. #define PCI_MWMASKDEV_DEVID(x) ((x) & 0xffff)
  578. #define PCI_MWBASEREVCCL_BASE(x) (((x) & 0xffff) << 16)
  579. #define PCI_MWBASEREVCCL_REV(x) (((x) & 0xff) << 8)
  580. #define PCI_MWBASEREVCCL_CCL(x) ((x) & 0xff)
  581. #define PCI_ID_DID(x) (((x) & 0xffff) << 16)
  582. #define PCI_ID_VID(x) ((x) & 0xffff)
  583. #define PCI_STATCMD_STATUS(x) (((x) & 0xffff) << 16)
  584. #define PCI_STATCMD_CMD(x) ((x) & 0xffff)
  585. #define PCI_CLASSREV_CLASS(x) (((x) & 0x00ffffff) << 8)
  586. #define PCI_CLASSREV_REV(x) ((x) & 0xff)
  587. #define PCI_PARAM_BIST(x) (((x) & 0xff) << 24)
  588. #define PCI_PARAM_HT(x) (((x) & 0xff) << 16)
  589. #define PCI_PARAM_LT(x) (((x) & 0xff) << 8)
  590. #define PCI_PARAM_CLS(x) ((x) & 0xff)
  591. #define PCI_TIMEOUT_RETRIES(x) (((x) & 0xff) << 8) /* max retries */
  592. #define PCI_TIMEOUT_TO(x) ((x) & 0xff) /* target ready timeout */
  593. /**********************************************************************/
  594. #ifndef _LANGUAGE_ASSEMBLY
  595. #include <linux/delay.h>
  596. #include <linux/types.h>
  597. #include <linux/io.h>
  598. #include <linux/irq.h>
  599. #include <asm/cpu.h>
  600. /* helpers to access the SYS_* registers */
  601. static inline unsigned long alchemy_rdsys(int regofs)
  602. {
  603. void __iomem *b = (void __iomem *)KSEG1ADDR(AU1000_SYS_PHYS_ADDR);
  604. return __raw_readl(b + regofs);
  605. }
  606. static inline void alchemy_wrsys(unsigned long v, int regofs)
  607. {
  608. void __iomem *b = (void __iomem *)KSEG1ADDR(AU1000_SYS_PHYS_ADDR);
  609. __raw_writel(v, b + regofs);
  610. wmb(); /* drain writebuffer */
  611. }
  612. /* helpers to access static memctrl registers */
  613. static inline unsigned long alchemy_rdsmem(int regofs)
  614. {
  615. void __iomem *b = (void __iomem *)KSEG1ADDR(AU1000_STATIC_MEM_PHYS_ADDR);
  616. return __raw_readl(b + regofs);
  617. }
  618. static inline void alchemy_wrsmem(unsigned long v, int regofs)
  619. {
  620. void __iomem *b = (void __iomem *)KSEG1ADDR(AU1000_STATIC_MEM_PHYS_ADDR);
  621. __raw_writel(v, b + regofs);
  622. wmb(); /* drain writebuffer */
  623. }
  624. /* Early Au1000 have a write-only SYS_CPUPLL register. */
  625. static inline int au1xxx_cpu_has_pll_wo(void)
  626. {
  627. switch (read_c0_prid()) {
  628. case 0x00030100: /* Au1000 DA */
  629. case 0x00030201: /* Au1000 HA */
  630. case 0x00030202: /* Au1000 HB */
  631. return 1;
  632. }
  633. return 0;
  634. }
  635. /* does CPU need CONFIG[OD] set to fix tons of errata? */
  636. static inline int au1xxx_cpu_needs_config_od(void)
  637. {
  638. /*
  639. * c0_config.od (bit 19) was write only (and read as 0) on the
  640. * early revisions of Alchemy SOCs. It disables the bus trans-
  641. * action overlapping and needs to be set to fix various errata.
  642. */
  643. switch (read_c0_prid()) {
  644. case 0x00030100: /* Au1000 DA */
  645. case 0x00030201: /* Au1000 HA */
  646. case 0x00030202: /* Au1000 HB */
  647. case 0x01030200: /* Au1500 AB */
  648. /*
  649. * Au1100/Au1200 errata actually keep silence about this bit,
  650. * so we set it just in case for those revisions that require
  651. * it to be set according to the (now gone) cpu_table.
  652. */
  653. case 0x02030200: /* Au1100 AB */
  654. case 0x02030201: /* Au1100 BA */
  655. case 0x02030202: /* Au1100 BC */
  656. case 0x04030201: /* Au1200 AC */
  657. return 1;
  658. }
  659. return 0;
  660. }
  661. #define ALCHEMY_CPU_UNKNOWN -1
  662. #define ALCHEMY_CPU_AU1000 0
  663. #define ALCHEMY_CPU_AU1500 1
  664. #define ALCHEMY_CPU_AU1100 2
  665. #define ALCHEMY_CPU_AU1550 3
  666. #define ALCHEMY_CPU_AU1200 4
  667. #define ALCHEMY_CPU_AU1300 5
  668. static inline int alchemy_get_cputype(void)
  669. {
  670. switch (read_c0_prid() & (PRID_OPT_MASK | PRID_COMP_MASK)) {
  671. case 0x00030000:
  672. return ALCHEMY_CPU_AU1000;
  673. break;
  674. case 0x01030000:
  675. return ALCHEMY_CPU_AU1500;
  676. break;
  677. case 0x02030000:
  678. return ALCHEMY_CPU_AU1100;
  679. break;
  680. case 0x03030000:
  681. return ALCHEMY_CPU_AU1550;
  682. break;
  683. case 0x04030000:
  684. case 0x05030000:
  685. return ALCHEMY_CPU_AU1200;
  686. break;
  687. case 0x800c0000:
  688. return ALCHEMY_CPU_AU1300;
  689. break;
  690. }
  691. return ALCHEMY_CPU_UNKNOWN;
  692. }
  693. /* return number of uarts on a given cputype */
  694. static inline int alchemy_get_uarts(int type)
  695. {
  696. switch (type) {
  697. case ALCHEMY_CPU_AU1000:
  698. case ALCHEMY_CPU_AU1300:
  699. return 4;
  700. case ALCHEMY_CPU_AU1500:
  701. case ALCHEMY_CPU_AU1200:
  702. return 2;
  703. case ALCHEMY_CPU_AU1100:
  704. case ALCHEMY_CPU_AU1550:
  705. return 3;
  706. }
  707. return 0;
  708. }
  709. /* enable an UART block if it isn't already */
  710. static inline void alchemy_uart_enable(u32 uart_phys)
  711. {
  712. void __iomem *addr = (void __iomem *)KSEG1ADDR(uart_phys);
  713. /* reset, enable clock, deassert reset */
  714. if ((__raw_readl(addr + 0x100) & 3) != 3) {
  715. __raw_writel(0, addr + 0x100);
  716. wmb(); /* drain writebuffer */
  717. __raw_writel(1, addr + 0x100);
  718. wmb(); /* drain writebuffer */
  719. }
  720. __raw_writel(3, addr + 0x100);
  721. wmb(); /* drain writebuffer */
  722. }
  723. static inline void alchemy_uart_disable(u32 uart_phys)
  724. {
  725. void __iomem *addr = (void __iomem *)KSEG1ADDR(uart_phys);
  726. __raw_writel(0, addr + 0x100); /* UART_MOD_CNTRL */
  727. wmb(); /* drain writebuffer */
  728. }
  729. static inline void alchemy_uart_putchar(u32 uart_phys, u8 c)
  730. {
  731. void __iomem *base = (void __iomem *)KSEG1ADDR(uart_phys);
  732. int timeout, i;
  733. /* check LSR TX_EMPTY bit */
  734. timeout = 0xffffff;
  735. do {
  736. if (__raw_readl(base + 0x1c) & 0x20)
  737. break;
  738. /* slow down */
  739. for (i = 10000; i; i--)
  740. asm volatile ("nop");
  741. } while (--timeout);
  742. __raw_writel(c, base + 0x04); /* tx */
  743. wmb(); /* drain writebuffer */
  744. }
  745. /* return number of ethernet MACs on a given cputype */
  746. static inline int alchemy_get_macs(int type)
  747. {
  748. switch (type) {
  749. case ALCHEMY_CPU_AU1000:
  750. case ALCHEMY_CPU_AU1500:
  751. case ALCHEMY_CPU_AU1550:
  752. return 2;
  753. case ALCHEMY_CPU_AU1100:
  754. return 1;
  755. }
  756. return 0;
  757. }
  758. /* arch/mips/au1000/common/clocks.c */
  759. extern void set_au1x00_speed(unsigned int new_freq);
  760. extern unsigned int get_au1x00_speed(void);
  761. extern void set_au1x00_uart_baud_base(unsigned long new_baud_base);
  762. extern unsigned long get_au1x00_uart_baud_base(void);
  763. extern unsigned long au1xxx_calc_clock(void);
  764. /* PM: arch/mips/alchemy/common/sleeper.S, power.c, irq.c */
  765. void alchemy_sleep_au1000(void);
  766. void alchemy_sleep_au1550(void);
  767. void alchemy_sleep_au1300(void);
  768. void au_sleep(void);
  769. /* USB: arch/mips/alchemy/common/usb.c */
  770. enum alchemy_usb_block {
  771. ALCHEMY_USB_OHCI0,
  772. ALCHEMY_USB_UDC0,
  773. ALCHEMY_USB_EHCI0,
  774. ALCHEMY_USB_OTG0,
  775. ALCHEMY_USB_OHCI1,
  776. };
  777. int alchemy_usb_control(int block, int enable);
  778. /* PCI controller platform data */
  779. struct alchemy_pci_platdata {
  780. int (*board_map_irq)(const struct pci_dev *d, u8 slot, u8 pin);
  781. int (*board_pci_idsel)(unsigned int devsel, int assert);
  782. /* bits to set/clear in PCI_CONFIG register */
  783. unsigned long pci_cfg_set;
  784. unsigned long pci_cfg_clr;
  785. };
  786. /* The IrDA peripheral has an IRFIRSEL pin, but on the DB/PB boards it's
  787. * not used to select FIR/SIR mode on the transceiver but as a GPIO.
  788. * Instead a CPLD has to be told about the mode. The driver calls the
  789. * set_phy_mode() function in addition to driving the IRFIRSEL pin.
  790. */
  791. #define AU1000_IRDA_PHY_MODE_OFF 0
  792. #define AU1000_IRDA_PHY_MODE_SIR 1
  793. #define AU1000_IRDA_PHY_MODE_FIR 2
  794. struct au1k_irda_platform_data {
  795. void (*set_phy_mode)(int mode);
  796. };
  797. /* Multifunction pins: Each of these pins can either be assigned to the
  798. * GPIO controller or a on-chip peripheral.
  799. * Call "au1300_pinfunc_to_dev()" or "au1300_pinfunc_to_gpio()" to
  800. * assign one of these to either the GPIO controller or the device.
  801. */
  802. enum au1300_multifunc_pins {
  803. /* wake-from-str pins 0-3 */
  804. AU1300_PIN_WAKE0 = 0, AU1300_PIN_WAKE1, AU1300_PIN_WAKE2,
  805. AU1300_PIN_WAKE3,
  806. /* external clock sources for PSCs: 4-5 */
  807. AU1300_PIN_EXTCLK0, AU1300_PIN_EXTCLK1,
  808. /* 8bit MMC interface on SD0: 6-9 */
  809. AU1300_PIN_SD0DAT4, AU1300_PIN_SD0DAT5, AU1300_PIN_SD0DAT6,
  810. AU1300_PIN_SD0DAT7,
  811. /* aux clk input for freqgen 3: 10 */
  812. AU1300_PIN_FG3AUX,
  813. /* UART1 pins: 11-18 */
  814. AU1300_PIN_U1RI, AU1300_PIN_U1DCD, AU1300_PIN_U1DSR,
  815. AU1300_PIN_U1CTS, AU1300_PIN_U1RTS, AU1300_PIN_U1DTR,
  816. AU1300_PIN_U1RX, AU1300_PIN_U1TX,
  817. /* UART0 pins: 19-24 */
  818. AU1300_PIN_U0RI, AU1300_PIN_U0DCD, AU1300_PIN_U0DSR,
  819. AU1300_PIN_U0CTS, AU1300_PIN_U0RTS, AU1300_PIN_U0DTR,
  820. /* UART2: 25-26 */
  821. AU1300_PIN_U2RX, AU1300_PIN_U2TX,
  822. /* UART3: 27-28 */
  823. AU1300_PIN_U3RX, AU1300_PIN_U3TX,
  824. /* LCD controller PWMs, ext pixclock: 29-31 */
  825. AU1300_PIN_LCDPWM0, AU1300_PIN_LCDPWM1, AU1300_PIN_LCDCLKIN,
  826. /* SD1 interface: 32-37 */
  827. AU1300_PIN_SD1DAT0, AU1300_PIN_SD1DAT1, AU1300_PIN_SD1DAT2,
  828. AU1300_PIN_SD1DAT3, AU1300_PIN_SD1CMD, AU1300_PIN_SD1CLK,
  829. /* SD2 interface: 38-43 */
  830. AU1300_PIN_SD2DAT0, AU1300_PIN_SD2DAT1, AU1300_PIN_SD2DAT2,
  831. AU1300_PIN_SD2DAT3, AU1300_PIN_SD2CMD, AU1300_PIN_SD2CLK,
  832. /* PSC0/1 clocks: 44-45 */
  833. AU1300_PIN_PSC0CLK, AU1300_PIN_PSC1CLK,
  834. /* PSCs: 46-49/50-53/54-57/58-61 */
  835. AU1300_PIN_PSC0SYNC0, AU1300_PIN_PSC0SYNC1, AU1300_PIN_PSC0D0,
  836. AU1300_PIN_PSC0D1,
  837. AU1300_PIN_PSC1SYNC0, AU1300_PIN_PSC1SYNC1, AU1300_PIN_PSC1D0,
  838. AU1300_PIN_PSC1D1,
  839. AU1300_PIN_PSC2SYNC0, AU1300_PIN_PSC2SYNC1, AU1300_PIN_PSC2D0,
  840. AU1300_PIN_PSC2D1,
  841. AU1300_PIN_PSC3SYNC0, AU1300_PIN_PSC3SYNC1, AU1300_PIN_PSC3D0,
  842. AU1300_PIN_PSC3D1,
  843. /* PCMCIA interface: 62-70 */
  844. AU1300_PIN_PCE2, AU1300_PIN_PCE1, AU1300_PIN_PIOS16,
  845. AU1300_PIN_PIOR, AU1300_PIN_PWE, AU1300_PIN_PWAIT,
  846. AU1300_PIN_PREG, AU1300_PIN_POE, AU1300_PIN_PIOW,
  847. /* camera interface H/V sync inputs: 71-72 */
  848. AU1300_PIN_CIMLS, AU1300_PIN_CIMFS,
  849. /* PSC2/3 clocks: 73-74 */
  850. AU1300_PIN_PSC2CLK, AU1300_PIN_PSC3CLK,
  851. };
  852. /* GPIC (Au1300) pin management: arch/mips/alchemy/common/gpioint.c */
  853. extern void au1300_pinfunc_to_gpio(enum au1300_multifunc_pins gpio);
  854. extern void au1300_pinfunc_to_dev(enum au1300_multifunc_pins gpio);
  855. extern void au1300_set_irq_priority(unsigned int irq, int p);
  856. extern void au1300_set_dbdma_gpio(int dchan, unsigned int gpio);
  857. /* Au1300 allows to disconnect certain blocks from internal power supply */
  858. enum au1300_vss_block {
  859. AU1300_VSS_MPE = 0,
  860. AU1300_VSS_BSA,
  861. AU1300_VSS_GPE,
  862. AU1300_VSS_MGP,
  863. };
  864. extern void au1300_vss_block_control(int block, int enable);
  865. enum soc_au1000_ints {
  866. AU1000_FIRST_INT = AU1000_INTC0_INT_BASE,
  867. AU1000_UART0_INT = AU1000_FIRST_INT,
  868. AU1000_UART1_INT,
  869. AU1000_UART2_INT,
  870. AU1000_UART3_INT,
  871. AU1000_SSI0_INT,
  872. AU1000_SSI1_INT,
  873. AU1000_DMA_INT_BASE,
  874. AU1000_TOY_INT = AU1000_FIRST_INT + 14,
  875. AU1000_TOY_MATCH0_INT,
  876. AU1000_TOY_MATCH1_INT,
  877. AU1000_TOY_MATCH2_INT,
  878. AU1000_RTC_INT,
  879. AU1000_RTC_MATCH0_INT,
  880. AU1000_RTC_MATCH1_INT,
  881. AU1000_RTC_MATCH2_INT,
  882. AU1000_IRDA_TX_INT,
  883. AU1000_IRDA_RX_INT,
  884. AU1000_USB_DEV_REQ_INT,
  885. AU1000_USB_DEV_SUS_INT,
  886. AU1000_USB_HOST_INT,
  887. AU1000_ACSYNC_INT,
  888. AU1000_MAC0_DMA_INT,
  889. AU1000_MAC1_DMA_INT,
  890. AU1000_I2S_UO_INT,
  891. AU1000_AC97C_INT,
  892. AU1000_GPIO0_INT,
  893. AU1000_GPIO1_INT,
  894. AU1000_GPIO2_INT,
  895. AU1000_GPIO3_INT,
  896. AU1000_GPIO4_INT,
  897. AU1000_GPIO5_INT,
  898. AU1000_GPIO6_INT,
  899. AU1000_GPIO7_INT,
  900. AU1000_GPIO8_INT,
  901. AU1000_GPIO9_INT,
  902. AU1000_GPIO10_INT,
  903. AU1000_GPIO11_INT,
  904. AU1000_GPIO12_INT,
  905. AU1000_GPIO13_INT,
  906. AU1000_GPIO14_INT,
  907. AU1000_GPIO15_INT,
  908. AU1000_GPIO16_INT,
  909. AU1000_GPIO17_INT,
  910. AU1000_GPIO18_INT,
  911. AU1000_GPIO19_INT,
  912. AU1000_GPIO20_INT,
  913. AU1000_GPIO21_INT,
  914. AU1000_GPIO22_INT,
  915. AU1000_GPIO23_INT,
  916. AU1000_GPIO24_INT,
  917. AU1000_GPIO25_INT,
  918. AU1000_GPIO26_INT,
  919. AU1000_GPIO27_INT,
  920. AU1000_GPIO28_INT,
  921. AU1000_GPIO29_INT,
  922. AU1000_GPIO30_INT,
  923. AU1000_GPIO31_INT,
  924. };
  925. enum soc_au1100_ints {
  926. AU1100_FIRST_INT = AU1000_INTC0_INT_BASE,
  927. AU1100_UART0_INT = AU1100_FIRST_INT,
  928. AU1100_UART1_INT,
  929. AU1100_SD_INT,
  930. AU1100_UART3_INT,
  931. AU1100_SSI0_INT,
  932. AU1100_SSI1_INT,
  933. AU1100_DMA_INT_BASE,
  934. AU1100_TOY_INT = AU1100_FIRST_INT + 14,
  935. AU1100_TOY_MATCH0_INT,
  936. AU1100_TOY_MATCH1_INT,
  937. AU1100_TOY_MATCH2_INT,
  938. AU1100_RTC_INT,
  939. AU1100_RTC_MATCH0_INT,
  940. AU1100_RTC_MATCH1_INT,
  941. AU1100_RTC_MATCH2_INT,
  942. AU1100_IRDA_TX_INT,
  943. AU1100_IRDA_RX_INT,
  944. AU1100_USB_DEV_REQ_INT,
  945. AU1100_USB_DEV_SUS_INT,
  946. AU1100_USB_HOST_INT,
  947. AU1100_ACSYNC_INT,
  948. AU1100_MAC0_DMA_INT,
  949. AU1100_GPIO208_215_INT,
  950. AU1100_LCD_INT,
  951. AU1100_AC97C_INT,
  952. AU1100_GPIO0_INT,
  953. AU1100_GPIO1_INT,
  954. AU1100_GPIO2_INT,
  955. AU1100_GPIO3_INT,
  956. AU1100_GPIO4_INT,
  957. AU1100_GPIO5_INT,
  958. AU1100_GPIO6_INT,
  959. AU1100_GPIO7_INT,
  960. AU1100_GPIO8_INT,
  961. AU1100_GPIO9_INT,
  962. AU1100_GPIO10_INT,
  963. AU1100_GPIO11_INT,
  964. AU1100_GPIO12_INT,
  965. AU1100_GPIO13_INT,
  966. AU1100_GPIO14_INT,
  967. AU1100_GPIO15_INT,
  968. AU1100_GPIO16_INT,
  969. AU1100_GPIO17_INT,
  970. AU1100_GPIO18_INT,
  971. AU1100_GPIO19_INT,
  972. AU1100_GPIO20_INT,
  973. AU1100_GPIO21_INT,
  974. AU1100_GPIO22_INT,
  975. AU1100_GPIO23_INT,
  976. AU1100_GPIO24_INT,
  977. AU1100_GPIO25_INT,
  978. AU1100_GPIO26_INT,
  979. AU1100_GPIO27_INT,
  980. AU1100_GPIO28_INT,
  981. AU1100_GPIO29_INT,
  982. AU1100_GPIO30_INT,
  983. AU1100_GPIO31_INT,
  984. };
  985. enum soc_au1500_ints {
  986. AU1500_FIRST_INT = AU1000_INTC0_INT_BASE,
  987. AU1500_UART0_INT = AU1500_FIRST_INT,
  988. AU1500_PCI_INTA,
  989. AU1500_PCI_INTB,
  990. AU1500_UART3_INT,
  991. AU1500_PCI_INTC,
  992. AU1500_PCI_INTD,
  993. AU1500_DMA_INT_BASE,
  994. AU1500_TOY_INT = AU1500_FIRST_INT + 14,
  995. AU1500_TOY_MATCH0_INT,
  996. AU1500_TOY_MATCH1_INT,
  997. AU1500_TOY_MATCH2_INT,
  998. AU1500_RTC_INT,
  999. AU1500_RTC_MATCH0_INT,
  1000. AU1500_RTC_MATCH1_INT,
  1001. AU1500_RTC_MATCH2_INT,
  1002. AU1500_PCI_ERR_INT,
  1003. AU1500_RESERVED_INT,
  1004. AU1500_USB_DEV_REQ_INT,
  1005. AU1500_USB_DEV_SUS_INT,
  1006. AU1500_USB_HOST_INT,
  1007. AU1500_ACSYNC_INT,
  1008. AU1500_MAC0_DMA_INT,
  1009. AU1500_MAC1_DMA_INT,
  1010. AU1500_AC97C_INT = AU1500_FIRST_INT + 31,
  1011. AU1500_GPIO0_INT,
  1012. AU1500_GPIO1_INT,
  1013. AU1500_GPIO2_INT,
  1014. AU1500_GPIO3_INT,
  1015. AU1500_GPIO4_INT,
  1016. AU1500_GPIO5_INT,
  1017. AU1500_GPIO6_INT,
  1018. AU1500_GPIO7_INT,
  1019. AU1500_GPIO8_INT,
  1020. AU1500_GPIO9_INT,
  1021. AU1500_GPIO10_INT,
  1022. AU1500_GPIO11_INT,
  1023. AU1500_GPIO12_INT,
  1024. AU1500_GPIO13_INT,
  1025. AU1500_GPIO14_INT,
  1026. AU1500_GPIO15_INT,
  1027. AU1500_GPIO200_INT,
  1028. AU1500_GPIO201_INT,
  1029. AU1500_GPIO202_INT,
  1030. AU1500_GPIO203_INT,
  1031. AU1500_GPIO20_INT,
  1032. AU1500_GPIO204_INT,
  1033. AU1500_GPIO205_INT,
  1034. AU1500_GPIO23_INT,
  1035. AU1500_GPIO24_INT,
  1036. AU1500_GPIO25_INT,
  1037. AU1500_GPIO26_INT,
  1038. AU1500_GPIO27_INT,
  1039. AU1500_GPIO28_INT,
  1040. AU1500_GPIO206_INT,
  1041. AU1500_GPIO207_INT,
  1042. AU1500_GPIO208_215_INT,
  1043. };
  1044. enum soc_au1550_ints {
  1045. AU1550_FIRST_INT = AU1000_INTC0_INT_BASE,
  1046. AU1550_UART0_INT = AU1550_FIRST_INT,
  1047. AU1550_PCI_INTA,
  1048. AU1550_PCI_INTB,
  1049. AU1550_DDMA_INT,
  1050. AU1550_CRYPTO_INT,
  1051. AU1550_PCI_INTC,
  1052. AU1550_PCI_INTD,
  1053. AU1550_PCI_RST_INT,
  1054. AU1550_UART1_INT,
  1055. AU1550_UART3_INT,
  1056. AU1550_PSC0_INT,
  1057. AU1550_PSC1_INT,
  1058. AU1550_PSC2_INT,
  1059. AU1550_PSC3_INT,
  1060. AU1550_TOY_INT,
  1061. AU1550_TOY_MATCH0_INT,
  1062. AU1550_TOY_MATCH1_INT,
  1063. AU1550_TOY_MATCH2_INT,
  1064. AU1550_RTC_INT,
  1065. AU1550_RTC_MATCH0_INT,
  1066. AU1550_RTC_MATCH1_INT,
  1067. AU1550_RTC_MATCH2_INT,
  1068. AU1550_NAND_INT = AU1550_FIRST_INT + 23,
  1069. AU1550_USB_DEV_REQ_INT,
  1070. AU1550_USB_DEV_SUS_INT,
  1071. AU1550_USB_HOST_INT,
  1072. AU1550_MAC0_DMA_INT,
  1073. AU1550_MAC1_DMA_INT,
  1074. AU1550_GPIO0_INT = AU1550_FIRST_INT + 32,
  1075. AU1550_GPIO1_INT,
  1076. AU1550_GPIO2_INT,
  1077. AU1550_GPIO3_INT,
  1078. AU1550_GPIO4_INT,
  1079. AU1550_GPIO5_INT,
  1080. AU1550_GPIO6_INT,
  1081. AU1550_GPIO7_INT,
  1082. AU1550_GPIO8_INT,
  1083. AU1550_GPIO9_INT,
  1084. AU1550_GPIO10_INT,
  1085. AU1550_GPIO11_INT,
  1086. AU1550_GPIO12_INT,
  1087. AU1550_GPIO13_INT,
  1088. AU1550_GPIO14_INT,
  1089. AU1550_GPIO15_INT,
  1090. AU1550_GPIO200_INT,
  1091. AU1550_GPIO201_205_INT, /* Logical or of GPIO201:205 */
  1092. AU1550_GPIO16_INT,
  1093. AU1550_GPIO17_INT,
  1094. AU1550_GPIO20_INT,
  1095. AU1550_GPIO21_INT,
  1096. AU1550_GPIO22_INT,
  1097. AU1550_GPIO23_INT,
  1098. AU1550_GPIO24_INT,
  1099. AU1550_GPIO25_INT,
  1100. AU1550_GPIO26_INT,
  1101. AU1550_GPIO27_INT,
  1102. AU1550_GPIO28_INT,
  1103. AU1550_GPIO206_INT,
  1104. AU1550_GPIO207_INT,
  1105. AU1550_GPIO208_215_INT, /* Logical or of GPIO208:215 */
  1106. };
  1107. enum soc_au1200_ints {
  1108. AU1200_FIRST_INT = AU1000_INTC0_INT_BASE,
  1109. AU1200_UART0_INT = AU1200_FIRST_INT,
  1110. AU1200_SWT_INT,
  1111. AU1200_SD_INT,
  1112. AU1200_DDMA_INT,
  1113. AU1200_MAE_BE_INT,
  1114. AU1200_GPIO200_INT,
  1115. AU1200_GPIO201_INT,
  1116. AU1200_GPIO202_INT,
  1117. AU1200_UART1_INT,
  1118. AU1200_MAE_FE_INT,
  1119. AU1200_PSC0_INT,
  1120. AU1200_PSC1_INT,
  1121. AU1200_AES_INT,
  1122. AU1200_CAMERA_INT,
  1123. AU1200_TOY_INT,
  1124. AU1200_TOY_MATCH0_INT,
  1125. AU1200_TOY_MATCH1_INT,
  1126. AU1200_TOY_MATCH2_INT,
  1127. AU1200_RTC_INT,
  1128. AU1200_RTC_MATCH0_INT,
  1129. AU1200_RTC_MATCH1_INT,
  1130. AU1200_RTC_MATCH2_INT,
  1131. AU1200_GPIO203_INT,
  1132. AU1200_NAND_INT,
  1133. AU1200_GPIO204_INT,
  1134. AU1200_GPIO205_INT,
  1135. AU1200_GPIO206_INT,
  1136. AU1200_GPIO207_INT,
  1137. AU1200_GPIO208_215_INT, /* Logical OR of 208:215 */
  1138. AU1200_USB_INT,
  1139. AU1200_LCD_INT,
  1140. AU1200_MAE_BOTH_INT,
  1141. AU1200_GPIO0_INT,
  1142. AU1200_GPIO1_INT,
  1143. AU1200_GPIO2_INT,
  1144. AU1200_GPIO3_INT,
  1145. AU1200_GPIO4_INT,
  1146. AU1200_GPIO5_INT,
  1147. AU1200_GPIO6_INT,
  1148. AU1200_GPIO7_INT,
  1149. AU1200_GPIO8_INT,
  1150. AU1200_GPIO9_INT,
  1151. AU1200_GPIO10_INT,
  1152. AU1200_GPIO11_INT,
  1153. AU1200_GPIO12_INT,
  1154. AU1200_GPIO13_INT,
  1155. AU1200_GPIO14_INT,
  1156. AU1200_GPIO15_INT,
  1157. AU1200_GPIO16_INT,
  1158. AU1200_GPIO17_INT,
  1159. AU1200_GPIO18_INT,
  1160. AU1200_GPIO19_INT,
  1161. AU1200_GPIO20_INT,
  1162. AU1200_GPIO21_INT,
  1163. AU1200_GPIO22_INT,
  1164. AU1200_GPIO23_INT,
  1165. AU1200_GPIO24_INT,
  1166. AU1200_GPIO25_INT,
  1167. AU1200_GPIO26_INT,
  1168. AU1200_GPIO27_INT,
  1169. AU1200_GPIO28_INT,
  1170. AU1200_GPIO29_INT,
  1171. AU1200_GPIO30_INT,
  1172. AU1200_GPIO31_INT,
  1173. };
  1174. #endif /* !defined (_LANGUAGE_ASSEMBLY) */
  1175. #endif