au1000.h 39 KB

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