au1000.h 52 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776
  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. #ifndef _LANGUAGE_ASSEMBLY
  35. #include <linux/delay.h>
  36. #include <linux/types.h>
  37. #include <linux/io.h>
  38. #include <linux/irq.h>
  39. /* cpu pipeline flush */
  40. void static inline au_sync(void)
  41. {
  42. __asm__ volatile ("sync");
  43. }
  44. void static inline au_sync_udelay(int us)
  45. {
  46. __asm__ volatile ("sync");
  47. udelay(us);
  48. }
  49. void static inline au_sync_delay(int ms)
  50. {
  51. __asm__ volatile ("sync");
  52. mdelay(ms);
  53. }
  54. void static inline au_writeb(u8 val, unsigned long reg)
  55. {
  56. *(volatile u8 *)reg = val;
  57. }
  58. void static inline au_writew(u16 val, unsigned long reg)
  59. {
  60. *(volatile u16 *)reg = val;
  61. }
  62. void static inline au_writel(u32 val, unsigned long reg)
  63. {
  64. *(volatile u32 *)reg = val;
  65. }
  66. static inline u8 au_readb(unsigned long reg)
  67. {
  68. return *(volatile u8 *)reg;
  69. }
  70. static inline u16 au_readw(unsigned long reg)
  71. {
  72. return *(volatile u16 *)reg;
  73. }
  74. static inline u32 au_readl(unsigned long reg)
  75. {
  76. return *(volatile u32 *)reg;
  77. }
  78. /* Early Au1000 have a write-only SYS_CPUPLL register. */
  79. static inline int au1xxx_cpu_has_pll_wo(void)
  80. {
  81. switch (read_c0_prid()) {
  82. case 0x00030100: /* Au1000 DA */
  83. case 0x00030201: /* Au1000 HA */
  84. case 0x00030202: /* Au1000 HB */
  85. return 1;
  86. }
  87. return 0;
  88. }
  89. /* does CPU need CONFIG[OD] set to fix tons of errata? */
  90. static inline int au1xxx_cpu_needs_config_od(void)
  91. {
  92. /*
  93. * c0_config.od (bit 19) was write only (and read as 0) on the
  94. * early revisions of Alchemy SOCs. It disables the bus trans-
  95. * action overlapping and needs to be set to fix various errata.
  96. */
  97. switch (read_c0_prid()) {
  98. case 0x00030100: /* Au1000 DA */
  99. case 0x00030201: /* Au1000 HA */
  100. case 0x00030202: /* Au1000 HB */
  101. case 0x01030200: /* Au1500 AB */
  102. /*
  103. * Au1100/Au1200 errata actually keep silence about this bit,
  104. * so we set it just in case for those revisions that require
  105. * it to be set according to the (now gone) cpu_table.
  106. */
  107. case 0x02030200: /* Au1100 AB */
  108. case 0x02030201: /* Au1100 BA */
  109. case 0x02030202: /* Au1100 BC */
  110. case 0x04030201: /* Au1200 AC */
  111. return 1;
  112. }
  113. return 0;
  114. }
  115. /* arch/mips/au1000/common/clocks.c */
  116. extern void set_au1x00_speed(unsigned int new_freq);
  117. extern unsigned int get_au1x00_speed(void);
  118. extern void set_au1x00_uart_baud_base(unsigned long new_baud_base);
  119. extern unsigned long get_au1x00_uart_baud_base(void);
  120. extern unsigned long au1xxx_calc_clock(void);
  121. /* PM: arch/mips/alchemy/common/sleeper.S, power.c, irq.c */
  122. void au1xxx_save_and_sleep(void);
  123. void au_sleep(void);
  124. void save_au1xxx_intctl(void);
  125. void restore_au1xxx_intctl(void);
  126. #endif /* !defined (_LANGUAGE_ASSEMBLY) */
  127. /*
  128. * SDRAM register offsets
  129. */
  130. #if defined(CONFIG_SOC_AU1000) || defined(CONFIG_SOC_AU1500) || \
  131. defined(CONFIG_SOC_AU1100)
  132. #define MEM_SDMODE0 0x0000
  133. #define MEM_SDMODE1 0x0004
  134. #define MEM_SDMODE2 0x0008
  135. #define MEM_SDADDR0 0x000C
  136. #define MEM_SDADDR1 0x0010
  137. #define MEM_SDADDR2 0x0014
  138. #define MEM_SDREFCFG 0x0018
  139. #define MEM_SDPRECMD 0x001C
  140. #define MEM_SDAUTOREF 0x0020
  141. #define MEM_SDWRMD0 0x0024
  142. #define MEM_SDWRMD1 0x0028
  143. #define MEM_SDWRMD2 0x002C
  144. #define MEM_SDSLEEP 0x0030
  145. #define MEM_SDSMCKE 0x0034
  146. /*
  147. * MEM_SDMODE register content definitions
  148. */
  149. #define MEM_SDMODE_F (1 << 22)
  150. #define MEM_SDMODE_SR (1 << 21)
  151. #define MEM_SDMODE_BS (1 << 20)
  152. #define MEM_SDMODE_RS (3 << 18)
  153. #define MEM_SDMODE_CS (7 << 15)
  154. #define MEM_SDMODE_TRAS (15 << 11)
  155. #define MEM_SDMODE_TMRD (3 << 9)
  156. #define MEM_SDMODE_TWR (3 << 7)
  157. #define MEM_SDMODE_TRP (3 << 5)
  158. #define MEM_SDMODE_TRCD (3 << 3)
  159. #define MEM_SDMODE_TCL (7 << 0)
  160. #define MEM_SDMODE_BS_2Bank (0 << 20)
  161. #define MEM_SDMODE_BS_4Bank (1 << 20)
  162. #define MEM_SDMODE_RS_11Row (0 << 18)
  163. #define MEM_SDMODE_RS_12Row (1 << 18)
  164. #define MEM_SDMODE_RS_13Row (2 << 18)
  165. #define MEM_SDMODE_RS_N(N) ((N) << 18)
  166. #define MEM_SDMODE_CS_7Col (0 << 15)
  167. #define MEM_SDMODE_CS_8Col (1 << 15)
  168. #define MEM_SDMODE_CS_9Col (2 << 15)
  169. #define MEM_SDMODE_CS_10Col (3 << 15)
  170. #define MEM_SDMODE_CS_11Col (4 << 15)
  171. #define MEM_SDMODE_CS_N(N) ((N) << 15)
  172. #define MEM_SDMODE_TRAS_N(N) ((N) << 11)
  173. #define MEM_SDMODE_TMRD_N(N) ((N) << 9)
  174. #define MEM_SDMODE_TWR_N(N) ((N) << 7)
  175. #define MEM_SDMODE_TRP_N(N) ((N) << 5)
  176. #define MEM_SDMODE_TRCD_N(N) ((N) << 3)
  177. #define MEM_SDMODE_TCL_N(N) ((N) << 0)
  178. /*
  179. * MEM_SDADDR register contents definitions
  180. */
  181. #define MEM_SDADDR_E (1 << 20)
  182. #define MEM_SDADDR_CSBA (0x03FF << 10)
  183. #define MEM_SDADDR_CSMASK (0x03FF << 0)
  184. #define MEM_SDADDR_CSBA_N(N) ((N) & (0x03FF << 22) >> 12)
  185. #define MEM_SDADDR_CSMASK_N(N) ((N)&(0x03FF << 22) >> 22)
  186. /*
  187. * MEM_SDREFCFG register content definitions
  188. */
  189. #define MEM_SDREFCFG_TRC (15 << 28)
  190. #define MEM_SDREFCFG_TRPM (3 << 26)
  191. #define MEM_SDREFCFG_E (1 << 25)
  192. #define MEM_SDREFCFG_RE (0x1ffffff << 0)
  193. #define MEM_SDREFCFG_TRC_N(N) ((N) << MEM_SDREFCFG_TRC)
  194. #define MEM_SDREFCFG_TRPM_N(N) ((N) << MEM_SDREFCFG_TRPM)
  195. #define MEM_SDREFCFG_REF_N(N) (N)
  196. #endif
  197. /***********************************************************************/
  198. /*
  199. * Au1550 SDRAM Register Offsets
  200. */
  201. /***********************************************************************/
  202. #if defined(CONFIG_SOC_AU1550) || defined(CONFIG_SOC_AU1200)
  203. #define MEM_SDMODE0 0x0800
  204. #define MEM_SDMODE1 0x0808
  205. #define MEM_SDMODE2 0x0810
  206. #define MEM_SDADDR0 0x0820
  207. #define MEM_SDADDR1 0x0828
  208. #define MEM_SDADDR2 0x0830
  209. #define MEM_SDCONFIGA 0x0840
  210. #define MEM_SDCONFIGB 0x0848
  211. #define MEM_SDSTAT 0x0850
  212. #define MEM_SDERRADDR 0x0858
  213. #define MEM_SDSTRIDE0 0x0860
  214. #define MEM_SDSTRIDE1 0x0868
  215. #define MEM_SDSTRIDE2 0x0870
  216. #define MEM_SDWRMD0 0x0880
  217. #define MEM_SDWRMD1 0x0888
  218. #define MEM_SDWRMD2 0x0890
  219. #define MEM_SDPRECMD 0x08C0
  220. #define MEM_SDAUTOREF 0x08C8
  221. #define MEM_SDSREF 0x08D0
  222. #define MEM_SDSLEEP MEM_SDSREF
  223. #endif
  224. /*
  225. * Physical base addresses for integrated peripherals
  226. */
  227. #ifdef CONFIG_SOC_AU1000
  228. #define MEM_PHYS_ADDR 0x14000000
  229. #define STATIC_MEM_PHYS_ADDR 0x14001000
  230. #define DMA0_PHYS_ADDR 0x14002000
  231. #define DMA1_PHYS_ADDR 0x14002100
  232. #define DMA2_PHYS_ADDR 0x14002200
  233. #define DMA3_PHYS_ADDR 0x14002300
  234. #define DMA4_PHYS_ADDR 0x14002400
  235. #define DMA5_PHYS_ADDR 0x14002500
  236. #define DMA6_PHYS_ADDR 0x14002600
  237. #define DMA7_PHYS_ADDR 0x14002700
  238. #define IC0_PHYS_ADDR 0x10400000
  239. #define IC1_PHYS_ADDR 0x11800000
  240. #define AC97_PHYS_ADDR 0x10000000
  241. #define USBH_PHYS_ADDR 0x10100000
  242. #define USBD_PHYS_ADDR 0x10200000
  243. #define IRDA_PHYS_ADDR 0x10300000
  244. #define MAC0_PHYS_ADDR 0x10500000
  245. #define MAC1_PHYS_ADDR 0x10510000
  246. #define MACEN_PHYS_ADDR 0x10520000
  247. #define MACDMA0_PHYS_ADDR 0x14004000
  248. #define MACDMA1_PHYS_ADDR 0x14004200
  249. #define I2S_PHYS_ADDR 0x11000000
  250. #define UART0_PHYS_ADDR 0x11100000
  251. #define UART1_PHYS_ADDR 0x11200000
  252. #define UART2_PHYS_ADDR 0x11300000
  253. #define UART3_PHYS_ADDR 0x11400000
  254. #define SSI0_PHYS_ADDR 0x11600000
  255. #define SSI1_PHYS_ADDR 0x11680000
  256. #define SYS_PHYS_ADDR 0x11900000
  257. #define PCMCIA_IO_PHYS_ADDR 0xF00000000ULL
  258. #define PCMCIA_ATTR_PHYS_ADDR 0xF40000000ULL
  259. #define PCMCIA_MEM_PHYS_ADDR 0xF80000000ULL
  260. #endif
  261. /********************************************************************/
  262. #ifdef CONFIG_SOC_AU1500
  263. #define MEM_PHYS_ADDR 0x14000000
  264. #define STATIC_MEM_PHYS_ADDR 0x14001000
  265. #define DMA0_PHYS_ADDR 0x14002000
  266. #define DMA1_PHYS_ADDR 0x14002100
  267. #define DMA2_PHYS_ADDR 0x14002200
  268. #define DMA3_PHYS_ADDR 0x14002300
  269. #define DMA4_PHYS_ADDR 0x14002400
  270. #define DMA5_PHYS_ADDR 0x14002500
  271. #define DMA6_PHYS_ADDR 0x14002600
  272. #define DMA7_PHYS_ADDR 0x14002700
  273. #define IC0_PHYS_ADDR 0x10400000
  274. #define IC1_PHYS_ADDR 0x11800000
  275. #define AC97_PHYS_ADDR 0x10000000
  276. #define USBH_PHYS_ADDR 0x10100000
  277. #define USBD_PHYS_ADDR 0x10200000
  278. #define PCI_PHYS_ADDR 0x14005000
  279. #define MAC0_PHYS_ADDR 0x11500000
  280. #define MAC1_PHYS_ADDR 0x11510000
  281. #define MACEN_PHYS_ADDR 0x11520000
  282. #define MACDMA0_PHYS_ADDR 0x14004000
  283. #define MACDMA1_PHYS_ADDR 0x14004200
  284. #define I2S_PHYS_ADDR 0x11000000
  285. #define UART0_PHYS_ADDR 0x11100000
  286. #define UART3_PHYS_ADDR 0x11400000
  287. #define GPIO2_PHYS_ADDR 0x11700000
  288. #define SYS_PHYS_ADDR 0x11900000
  289. #define PCI_MEM_PHYS_ADDR 0x400000000ULL
  290. #define PCI_IO_PHYS_ADDR 0x500000000ULL
  291. #define PCI_CONFIG0_PHYS_ADDR 0x600000000ULL
  292. #define PCI_CONFIG1_PHYS_ADDR 0x680000000ULL
  293. #define PCMCIA_IO_PHYS_ADDR 0xF00000000ULL
  294. #define PCMCIA_ATTR_PHYS_ADDR 0xF40000000ULL
  295. #define PCMCIA_MEM_PHYS_ADDR 0xF80000000ULL
  296. #endif
  297. /********************************************************************/
  298. #ifdef CONFIG_SOC_AU1100
  299. #define MEM_PHYS_ADDR 0x14000000
  300. #define STATIC_MEM_PHYS_ADDR 0x14001000
  301. #define DMA0_PHYS_ADDR 0x14002000
  302. #define DMA1_PHYS_ADDR 0x14002100
  303. #define DMA2_PHYS_ADDR 0x14002200
  304. #define DMA3_PHYS_ADDR 0x14002300
  305. #define DMA4_PHYS_ADDR 0x14002400
  306. #define DMA5_PHYS_ADDR 0x14002500
  307. #define DMA6_PHYS_ADDR 0x14002600
  308. #define DMA7_PHYS_ADDR 0x14002700
  309. #define IC0_PHYS_ADDR 0x10400000
  310. #define SD0_PHYS_ADDR 0x10600000
  311. #define SD1_PHYS_ADDR 0x10680000
  312. #define IC1_PHYS_ADDR 0x11800000
  313. #define AC97_PHYS_ADDR 0x10000000
  314. #define USBH_PHYS_ADDR 0x10100000
  315. #define USBD_PHYS_ADDR 0x10200000
  316. #define IRDA_PHYS_ADDR 0x10300000
  317. #define MAC0_PHYS_ADDR 0x10500000
  318. #define MACEN_PHYS_ADDR 0x10520000
  319. #define MACDMA0_PHYS_ADDR 0x14004000
  320. #define MACDMA1_PHYS_ADDR 0x14004200
  321. #define I2S_PHYS_ADDR 0x11000000
  322. #define UART0_PHYS_ADDR 0x11100000
  323. #define UART1_PHYS_ADDR 0x11200000
  324. #define UART3_PHYS_ADDR 0x11400000
  325. #define SSI0_PHYS_ADDR 0x11600000
  326. #define SSI1_PHYS_ADDR 0x11680000
  327. #define GPIO2_PHYS_ADDR 0x11700000
  328. #define SYS_PHYS_ADDR 0x11900000
  329. #define LCD_PHYS_ADDR 0x15000000
  330. #define PCMCIA_IO_PHYS_ADDR 0xF00000000ULL
  331. #define PCMCIA_ATTR_PHYS_ADDR 0xF40000000ULL
  332. #define PCMCIA_MEM_PHYS_ADDR 0xF80000000ULL
  333. #endif
  334. /***********************************************************************/
  335. #ifdef CONFIG_SOC_AU1550
  336. #define MEM_PHYS_ADDR 0x14000000
  337. #define STATIC_MEM_PHYS_ADDR 0x14001000
  338. #define IC0_PHYS_ADDR 0x10400000
  339. #define IC1_PHYS_ADDR 0x11800000
  340. #define USBH_PHYS_ADDR 0x14020000
  341. #define USBD_PHYS_ADDR 0x10200000
  342. #define PCI_PHYS_ADDR 0x14005000
  343. #define MAC0_PHYS_ADDR 0x10500000
  344. #define MAC1_PHYS_ADDR 0x10510000
  345. #define MACEN_PHYS_ADDR 0x10520000
  346. #define MACDMA0_PHYS_ADDR 0x14004000
  347. #define MACDMA1_PHYS_ADDR 0x14004200
  348. #define UART0_PHYS_ADDR 0x11100000
  349. #define UART1_PHYS_ADDR 0x11200000
  350. #define UART3_PHYS_ADDR 0x11400000
  351. #define GPIO2_PHYS_ADDR 0x11700000
  352. #define SYS_PHYS_ADDR 0x11900000
  353. #define DDMA_PHYS_ADDR 0x14002000
  354. #define PE_PHYS_ADDR 0x14008000
  355. #define PSC0_PHYS_ADDR 0x11A00000
  356. #define PSC1_PHYS_ADDR 0x11B00000
  357. #define PSC2_PHYS_ADDR 0x10A00000
  358. #define PSC3_PHYS_ADDR 0x10B00000
  359. #define PCI_MEM_PHYS_ADDR 0x400000000ULL
  360. #define PCI_IO_PHYS_ADDR 0x500000000ULL
  361. #define PCI_CONFIG0_PHYS_ADDR 0x600000000ULL
  362. #define PCI_CONFIG1_PHYS_ADDR 0x680000000ULL
  363. #define PCMCIA_IO_PHYS_ADDR 0xF00000000ULL
  364. #define PCMCIA_ATTR_PHYS_ADDR 0xF40000000ULL
  365. #define PCMCIA_MEM_PHYS_ADDR 0xF80000000ULL
  366. #endif
  367. /***********************************************************************/
  368. #ifdef CONFIG_SOC_AU1200
  369. #define MEM_PHYS_ADDR 0x14000000
  370. #define STATIC_MEM_PHYS_ADDR 0x14001000
  371. #define AES_PHYS_ADDR 0x10300000
  372. #define CIM_PHYS_ADDR 0x14004000
  373. #define IC0_PHYS_ADDR 0x10400000
  374. #define IC1_PHYS_ADDR 0x11800000
  375. #define USBM_PHYS_ADDR 0x14020000
  376. #define USBH_PHYS_ADDR 0x14020100
  377. #define UART0_PHYS_ADDR 0x11100000
  378. #define UART1_PHYS_ADDR 0x11200000
  379. #define GPIO2_PHYS_ADDR 0x11700000
  380. #define SYS_PHYS_ADDR 0x11900000
  381. #define DDMA_PHYS_ADDR 0x14002000
  382. #define PSC0_PHYS_ADDR 0x11A00000
  383. #define PSC1_PHYS_ADDR 0x11B00000
  384. #define SD0_PHYS_ADDR 0x10600000
  385. #define SD1_PHYS_ADDR 0x10680000
  386. #define LCD_PHYS_ADDR 0x15000000
  387. #define SWCNT_PHYS_ADDR 0x1110010C
  388. #define MAEFE_PHYS_ADDR 0x14012000
  389. #define MAEBE_PHYS_ADDR 0x14010000
  390. #define PCMCIA_IO_PHYS_ADDR 0xF00000000ULL
  391. #define PCMCIA_ATTR_PHYS_ADDR 0xF40000000ULL
  392. #define PCMCIA_MEM_PHYS_ADDR 0xF80000000ULL
  393. #endif
  394. /* Static Bus Controller */
  395. #define MEM_STCFG0 0xB4001000
  396. #define MEM_STTIME0 0xB4001004
  397. #define MEM_STADDR0 0xB4001008
  398. #define MEM_STCFG1 0xB4001010
  399. #define MEM_STTIME1 0xB4001014
  400. #define MEM_STADDR1 0xB4001018
  401. #define MEM_STCFG2 0xB4001020
  402. #define MEM_STTIME2 0xB4001024
  403. #define MEM_STADDR2 0xB4001028
  404. #define MEM_STCFG3 0xB4001030
  405. #define MEM_STTIME3 0xB4001034
  406. #define MEM_STADDR3 0xB4001038
  407. #if defined(CONFIG_SOC_AU1550) || defined(CONFIG_SOC_AU1200)
  408. #define MEM_STNDCTL 0xB4001100
  409. #define MEM_STSTAT 0xB4001104
  410. #define MEM_STNAND_CMD 0x0
  411. #define MEM_STNAND_ADDR 0x4
  412. #define MEM_STNAND_DATA 0x20
  413. #endif
  414. /* Interrupt Controller 0 */
  415. #define IC0_CFG0RD 0xB0400040
  416. #define IC0_CFG0SET 0xB0400040
  417. #define IC0_CFG0CLR 0xB0400044
  418. #define IC0_CFG1RD 0xB0400048
  419. #define IC0_CFG1SET 0xB0400048
  420. #define IC0_CFG1CLR 0xB040004C
  421. #define IC0_CFG2RD 0xB0400050
  422. #define IC0_CFG2SET 0xB0400050
  423. #define IC0_CFG2CLR 0xB0400054
  424. #define IC0_REQ0INT 0xB0400054
  425. #define IC0_SRCRD 0xB0400058
  426. #define IC0_SRCSET 0xB0400058
  427. #define IC0_SRCCLR 0xB040005C
  428. #define IC0_REQ1INT 0xB040005C
  429. #define IC0_ASSIGNRD 0xB0400060
  430. #define IC0_ASSIGNSET 0xB0400060
  431. #define IC0_ASSIGNCLR 0xB0400064
  432. #define IC0_WAKERD 0xB0400068
  433. #define IC0_WAKESET 0xB0400068
  434. #define IC0_WAKECLR 0xB040006C
  435. #define IC0_MASKRD 0xB0400070
  436. #define IC0_MASKSET 0xB0400070
  437. #define IC0_MASKCLR 0xB0400074
  438. #define IC0_RISINGRD 0xB0400078
  439. #define IC0_RISINGCLR 0xB0400078
  440. #define IC0_FALLINGRD 0xB040007C
  441. #define IC0_FALLINGCLR 0xB040007C
  442. #define IC0_TESTBIT 0xB0400080
  443. /* Interrupt Controller 1 */
  444. #define IC1_CFG0RD 0xB1800040
  445. #define IC1_CFG0SET 0xB1800040
  446. #define IC1_CFG0CLR 0xB1800044
  447. #define IC1_CFG1RD 0xB1800048
  448. #define IC1_CFG1SET 0xB1800048
  449. #define IC1_CFG1CLR 0xB180004C
  450. #define IC1_CFG2RD 0xB1800050
  451. #define IC1_CFG2SET 0xB1800050
  452. #define IC1_CFG2CLR 0xB1800054
  453. #define IC1_REQ0INT 0xB1800054
  454. #define IC1_SRCRD 0xB1800058
  455. #define IC1_SRCSET 0xB1800058
  456. #define IC1_SRCCLR 0xB180005C
  457. #define IC1_REQ1INT 0xB180005C
  458. #define IC1_ASSIGNRD 0xB1800060
  459. #define IC1_ASSIGNSET 0xB1800060
  460. #define IC1_ASSIGNCLR 0xB1800064
  461. #define IC1_WAKERD 0xB1800068
  462. #define IC1_WAKESET 0xB1800068
  463. #define IC1_WAKECLR 0xB180006C
  464. #define IC1_MASKRD 0xB1800070
  465. #define IC1_MASKSET 0xB1800070
  466. #define IC1_MASKCLR 0xB1800074
  467. #define IC1_RISINGRD 0xB1800078
  468. #define IC1_RISINGCLR 0xB1800078
  469. #define IC1_FALLINGRD 0xB180007C
  470. #define IC1_FALLINGCLR 0xB180007C
  471. #define IC1_TESTBIT 0xB1800080
  472. /* Interrupt Numbers */
  473. /* Au1000 */
  474. #ifdef CONFIG_SOC_AU1000
  475. enum soc_au1000_ints {
  476. AU1000_FIRST_INT = MIPS_CPU_IRQ_BASE + 8,
  477. AU1000_UART0_INT = AU1000_FIRST_INT,
  478. AU1000_UART1_INT, /* au1000 */
  479. AU1000_UART2_INT, /* au1000 */
  480. AU1000_UART3_INT,
  481. AU1000_SSI0_INT, /* au1000 */
  482. AU1000_SSI1_INT, /* au1000 */
  483. AU1000_DMA_INT_BASE,
  484. AU1000_TOY_INT = AU1000_FIRST_INT + 14,
  485. AU1000_TOY_MATCH0_INT,
  486. AU1000_TOY_MATCH1_INT,
  487. AU1000_TOY_MATCH2_INT,
  488. AU1000_RTC_INT,
  489. AU1000_RTC_MATCH0_INT,
  490. AU1000_RTC_MATCH1_INT,
  491. AU1000_RTC_MATCH2_INT,
  492. AU1000_IRDA_TX_INT, /* au1000 */
  493. AU1000_IRDA_RX_INT, /* au1000 */
  494. AU1000_USB_DEV_REQ_INT,
  495. AU1000_USB_DEV_SUS_INT,
  496. AU1000_USB_HOST_INT,
  497. AU1000_ACSYNC_INT,
  498. AU1000_MAC0_DMA_INT,
  499. AU1000_MAC1_DMA_INT,
  500. AU1000_I2S_UO_INT, /* au1000 */
  501. AU1000_AC97C_INT,
  502. AU1000_GPIO_0,
  503. AU1000_GPIO_1,
  504. AU1000_GPIO_2,
  505. AU1000_GPIO_3,
  506. AU1000_GPIO_4,
  507. AU1000_GPIO_5,
  508. AU1000_GPIO_6,
  509. AU1000_GPIO_7,
  510. AU1000_GPIO_8,
  511. AU1000_GPIO_9,
  512. AU1000_GPIO_10,
  513. AU1000_GPIO_11,
  514. AU1000_GPIO_12,
  515. AU1000_GPIO_13,
  516. AU1000_GPIO_14,
  517. AU1000_GPIO_15,
  518. AU1000_GPIO_16,
  519. AU1000_GPIO_17,
  520. AU1000_GPIO_18,
  521. AU1000_GPIO_19,
  522. AU1000_GPIO_20,
  523. AU1000_GPIO_21,
  524. AU1000_GPIO_22,
  525. AU1000_GPIO_23,
  526. AU1000_GPIO_24,
  527. AU1000_GPIO_25,
  528. AU1000_GPIO_26,
  529. AU1000_GPIO_27,
  530. AU1000_GPIO_28,
  531. AU1000_GPIO_29,
  532. AU1000_GPIO_30,
  533. AU1000_GPIO_31,
  534. };
  535. #define UART0_ADDR 0xB1100000
  536. #define UART1_ADDR 0xB1200000
  537. #define UART2_ADDR 0xB1300000
  538. #define UART3_ADDR 0xB1400000
  539. #define USB_OHCI_BASE 0x10100000 /* phys addr for ioremap */
  540. #define USB_HOST_CONFIG 0xB017FFFC
  541. #define AU1000_ETH0_BASE 0xB0500000
  542. #define AU1000_ETH1_BASE 0xB0510000
  543. #define AU1000_MAC0_ENABLE 0xB0520000
  544. #define AU1000_MAC1_ENABLE 0xB0520004
  545. #define NUM_ETH_INTERFACES 2
  546. #endif /* CONFIG_SOC_AU1000 */
  547. /* Au1500 */
  548. #ifdef CONFIG_SOC_AU1500
  549. enum soc_au1500_ints {
  550. AU1500_FIRST_INT = MIPS_CPU_IRQ_BASE + 8,
  551. AU1500_UART0_INT = AU1500_FIRST_INT,
  552. AU1000_PCI_INTA, /* au1500 */
  553. AU1000_PCI_INTB, /* au1500 */
  554. AU1500_UART3_INT,
  555. AU1000_PCI_INTC, /* au1500 */
  556. AU1000_PCI_INTD, /* au1500 */
  557. AU1000_DMA_INT_BASE,
  558. AU1000_TOY_INT = AU1500_FIRST_INT + 14,
  559. AU1000_TOY_MATCH0_INT,
  560. AU1000_TOY_MATCH1_INT,
  561. AU1000_TOY_MATCH2_INT,
  562. AU1000_RTC_INT,
  563. AU1000_RTC_MATCH0_INT,
  564. AU1000_RTC_MATCH1_INT,
  565. AU1000_RTC_MATCH2_INT,
  566. AU1500_PCI_ERR_INT,
  567. AU1500_RESERVED_INT,
  568. AU1000_USB_DEV_REQ_INT,
  569. AU1000_USB_DEV_SUS_INT,
  570. AU1000_USB_HOST_INT,
  571. AU1000_ACSYNC_INT,
  572. AU1500_MAC0_DMA_INT,
  573. AU1500_MAC1_DMA_INT,
  574. AU1000_AC97C_INT = AU1500_FIRST_INT + 31,
  575. AU1000_GPIO_0,
  576. AU1000_GPIO_1,
  577. AU1000_GPIO_2,
  578. AU1000_GPIO_3,
  579. AU1000_GPIO_4,
  580. AU1000_GPIO_5,
  581. AU1000_GPIO_6,
  582. AU1000_GPIO_7,
  583. AU1000_GPIO_8,
  584. AU1000_GPIO_9,
  585. AU1000_GPIO_10,
  586. AU1000_GPIO_11,
  587. AU1000_GPIO_12,
  588. AU1000_GPIO_13,
  589. AU1000_GPIO_14,
  590. AU1000_GPIO_15,
  591. AU1500_GPIO_200,
  592. AU1500_GPIO_201,
  593. AU1500_GPIO_202,
  594. AU1500_GPIO_203,
  595. AU1500_GPIO_20,
  596. AU1500_GPIO_204,
  597. AU1500_GPIO_205,
  598. AU1500_GPIO_23,
  599. AU1500_GPIO_24,
  600. AU1500_GPIO_25,
  601. AU1500_GPIO_26,
  602. AU1500_GPIO_27,
  603. AU1500_GPIO_28,
  604. AU1500_GPIO_206,
  605. AU1500_GPIO_207,
  606. AU1500_GPIO_208_215,
  607. };
  608. /* shortcuts */
  609. #define INTA AU1000_PCI_INTA
  610. #define INTB AU1000_PCI_INTB
  611. #define INTC AU1000_PCI_INTC
  612. #define INTD AU1000_PCI_INTD
  613. #define UART0_ADDR 0xB1100000
  614. #define UART3_ADDR 0xB1400000
  615. #define USB_OHCI_BASE 0x10100000 /* phys addr for ioremap */
  616. #define USB_HOST_CONFIG 0xB017fffc
  617. #define AU1500_ETH0_BASE 0xB1500000
  618. #define AU1500_ETH1_BASE 0xB1510000
  619. #define AU1500_MAC0_ENABLE 0xB1520000
  620. #define AU1500_MAC1_ENABLE 0xB1520004
  621. #define NUM_ETH_INTERFACES 2
  622. #endif /* CONFIG_SOC_AU1500 */
  623. /* Au1100 */
  624. #ifdef CONFIG_SOC_AU1100
  625. enum soc_au1100_ints {
  626. AU1100_FIRST_INT = MIPS_CPU_IRQ_BASE + 8,
  627. AU1100_UART0_INT = AU1100_FIRST_INT,
  628. AU1100_UART1_INT,
  629. AU1100_SD_INT,
  630. AU1100_UART3_INT,
  631. AU1000_SSI0_INT,
  632. AU1000_SSI1_INT,
  633. AU1000_DMA_INT_BASE,
  634. AU1000_TOY_INT = AU1100_FIRST_INT + 14,
  635. AU1000_TOY_MATCH0_INT,
  636. AU1000_TOY_MATCH1_INT,
  637. AU1000_TOY_MATCH2_INT,
  638. AU1000_RTC_INT,
  639. AU1000_RTC_MATCH0_INT,
  640. AU1000_RTC_MATCH1_INT,
  641. AU1000_RTC_MATCH2_INT,
  642. AU1000_IRDA_TX_INT,
  643. AU1000_IRDA_RX_INT,
  644. AU1000_USB_DEV_REQ_INT,
  645. AU1000_USB_DEV_SUS_INT,
  646. AU1000_USB_HOST_INT,
  647. AU1000_ACSYNC_INT,
  648. AU1100_MAC0_DMA_INT,
  649. AU1100_GPIO_208_215,
  650. AU1100_LCD_INT,
  651. AU1000_AC97C_INT,
  652. AU1000_GPIO_0,
  653. AU1000_GPIO_1,
  654. AU1000_GPIO_2,
  655. AU1000_GPIO_3,
  656. AU1000_GPIO_4,
  657. AU1000_GPIO_5,
  658. AU1000_GPIO_6,
  659. AU1000_GPIO_7,
  660. AU1000_GPIO_8,
  661. AU1000_GPIO_9,
  662. AU1000_GPIO_10,
  663. AU1000_GPIO_11,
  664. AU1000_GPIO_12,
  665. AU1000_GPIO_13,
  666. AU1000_GPIO_14,
  667. AU1000_GPIO_15,
  668. AU1000_GPIO_16,
  669. AU1000_GPIO_17,
  670. AU1000_GPIO_18,
  671. AU1000_GPIO_19,
  672. AU1000_GPIO_20,
  673. AU1000_GPIO_21,
  674. AU1000_GPIO_22,
  675. AU1000_GPIO_23,
  676. AU1000_GPIO_24,
  677. AU1000_GPIO_25,
  678. AU1000_GPIO_26,
  679. AU1000_GPIO_27,
  680. AU1000_GPIO_28,
  681. AU1000_GPIO_29,
  682. AU1000_GPIO_30,
  683. AU1000_GPIO_31,
  684. };
  685. #define UART0_ADDR 0xB1100000
  686. #define UART1_ADDR 0xB1200000
  687. #define UART3_ADDR 0xB1400000
  688. #define USB_OHCI_BASE 0x10100000 /* phys addr for ioremap */
  689. #define USB_HOST_CONFIG 0xB017FFFC
  690. #define AU1100_ETH0_BASE 0xB0500000
  691. #define AU1100_MAC0_ENABLE 0xB0520000
  692. #define NUM_ETH_INTERFACES 1
  693. #endif /* CONFIG_SOC_AU1100 */
  694. #ifdef CONFIG_SOC_AU1550
  695. enum soc_au1550_ints {
  696. AU1550_FIRST_INT = MIPS_CPU_IRQ_BASE + 8,
  697. AU1550_UART0_INT = AU1550_FIRST_INT,
  698. AU1550_PCI_INTA,
  699. AU1550_PCI_INTB,
  700. AU1550_DDMA_INT,
  701. AU1550_CRYPTO_INT,
  702. AU1550_PCI_INTC,
  703. AU1550_PCI_INTD,
  704. AU1550_PCI_RST_INT,
  705. AU1550_UART1_INT,
  706. AU1550_UART3_INT,
  707. AU1550_PSC0_INT,
  708. AU1550_PSC1_INT,
  709. AU1550_PSC2_INT,
  710. AU1550_PSC3_INT,
  711. AU1000_TOY_INT,
  712. AU1000_TOY_MATCH0_INT,
  713. AU1000_TOY_MATCH1_INT,
  714. AU1000_TOY_MATCH2_INT,
  715. AU1000_RTC_INT,
  716. AU1000_RTC_MATCH0_INT,
  717. AU1000_RTC_MATCH1_INT,
  718. AU1000_RTC_MATCH2_INT,
  719. AU1550_NAND_INT = AU1550_FIRST_INT + 23,
  720. AU1550_USB_DEV_REQ_INT,
  721. AU1000_USB_DEV_REQ_INT = AU1550_USB_DEV_REQ_INT,
  722. AU1550_USB_DEV_SUS_INT,
  723. AU1000_USB_DEV_SUS_INT = AU1550_USB_DEV_SUS_INT,
  724. AU1550_USB_HOST_INT,
  725. AU1000_USB_HOST_INT = AU1550_USB_HOST_INT,
  726. AU1550_MAC0_DMA_INT,
  727. AU1550_MAC1_DMA_INT,
  728. AU1000_GPIO_0 = AU1550_FIRST_INT + 32,
  729. AU1000_GPIO_1,
  730. AU1000_GPIO_2,
  731. AU1000_GPIO_3,
  732. AU1000_GPIO_4,
  733. AU1000_GPIO_5,
  734. AU1000_GPIO_6,
  735. AU1000_GPIO_7,
  736. AU1000_GPIO_8,
  737. AU1000_GPIO_9,
  738. AU1000_GPIO_10,
  739. AU1000_GPIO_11,
  740. AU1000_GPIO_12,
  741. AU1000_GPIO_13,
  742. AU1000_GPIO_14,
  743. AU1000_GPIO_15,
  744. AU1550_GPIO_200,
  745. AU1500_GPIO_201_205, /* Logical or of GPIO201:205 */
  746. AU1500_GPIO_16,
  747. AU1500_GPIO_17,
  748. AU1500_GPIO_20,
  749. AU1500_GPIO_21,
  750. AU1500_GPIO_22,
  751. AU1500_GPIO_23,
  752. AU1500_GPIO_24,
  753. AU1500_GPIO_25,
  754. AU1500_GPIO_26,
  755. AU1500_GPIO_27,
  756. AU1500_GPIO_28,
  757. AU1500_GPIO_206,
  758. AU1500_GPIO_207,
  759. AU1500_GPIO_208_218, /* Logical or of GPIO208:218 */
  760. };
  761. /* shortcuts */
  762. #define INTA AU1550_PCI_INTA
  763. #define INTB AU1550_PCI_INTB
  764. #define INTC AU1550_PCI_INTC
  765. #define INTD AU1550_PCI_INTD
  766. #define UART0_ADDR 0xB1100000
  767. #define UART1_ADDR 0xB1200000
  768. #define UART3_ADDR 0xB1400000
  769. #define USB_OHCI_BASE 0x14020000 /* phys addr for ioremap */
  770. #define USB_OHCI_LEN 0x00060000
  771. #define USB_HOST_CONFIG 0xB4027ffc
  772. #define AU1550_ETH0_BASE 0xB0500000
  773. #define AU1550_ETH1_BASE 0xB0510000
  774. #define AU1550_MAC0_ENABLE 0xB0520000
  775. #define AU1550_MAC1_ENABLE 0xB0520004
  776. #define NUM_ETH_INTERFACES 2
  777. #endif /* CONFIG_SOC_AU1550 */
  778. #ifdef CONFIG_SOC_AU1200
  779. enum soc_au1200_ints {
  780. AU1200_FIRST_INT = MIPS_CPU_IRQ_BASE + 8,
  781. AU1200_UART0_INT = AU1200_FIRST_INT,
  782. AU1200_SWT_INT,
  783. AU1200_SD_INT,
  784. AU1200_DDMA_INT,
  785. AU1200_MAE_BE_INT,
  786. AU1200_GPIO_200,
  787. AU1200_GPIO_201,
  788. AU1200_GPIO_202,
  789. AU1200_UART1_INT,
  790. AU1200_MAE_FE_INT,
  791. AU1200_PSC0_INT,
  792. AU1200_PSC1_INT,
  793. AU1200_AES_INT,
  794. AU1200_CAMERA_INT,
  795. AU1000_TOY_INT,
  796. AU1000_TOY_MATCH0_INT,
  797. AU1000_TOY_MATCH1_INT,
  798. AU1000_TOY_MATCH2_INT,
  799. AU1000_RTC_INT,
  800. AU1000_RTC_MATCH0_INT,
  801. AU1000_RTC_MATCH1_INT,
  802. AU1000_RTC_MATCH2_INT,
  803. AU1200_GPIO_203,
  804. AU1200_NAND_INT,
  805. AU1200_GPIO_204,
  806. AU1200_GPIO_205,
  807. AU1200_GPIO_206,
  808. AU1200_GPIO_207,
  809. AU1200_GPIO_208_215, /* Logical OR of 208:215 */
  810. AU1200_USB_INT,
  811. AU1000_USB_HOST_INT = AU1200_USB_INT,
  812. AU1200_LCD_INT,
  813. AU1200_MAE_BOTH_INT,
  814. AU1000_GPIO_0,
  815. AU1000_GPIO_1,
  816. AU1000_GPIO_2,
  817. AU1000_GPIO_3,
  818. AU1000_GPIO_4,
  819. AU1000_GPIO_5,
  820. AU1000_GPIO_6,
  821. AU1000_GPIO_7,
  822. AU1000_GPIO_8,
  823. AU1000_GPIO_9,
  824. AU1000_GPIO_10,
  825. AU1000_GPIO_11,
  826. AU1000_GPIO_12,
  827. AU1000_GPIO_13,
  828. AU1000_GPIO_14,
  829. AU1000_GPIO_15,
  830. AU1000_GPIO_16,
  831. AU1000_GPIO_17,
  832. AU1000_GPIO_18,
  833. AU1000_GPIO_19,
  834. AU1000_GPIO_20,
  835. AU1000_GPIO_21,
  836. AU1000_GPIO_22,
  837. AU1000_GPIO_23,
  838. AU1000_GPIO_24,
  839. AU1000_GPIO_25,
  840. AU1000_GPIO_26,
  841. AU1000_GPIO_27,
  842. AU1000_GPIO_28,
  843. AU1000_GPIO_29,
  844. AU1000_GPIO_30,
  845. AU1000_GPIO_31,
  846. };
  847. #define UART0_ADDR 0xB1100000
  848. #define UART1_ADDR 0xB1200000
  849. #define USB_UOC_BASE 0x14020020
  850. #define USB_UOC_LEN 0x20
  851. #define USB_OHCI_BASE 0x14020100
  852. #define USB_OHCI_LEN 0x100
  853. #define USB_EHCI_BASE 0x14020200
  854. #define USB_EHCI_LEN 0x100
  855. #define USB_UDC_BASE 0x14022000
  856. #define USB_UDC_LEN 0x2000
  857. #define USB_MSR_BASE 0xB4020000
  858. #define USB_MSR_MCFG 4
  859. #define USBMSRMCFG_OMEMEN 0
  860. #define USBMSRMCFG_OBMEN 1
  861. #define USBMSRMCFG_EMEMEN 2
  862. #define USBMSRMCFG_EBMEN 3
  863. #define USBMSRMCFG_DMEMEN 4
  864. #define USBMSRMCFG_DBMEN 5
  865. #define USBMSRMCFG_GMEMEN 6
  866. #define USBMSRMCFG_OHCCLKEN 16
  867. #define USBMSRMCFG_EHCCLKEN 17
  868. #define USBMSRMCFG_UDCCLKEN 18
  869. #define USBMSRMCFG_PHYPLLEN 19
  870. #define USBMSRMCFG_RDCOMB 30
  871. #define USBMSRMCFG_PFEN 31
  872. #endif /* CONFIG_SOC_AU1200 */
  873. #define AU1000_INTC0_INT_BASE (MIPS_CPU_IRQ_BASE + 8)
  874. #define AU1000_INTC0_INT_LAST (AU1000_INTC0_INT_BASE + 31)
  875. #define AU1000_INTC1_INT_BASE (AU1000_INTC0_INT_BASE + 32)
  876. #define AU1000_INTC1_INT_LAST (AU1000_INTC1_INT_BASE + 31)
  877. #define AU1000_MAX_INTR AU1000_INTC1_INT_LAST
  878. #define INTX 0xFF /* not valid */
  879. /* Programmable Counters 0 and 1 */
  880. #define SYS_BASE 0xB1900000
  881. #define SYS_COUNTER_CNTRL (SYS_BASE + 0x14)
  882. # define SYS_CNTRL_E1S (1 << 23)
  883. # define SYS_CNTRL_T1S (1 << 20)
  884. # define SYS_CNTRL_M21 (1 << 19)
  885. # define SYS_CNTRL_M11 (1 << 18)
  886. # define SYS_CNTRL_M01 (1 << 17)
  887. # define SYS_CNTRL_C1S (1 << 16)
  888. # define SYS_CNTRL_BP (1 << 14)
  889. # define SYS_CNTRL_EN1 (1 << 13)
  890. # define SYS_CNTRL_BT1 (1 << 12)
  891. # define SYS_CNTRL_EN0 (1 << 11)
  892. # define SYS_CNTRL_BT0 (1 << 10)
  893. # define SYS_CNTRL_E0 (1 << 8)
  894. # define SYS_CNTRL_E0S (1 << 7)
  895. # define SYS_CNTRL_32S (1 << 5)
  896. # define SYS_CNTRL_T0S (1 << 4)
  897. # define SYS_CNTRL_M20 (1 << 3)
  898. # define SYS_CNTRL_M10 (1 << 2)
  899. # define SYS_CNTRL_M00 (1 << 1)
  900. # define SYS_CNTRL_C0S (1 << 0)
  901. /* Programmable Counter 0 Registers */
  902. #define SYS_TOYTRIM (SYS_BASE + 0)
  903. #define SYS_TOYWRITE (SYS_BASE + 4)
  904. #define SYS_TOYMATCH0 (SYS_BASE + 8)
  905. #define SYS_TOYMATCH1 (SYS_BASE + 0xC)
  906. #define SYS_TOYMATCH2 (SYS_BASE + 0x10)
  907. #define SYS_TOYREAD (SYS_BASE + 0x40)
  908. /* Programmable Counter 1 Registers */
  909. #define SYS_RTCTRIM (SYS_BASE + 0x44)
  910. #define SYS_RTCWRITE (SYS_BASE + 0x48)
  911. #define SYS_RTCMATCH0 (SYS_BASE + 0x4C)
  912. #define SYS_RTCMATCH1 (SYS_BASE + 0x50)
  913. #define SYS_RTCMATCH2 (SYS_BASE + 0x54)
  914. #define SYS_RTCREAD (SYS_BASE + 0x58)
  915. /* I2S Controller */
  916. #define I2S_DATA 0xB1000000
  917. # define I2S_DATA_MASK 0xffffff
  918. #define I2S_CONFIG 0xB1000004
  919. # define I2S_CONFIG_XU (1 << 25)
  920. # define I2S_CONFIG_XO (1 << 24)
  921. # define I2S_CONFIG_RU (1 << 23)
  922. # define I2S_CONFIG_RO (1 << 22)
  923. # define I2S_CONFIG_TR (1 << 21)
  924. # define I2S_CONFIG_TE (1 << 20)
  925. # define I2S_CONFIG_TF (1 << 19)
  926. # define I2S_CONFIG_RR (1 << 18)
  927. # define I2S_CONFIG_RE (1 << 17)
  928. # define I2S_CONFIG_RF (1 << 16)
  929. # define I2S_CONFIG_PD (1 << 11)
  930. # define I2S_CONFIG_LB (1 << 10)
  931. # define I2S_CONFIG_IC (1 << 9)
  932. # define I2S_CONFIG_FM_BIT 7
  933. # define I2S_CONFIG_FM_MASK (0x3 << I2S_CONFIG_FM_BIT)
  934. # define I2S_CONFIG_FM_I2S (0x0 << I2S_CONFIG_FM_BIT)
  935. # define I2S_CONFIG_FM_LJ (0x1 << I2S_CONFIG_FM_BIT)
  936. # define I2S_CONFIG_FM_RJ (0x2 << I2S_CONFIG_FM_BIT)
  937. # define I2S_CONFIG_TN (1 << 6)
  938. # define I2S_CONFIG_RN (1 << 5)
  939. # define I2S_CONFIG_SZ_BIT 0
  940. # define I2S_CONFIG_SZ_MASK (0x1F << I2S_CONFIG_SZ_BIT)
  941. #define I2S_CONTROL 0xB1000008
  942. # define I2S_CONTROL_D (1 << 1)
  943. # define I2S_CONTROL_CE (1 << 0)
  944. /* USB Host Controller */
  945. #ifndef USB_OHCI_LEN
  946. #define USB_OHCI_LEN 0x00100000
  947. #endif
  948. #ifndef CONFIG_SOC_AU1200
  949. /* USB Device Controller */
  950. #define USBD_EP0RD 0xB0200000
  951. #define USBD_EP0WR 0xB0200004
  952. #define USBD_EP2WR 0xB0200008
  953. #define USBD_EP3WR 0xB020000C
  954. #define USBD_EP4RD 0xB0200010
  955. #define USBD_EP5RD 0xB0200014
  956. #define USBD_INTEN 0xB0200018
  957. #define USBD_INTSTAT 0xB020001C
  958. # define USBDEV_INT_SOF (1 << 12)
  959. # define USBDEV_INT_HF_BIT 6
  960. # define USBDEV_INT_HF_MASK (0x3f << USBDEV_INT_HF_BIT)
  961. # define USBDEV_INT_CMPLT_BIT 0
  962. # define USBDEV_INT_CMPLT_MASK (0x3f << USBDEV_INT_CMPLT_BIT)
  963. #define USBD_CONFIG 0xB0200020
  964. #define USBD_EP0CS 0xB0200024
  965. #define USBD_EP2CS 0xB0200028
  966. #define USBD_EP3CS 0xB020002C
  967. #define USBD_EP4CS 0xB0200030
  968. #define USBD_EP5CS 0xB0200034
  969. # define USBDEV_CS_SU (1 << 14)
  970. # define USBDEV_CS_NAK (1 << 13)
  971. # define USBDEV_CS_ACK (1 << 12)
  972. # define USBDEV_CS_BUSY (1 << 11)
  973. # define USBDEV_CS_TSIZE_BIT 1
  974. # define USBDEV_CS_TSIZE_MASK (0x3ff << USBDEV_CS_TSIZE_BIT)
  975. # define USBDEV_CS_STALL (1 << 0)
  976. #define USBD_EP0RDSTAT 0xB0200040
  977. #define USBD_EP0WRSTAT 0xB0200044
  978. #define USBD_EP2WRSTAT 0xB0200048
  979. #define USBD_EP3WRSTAT 0xB020004C
  980. #define USBD_EP4RDSTAT 0xB0200050
  981. #define USBD_EP5RDSTAT 0xB0200054
  982. # define USBDEV_FSTAT_FLUSH (1 << 6)
  983. # define USBDEV_FSTAT_UF (1 << 5)
  984. # define USBDEV_FSTAT_OF (1 << 4)
  985. # define USBDEV_FSTAT_FCNT_BIT 0
  986. # define USBDEV_FSTAT_FCNT_MASK (0x0f << USBDEV_FSTAT_FCNT_BIT)
  987. #define USBD_ENABLE 0xB0200058
  988. # define USBDEV_ENABLE (1 << 1)
  989. # define USBDEV_CE (1 << 0)
  990. #endif /* !CONFIG_SOC_AU1200 */
  991. /* Ethernet Controllers */
  992. /* 4 byte offsets from AU1000_ETH_BASE */
  993. #define MAC_CONTROL 0x0
  994. # define MAC_RX_ENABLE (1 << 2)
  995. # define MAC_TX_ENABLE (1 << 3)
  996. # define MAC_DEF_CHECK (1 << 5)
  997. # define MAC_SET_BL(X) (((X) & 0x3) << 6)
  998. # define MAC_AUTO_PAD (1 << 8)
  999. # define MAC_DISABLE_RETRY (1 << 10)
  1000. # define MAC_DISABLE_BCAST (1 << 11)
  1001. # define MAC_LATE_COL (1 << 12)
  1002. # define MAC_HASH_MODE (1 << 13)
  1003. # define MAC_HASH_ONLY (1 << 15)
  1004. # define MAC_PASS_ALL (1 << 16)
  1005. # define MAC_INVERSE_FILTER (1 << 17)
  1006. # define MAC_PROMISCUOUS (1 << 18)
  1007. # define MAC_PASS_ALL_MULTI (1 << 19)
  1008. # define MAC_FULL_DUPLEX (1 << 20)
  1009. # define MAC_NORMAL_MODE 0
  1010. # define MAC_INT_LOOPBACK (1 << 21)
  1011. # define MAC_EXT_LOOPBACK (1 << 22)
  1012. # define MAC_DISABLE_RX_OWN (1 << 23)
  1013. # define MAC_BIG_ENDIAN (1 << 30)
  1014. # define MAC_RX_ALL (1 << 31)
  1015. #define MAC_ADDRESS_HIGH 0x4
  1016. #define MAC_ADDRESS_LOW 0x8
  1017. #define MAC_MCAST_HIGH 0xC
  1018. #define MAC_MCAST_LOW 0x10
  1019. #define MAC_MII_CNTRL 0x14
  1020. # define MAC_MII_BUSY (1 << 0)
  1021. # define MAC_MII_READ 0
  1022. # define MAC_MII_WRITE (1 << 1)
  1023. # define MAC_SET_MII_SELECT_REG(X) (((X) & 0x1f) << 6)
  1024. # define MAC_SET_MII_SELECT_PHY(X) (((X) & 0x1f) << 11)
  1025. #define MAC_MII_DATA 0x18
  1026. #define MAC_FLOW_CNTRL 0x1C
  1027. # define MAC_FLOW_CNTRL_BUSY (1 << 0)
  1028. # define MAC_FLOW_CNTRL_ENABLE (1 << 1)
  1029. # define MAC_PASS_CONTROL (1 << 2)
  1030. # define MAC_SET_PAUSE(X) (((X) & 0xffff) << 16)
  1031. #define MAC_VLAN1_TAG 0x20
  1032. #define MAC_VLAN2_TAG 0x24
  1033. /* Ethernet Controller Enable */
  1034. # define MAC_EN_CLOCK_ENABLE (1 << 0)
  1035. # define MAC_EN_RESET0 (1 << 1)
  1036. # define MAC_EN_TOSS (0 << 2)
  1037. # define MAC_EN_CACHEABLE (1 << 3)
  1038. # define MAC_EN_RESET1 (1 << 4)
  1039. # define MAC_EN_RESET2 (1 << 5)
  1040. # define MAC_DMA_RESET (1 << 6)
  1041. /* Ethernet Controller DMA Channels */
  1042. #define MAC0_TX_DMA_ADDR 0xB4004000
  1043. #define MAC1_TX_DMA_ADDR 0xB4004200
  1044. /* offsets from MAC_TX_RING_ADDR address */
  1045. #define MAC_TX_BUFF0_STATUS 0x0
  1046. # define TX_FRAME_ABORTED (1 << 0)
  1047. # define TX_JAB_TIMEOUT (1 << 1)
  1048. # define TX_NO_CARRIER (1 << 2)
  1049. # define TX_LOSS_CARRIER (1 << 3)
  1050. # define TX_EXC_DEF (1 << 4)
  1051. # define TX_LATE_COLL_ABORT (1 << 5)
  1052. # define TX_EXC_COLL (1 << 6)
  1053. # define TX_UNDERRUN (1 << 7)
  1054. # define TX_DEFERRED (1 << 8)
  1055. # define TX_LATE_COLL (1 << 9)
  1056. # define TX_COLL_CNT_MASK (0xF << 10)
  1057. # define TX_PKT_RETRY (1 << 31)
  1058. #define MAC_TX_BUFF0_ADDR 0x4
  1059. # define TX_DMA_ENABLE (1 << 0)
  1060. # define TX_T_DONE (1 << 1)
  1061. # define TX_GET_DMA_BUFFER(X) (((X) >> 2) & 0x3)
  1062. #define MAC_TX_BUFF0_LEN 0x8
  1063. #define MAC_TX_BUFF1_STATUS 0x10
  1064. #define MAC_TX_BUFF1_ADDR 0x14
  1065. #define MAC_TX_BUFF1_LEN 0x18
  1066. #define MAC_TX_BUFF2_STATUS 0x20
  1067. #define MAC_TX_BUFF2_ADDR 0x24
  1068. #define MAC_TX_BUFF2_LEN 0x28
  1069. #define MAC_TX_BUFF3_STATUS 0x30
  1070. #define MAC_TX_BUFF3_ADDR 0x34
  1071. #define MAC_TX_BUFF3_LEN 0x38
  1072. #define MAC0_RX_DMA_ADDR 0xB4004100
  1073. #define MAC1_RX_DMA_ADDR 0xB4004300
  1074. /* offsets from MAC_RX_RING_ADDR */
  1075. #define MAC_RX_BUFF0_STATUS 0x0
  1076. # define RX_FRAME_LEN_MASK 0x3fff
  1077. # define RX_WDOG_TIMER (1 << 14)
  1078. # define RX_RUNT (1 << 15)
  1079. # define RX_OVERLEN (1 << 16)
  1080. # define RX_COLL (1 << 17)
  1081. # define RX_ETHER (1 << 18)
  1082. # define RX_MII_ERROR (1 << 19)
  1083. # define RX_DRIBBLING (1 << 20)
  1084. # define RX_CRC_ERROR (1 << 21)
  1085. # define RX_VLAN1 (1 << 22)
  1086. # define RX_VLAN2 (1 << 23)
  1087. # define RX_LEN_ERROR (1 << 24)
  1088. # define RX_CNTRL_FRAME (1 << 25)
  1089. # define RX_U_CNTRL_FRAME (1 << 26)
  1090. # define RX_MCAST_FRAME (1 << 27)
  1091. # define RX_BCAST_FRAME (1 << 28)
  1092. # define RX_FILTER_FAIL (1 << 29)
  1093. # define RX_PACKET_FILTER (1 << 30)
  1094. # define RX_MISSED_FRAME (1 << 31)
  1095. # define RX_ERROR (RX_WDOG_TIMER | RX_RUNT | RX_OVERLEN | \
  1096. RX_COLL | RX_MII_ERROR | RX_CRC_ERROR | \
  1097. RX_LEN_ERROR | RX_U_CNTRL_FRAME | RX_MISSED_FRAME)
  1098. #define MAC_RX_BUFF0_ADDR 0x4
  1099. # define RX_DMA_ENABLE (1 << 0)
  1100. # define RX_T_DONE (1 << 1)
  1101. # define RX_GET_DMA_BUFFER(X) (((X) >> 2) & 0x3)
  1102. # define RX_SET_BUFF_ADDR(X) ((X) & 0xffffffc0)
  1103. #define MAC_RX_BUFF1_STATUS 0x10
  1104. #define MAC_RX_BUFF1_ADDR 0x14
  1105. #define MAC_RX_BUFF2_STATUS 0x20
  1106. #define MAC_RX_BUFF2_ADDR 0x24
  1107. #define MAC_RX_BUFF3_STATUS 0x30
  1108. #define MAC_RX_BUFF3_ADDR 0x34
  1109. /* UARTS 0-3 */
  1110. #define UART_BASE UART0_ADDR
  1111. #ifdef CONFIG_SOC_AU1200
  1112. #define UART_DEBUG_BASE UART1_ADDR
  1113. #else
  1114. #define UART_DEBUG_BASE UART3_ADDR
  1115. #endif
  1116. #define UART_RX 0 /* Receive buffer */
  1117. #define UART_TX 4 /* Transmit buffer */
  1118. #define UART_IER 8 /* Interrupt Enable Register */
  1119. #define UART_IIR 0xC /* Interrupt ID Register */
  1120. #define UART_FCR 0x10 /* FIFO Control Register */
  1121. #define UART_LCR 0x14 /* Line Control Register */
  1122. #define UART_MCR 0x18 /* Modem Control Register */
  1123. #define UART_LSR 0x1C /* Line Status Register */
  1124. #define UART_MSR 0x20 /* Modem Status Register */
  1125. #define UART_CLK 0x28 /* Baud Rate Clock Divider */
  1126. #define UART_MOD_CNTRL 0x100 /* Module Control */
  1127. #define UART_FCR_ENABLE_FIFO 0x01 /* Enable the FIFO */
  1128. #define UART_FCR_CLEAR_RCVR 0x02 /* Clear the RCVR FIFO */
  1129. #define UART_FCR_CLEAR_XMIT 0x04 /* Clear the XMIT FIFO */
  1130. #define UART_FCR_DMA_SELECT 0x08 /* For DMA applications */
  1131. #define UART_FCR_TRIGGER_MASK 0xF0 /* Mask for the FIFO trigger range */
  1132. #define UART_FCR_R_TRIGGER_1 0x00 /* Mask for receive trigger set at 1 */
  1133. #define UART_FCR_R_TRIGGER_4 0x40 /* Mask for receive trigger set at 4 */
  1134. #define UART_FCR_R_TRIGGER_8 0x80 /* Mask for receive trigger set at 8 */
  1135. #define UART_FCR_R_TRIGGER_14 0xA0 /* Mask for receive trigger set at 14 */
  1136. #define UART_FCR_T_TRIGGER_0 0x00 /* Mask for transmit trigger set at 0 */
  1137. #define UART_FCR_T_TRIGGER_4 0x10 /* Mask for transmit trigger set at 4 */
  1138. #define UART_FCR_T_TRIGGER_8 0x20 /* Mask for transmit trigger set at 8 */
  1139. #define UART_FCR_T_TRIGGER_12 0x30 /* Mask for transmit trigger set at 12 */
  1140. /*
  1141. * These are the definitions for the Line Control Register
  1142. */
  1143. #define UART_LCR_SBC 0x40 /* Set break control */
  1144. #define UART_LCR_SPAR 0x20 /* Stick parity (?) */
  1145. #define UART_LCR_EPAR 0x10 /* Even parity select */
  1146. #define UART_LCR_PARITY 0x08 /* Parity Enable */
  1147. #define UART_LCR_STOP 0x04 /* Stop bits: 0=1 stop bit, 1= 2 stop bits */
  1148. #define UART_LCR_WLEN5 0x00 /* Wordlength: 5 bits */
  1149. #define UART_LCR_WLEN6 0x01 /* Wordlength: 6 bits */
  1150. #define UART_LCR_WLEN7 0x02 /* Wordlength: 7 bits */
  1151. #define UART_LCR_WLEN8 0x03 /* Wordlength: 8 bits */
  1152. /*
  1153. * These are the definitions for the Line Status Register
  1154. */
  1155. #define UART_LSR_TEMT 0x40 /* Transmitter empty */
  1156. #define UART_LSR_THRE 0x20 /* Transmit-hold-register empty */
  1157. #define UART_LSR_BI 0x10 /* Break interrupt indicator */
  1158. #define UART_LSR_FE 0x08 /* Frame error indicator */
  1159. #define UART_LSR_PE 0x04 /* Parity error indicator */
  1160. #define UART_LSR_OE 0x02 /* Overrun error indicator */
  1161. #define UART_LSR_DR 0x01 /* Receiver data ready */
  1162. /*
  1163. * These are the definitions for the Interrupt Identification Register
  1164. */
  1165. #define UART_IIR_NO_INT 0x01 /* No interrupts pending */
  1166. #define UART_IIR_ID 0x06 /* Mask for the interrupt ID */
  1167. #define UART_IIR_MSI 0x00 /* Modem status interrupt */
  1168. #define UART_IIR_THRI 0x02 /* Transmitter holding register empty */
  1169. #define UART_IIR_RDI 0x04 /* Receiver data interrupt */
  1170. #define UART_IIR_RLSI 0x06 /* Receiver line status interrupt */
  1171. /*
  1172. * These are the definitions for the Interrupt Enable Register
  1173. */
  1174. #define UART_IER_MSI 0x08 /* Enable Modem status interrupt */
  1175. #define UART_IER_RLSI 0x04 /* Enable receiver line status interrupt */
  1176. #define UART_IER_THRI 0x02 /* Enable Transmitter holding register int. */
  1177. #define UART_IER_RDI 0x01 /* Enable receiver data interrupt */
  1178. /*
  1179. * These are the definitions for the Modem Control Register
  1180. */
  1181. #define UART_MCR_LOOP 0x10 /* Enable loopback test mode */
  1182. #define UART_MCR_OUT2 0x08 /* Out2 complement */
  1183. #define UART_MCR_OUT1 0x04 /* Out1 complement */
  1184. #define UART_MCR_RTS 0x02 /* RTS complement */
  1185. #define UART_MCR_DTR 0x01 /* DTR complement */
  1186. /*
  1187. * These are the definitions for the Modem Status Register
  1188. */
  1189. #define UART_MSR_DCD 0x80 /* Data Carrier Detect */
  1190. #define UART_MSR_RI 0x40 /* Ring Indicator */
  1191. #define UART_MSR_DSR 0x20 /* Data Set Ready */
  1192. #define UART_MSR_CTS 0x10 /* Clear to Send */
  1193. #define UART_MSR_DDCD 0x08 /* Delta DCD */
  1194. #define UART_MSR_TERI 0x04 /* Trailing edge ring indicator */
  1195. #define UART_MSR_DDSR 0x02 /* Delta DSR */
  1196. #define UART_MSR_DCTS 0x01 /* Delta CTS */
  1197. #define UART_MSR_ANY_DELTA 0x0F /* Any of the delta bits! */
  1198. /* SSIO */
  1199. #define SSI0_STATUS 0xB1600000
  1200. # define SSI_STATUS_BF (1 << 4)
  1201. # define SSI_STATUS_OF (1 << 3)
  1202. # define SSI_STATUS_UF (1 << 2)
  1203. # define SSI_STATUS_D (1 << 1)
  1204. # define SSI_STATUS_B (1 << 0)
  1205. #define SSI0_INT 0xB1600004
  1206. # define SSI_INT_OI (1 << 3)
  1207. # define SSI_INT_UI (1 << 2)
  1208. # define SSI_INT_DI (1 << 1)
  1209. #define SSI0_INT_ENABLE 0xB1600008
  1210. # define SSI_INTE_OIE (1 << 3)
  1211. # define SSI_INTE_UIE (1 << 2)
  1212. # define SSI_INTE_DIE (1 << 1)
  1213. #define SSI0_CONFIG 0xB1600020
  1214. # define SSI_CONFIG_AO (1 << 24)
  1215. # define SSI_CONFIG_DO (1 << 23)
  1216. # define SSI_CONFIG_ALEN_BIT 20
  1217. # define SSI_CONFIG_ALEN_MASK (0x7 << 20)
  1218. # define SSI_CONFIG_DLEN_BIT 16
  1219. # define SSI_CONFIG_DLEN_MASK (0x7 << 16)
  1220. # define SSI_CONFIG_DD (1 << 11)
  1221. # define SSI_CONFIG_AD (1 << 10)
  1222. # define SSI_CONFIG_BM_BIT 8
  1223. # define SSI_CONFIG_BM_MASK (0x3 << 8)
  1224. # define SSI_CONFIG_CE (1 << 7)
  1225. # define SSI_CONFIG_DP (1 << 6)
  1226. # define SSI_CONFIG_DL (1 << 5)
  1227. # define SSI_CONFIG_EP (1 << 4)
  1228. #define SSI0_ADATA 0xB1600024
  1229. # define SSI_AD_D (1 << 24)
  1230. # define SSI_AD_ADDR_BIT 16
  1231. # define SSI_AD_ADDR_MASK (0xff << 16)
  1232. # define SSI_AD_DATA_BIT 0
  1233. # define SSI_AD_DATA_MASK (0xfff << 0)
  1234. #define SSI0_CLKDIV 0xB1600028
  1235. #define SSI0_CONTROL 0xB1600100
  1236. # define SSI_CONTROL_CD (1 << 1)
  1237. # define SSI_CONTROL_E (1 << 0)
  1238. /* SSI1 */
  1239. #define SSI1_STATUS 0xB1680000
  1240. #define SSI1_INT 0xB1680004
  1241. #define SSI1_INT_ENABLE 0xB1680008
  1242. #define SSI1_CONFIG 0xB1680020
  1243. #define SSI1_ADATA 0xB1680024
  1244. #define SSI1_CLKDIV 0xB1680028
  1245. #define SSI1_ENABLE 0xB1680100
  1246. /*
  1247. * Register content definitions
  1248. */
  1249. #define SSI_STATUS_BF (1 << 4)
  1250. #define SSI_STATUS_OF (1 << 3)
  1251. #define SSI_STATUS_UF (1 << 2)
  1252. #define SSI_STATUS_D (1 << 1)
  1253. #define SSI_STATUS_B (1 << 0)
  1254. /* SSI_INT */
  1255. #define SSI_INT_OI (1 << 3)
  1256. #define SSI_INT_UI (1 << 2)
  1257. #define SSI_INT_DI (1 << 1)
  1258. /* SSI_INTEN */
  1259. #define SSI_INTEN_OIE (1 << 3)
  1260. #define SSI_INTEN_UIE (1 << 2)
  1261. #define SSI_INTEN_DIE (1 << 1)
  1262. #define SSI_CONFIG_AO (1 << 24)
  1263. #define SSI_CONFIG_DO (1 << 23)
  1264. #define SSI_CONFIG_ALEN (7 << 20)
  1265. #define SSI_CONFIG_DLEN (15 << 16)
  1266. #define SSI_CONFIG_DD (1 << 11)
  1267. #define SSI_CONFIG_AD (1 << 10)
  1268. #define SSI_CONFIG_BM (3 << 8)
  1269. #define SSI_CONFIG_CE (1 << 7)
  1270. #define SSI_CONFIG_DP (1 << 6)
  1271. #define SSI_CONFIG_DL (1 << 5)
  1272. #define SSI_CONFIG_EP (1 << 4)
  1273. #define SSI_CONFIG_ALEN_N(N) ((N-1) << 20)
  1274. #define SSI_CONFIG_DLEN_N(N) ((N-1) << 16)
  1275. #define SSI_CONFIG_BM_HI (0 << 8)
  1276. #define SSI_CONFIG_BM_LO (1 << 8)
  1277. #define SSI_CONFIG_BM_CY (2 << 8)
  1278. #define SSI_ADATA_D (1 << 24)
  1279. #define SSI_ADATA_ADDR (0xFF << 16)
  1280. #define SSI_ADATA_DATA 0x0FFF
  1281. #define SSI_ADATA_ADDR_N(N) (N << 16)
  1282. #define SSI_ENABLE_CD (1 << 1)
  1283. #define SSI_ENABLE_E (1 << 0)
  1284. /* IrDA Controller */
  1285. #define IRDA_BASE 0xB0300000
  1286. #define IR_RING_PTR_STATUS (IRDA_BASE + 0x00)
  1287. #define IR_RING_BASE_ADDR_H (IRDA_BASE + 0x04)
  1288. #define IR_RING_BASE_ADDR_L (IRDA_BASE + 0x08)
  1289. #define IR_RING_SIZE (IRDA_BASE + 0x0C)
  1290. #define IR_RING_PROMPT (IRDA_BASE + 0x10)
  1291. #define IR_RING_ADDR_CMPR (IRDA_BASE + 0x14)
  1292. #define IR_INT_CLEAR (IRDA_BASE + 0x18)
  1293. #define IR_CONFIG_1 (IRDA_BASE + 0x20)
  1294. # define IR_RX_INVERT_LED (1 << 0)
  1295. # define IR_TX_INVERT_LED (1 << 1)
  1296. # define IR_ST (1 << 2)
  1297. # define IR_SF (1 << 3)
  1298. # define IR_SIR (1 << 4)
  1299. # define IR_MIR (1 << 5)
  1300. # define IR_FIR (1 << 6)
  1301. # define IR_16CRC (1 << 7)
  1302. # define IR_TD (1 << 8)
  1303. # define IR_RX_ALL (1 << 9)
  1304. # define IR_DMA_ENABLE (1 << 10)
  1305. # define IR_RX_ENABLE (1 << 11)
  1306. # define IR_TX_ENABLE (1 << 12)
  1307. # define IR_LOOPBACK (1 << 14)
  1308. # define IR_SIR_MODE (IR_SIR | IR_DMA_ENABLE | \
  1309. IR_RX_ALL | IR_RX_ENABLE | IR_SF | IR_16CRC)
  1310. #define IR_SIR_FLAGS (IRDA_BASE + 0x24)
  1311. #define IR_ENABLE (IRDA_BASE + 0x28)
  1312. # define IR_RX_STATUS (1 << 9)
  1313. # define IR_TX_STATUS (1 << 10)
  1314. #define IR_READ_PHY_CONFIG (IRDA_BASE + 0x2C)
  1315. #define IR_WRITE_PHY_CONFIG (IRDA_BASE + 0x30)
  1316. #define IR_MAX_PKT_LEN (IRDA_BASE + 0x34)
  1317. #define IR_RX_BYTE_CNT (IRDA_BASE + 0x38)
  1318. #define IR_CONFIG_2 (IRDA_BASE + 0x3C)
  1319. # define IR_MODE_INV (1 << 0)
  1320. # define IR_ONE_PIN (1 << 1)
  1321. #define IR_INTERFACE_CONFIG (IRDA_BASE + 0x40)
  1322. /* GPIO */
  1323. #define SYS_PINFUNC 0xB190002C
  1324. # define SYS_PF_USB (1 << 15) /* 2nd USB device/host */
  1325. # define SYS_PF_U3 (1 << 14) /* GPIO23/U3TXD */
  1326. # define SYS_PF_U2 (1 << 13) /* GPIO22/U2TXD */
  1327. # define SYS_PF_U1 (1 << 12) /* GPIO21/U1TXD */
  1328. # define SYS_PF_SRC (1 << 11) /* GPIO6/SROMCKE */
  1329. # define SYS_PF_CK5 (1 << 10) /* GPIO3/CLK5 */
  1330. # define SYS_PF_CK4 (1 << 9) /* GPIO2/CLK4 */
  1331. # define SYS_PF_IRF (1 << 8) /* GPIO15/IRFIRSEL */
  1332. # define SYS_PF_UR3 (1 << 7) /* GPIO[14:9]/UART3 */
  1333. # define SYS_PF_I2D (1 << 6) /* GPIO8/I2SDI */
  1334. # define SYS_PF_I2S (1 << 5) /* I2S/GPIO[29:31] */
  1335. # define SYS_PF_NI2 (1 << 4) /* NI2/GPIO[24:28] */
  1336. # define SYS_PF_U0 (1 << 3) /* U0TXD/GPIO20 */
  1337. # define SYS_PF_RD (1 << 2) /* IRTXD/GPIO19 */
  1338. # define SYS_PF_A97 (1 << 1) /* AC97/SSL1 */
  1339. # define SYS_PF_S0 (1 << 0) /* SSI_0/GPIO[16:18] */
  1340. /* Au1100 only */
  1341. # define SYS_PF_PC (1 << 18) /* PCMCIA/GPIO[207:204] */
  1342. # define SYS_PF_LCD (1 << 17) /* extern lcd/GPIO[203:200] */
  1343. # define SYS_PF_CS (1 << 16) /* EXTCLK0/32KHz to gpio2 */
  1344. # define SYS_PF_EX0 (1 << 9) /* GPIO2/clock */
  1345. /* Au1550 only. Redefines lots of pins */
  1346. # define SYS_PF_PSC2_MASK (7 << 17)
  1347. # define SYS_PF_PSC2_AC97 0
  1348. # define SYS_PF_PSC2_SPI 0
  1349. # define SYS_PF_PSC2_I2S (1 << 17)
  1350. # define SYS_PF_PSC2_SMBUS (3 << 17)
  1351. # define SYS_PF_PSC2_GPIO (7 << 17)
  1352. # define SYS_PF_PSC3_MASK (7 << 20)
  1353. # define SYS_PF_PSC3_AC97 0
  1354. # define SYS_PF_PSC3_SPI 0
  1355. # define SYS_PF_PSC3_I2S (1 << 20)
  1356. # define SYS_PF_PSC3_SMBUS (3 << 20)
  1357. # define SYS_PF_PSC3_GPIO (7 << 20)
  1358. # define SYS_PF_PSC1_S1 (1 << 1)
  1359. # define SYS_PF_MUST_BE_SET ((1 << 5) | (1 << 2))
  1360. /* Au1200 only */
  1361. #ifdef CONFIG_SOC_AU1200
  1362. #define SYS_PINFUNC_DMA (1 << 31)
  1363. #define SYS_PINFUNC_S0A (1 << 30)
  1364. #define SYS_PINFUNC_S1A (1 << 29)
  1365. #define SYS_PINFUNC_LP0 (1 << 28)
  1366. #define SYS_PINFUNC_LP1 (1 << 27)
  1367. #define SYS_PINFUNC_LD16 (1 << 26)
  1368. #define SYS_PINFUNC_LD8 (1 << 25)
  1369. #define SYS_PINFUNC_LD1 (1 << 24)
  1370. #define SYS_PINFUNC_LD0 (1 << 23)
  1371. #define SYS_PINFUNC_P1A (3 << 21)
  1372. #define SYS_PINFUNC_P1B (1 << 20)
  1373. #define SYS_PINFUNC_FS3 (1 << 19)
  1374. #define SYS_PINFUNC_P0A (3 << 17)
  1375. #define SYS_PINFUNC_CS (1 << 16)
  1376. #define SYS_PINFUNC_CIM (1 << 15)
  1377. #define SYS_PINFUNC_P1C (1 << 14)
  1378. #define SYS_PINFUNC_U1T (1 << 12)
  1379. #define SYS_PINFUNC_U1R (1 << 11)
  1380. #define SYS_PINFUNC_EX1 (1 << 10)
  1381. #define SYS_PINFUNC_EX0 (1 << 9)
  1382. #define SYS_PINFUNC_U0R (1 << 8)
  1383. #define SYS_PINFUNC_MC (1 << 7)
  1384. #define SYS_PINFUNC_S0B (1 << 6)
  1385. #define SYS_PINFUNC_S0C (1 << 5)
  1386. #define SYS_PINFUNC_P0B (1 << 4)
  1387. #define SYS_PINFUNC_U0T (1 << 3)
  1388. #define SYS_PINFUNC_S1B (1 << 2)
  1389. #endif
  1390. #define SYS_TRIOUTRD 0xB1900100
  1391. #define SYS_TRIOUTCLR 0xB1900100
  1392. #define SYS_OUTPUTRD 0xB1900108
  1393. #define SYS_OUTPUTSET 0xB1900108
  1394. #define SYS_OUTPUTCLR 0xB190010C
  1395. #define SYS_PINSTATERD 0xB1900110
  1396. #define SYS_PININPUTEN 0xB1900110
  1397. /* GPIO2, Au1500, Au1550 only */
  1398. #define GPIO2_BASE 0xB1700000
  1399. #define GPIO2_DIR (GPIO2_BASE + 0)
  1400. #define GPIO2_OUTPUT (GPIO2_BASE + 8)
  1401. #define GPIO2_PINSTATE (GPIO2_BASE + 0xC)
  1402. #define GPIO2_INTENABLE (GPIO2_BASE + 0x10)
  1403. #define GPIO2_ENABLE (GPIO2_BASE + 0x14)
  1404. /* Power Management */
  1405. #define SYS_SCRATCH0 0xB1900018
  1406. #define SYS_SCRATCH1 0xB190001C
  1407. #define SYS_WAKEMSK 0xB1900034
  1408. #define SYS_ENDIAN 0xB1900038
  1409. #define SYS_POWERCTRL 0xB190003C
  1410. #define SYS_WAKESRC 0xB190005C
  1411. #define SYS_SLPPWR 0xB1900078
  1412. #define SYS_SLEEP 0xB190007C
  1413. #define SYS_WAKEMSK_D2 (1 << 9)
  1414. #define SYS_WAKEMSK_M2 (1 << 8)
  1415. #define SYS_WAKEMSK_GPIO(x) (1 << (x))
  1416. /* Clock Controller */
  1417. #define SYS_FREQCTRL0 0xB1900020
  1418. # define SYS_FC_FRDIV2_BIT 22
  1419. # define SYS_FC_FRDIV2_MASK (0xff << SYS_FC_FRDIV2_BIT)
  1420. # define SYS_FC_FE2 (1 << 21)
  1421. # define SYS_FC_FS2 (1 << 20)
  1422. # define SYS_FC_FRDIV1_BIT 12
  1423. # define SYS_FC_FRDIV1_MASK (0xff << SYS_FC_FRDIV1_BIT)
  1424. # define SYS_FC_FE1 (1 << 11)
  1425. # define SYS_FC_FS1 (1 << 10)
  1426. # define SYS_FC_FRDIV0_BIT 2
  1427. # define SYS_FC_FRDIV0_MASK (0xff << SYS_FC_FRDIV0_BIT)
  1428. # define SYS_FC_FE0 (1 << 1)
  1429. # define SYS_FC_FS0 (1 << 0)
  1430. #define SYS_FREQCTRL1 0xB1900024
  1431. # define SYS_FC_FRDIV5_BIT 22
  1432. # define SYS_FC_FRDIV5_MASK (0xff << SYS_FC_FRDIV5_BIT)
  1433. # define SYS_FC_FE5 (1 << 21)
  1434. # define SYS_FC_FS5 (1 << 20)
  1435. # define SYS_FC_FRDIV4_BIT 12
  1436. # define SYS_FC_FRDIV4_MASK (0xff << SYS_FC_FRDIV4_BIT)
  1437. # define SYS_FC_FE4 (1 << 11)
  1438. # define SYS_FC_FS4 (1 << 10)
  1439. # define SYS_FC_FRDIV3_BIT 2
  1440. # define SYS_FC_FRDIV3_MASK (0xff << SYS_FC_FRDIV3_BIT)
  1441. # define SYS_FC_FE3 (1 << 1)
  1442. # define SYS_FC_FS3 (1 << 0)
  1443. #define SYS_CLKSRC 0xB1900028
  1444. # define SYS_CS_ME1_BIT 27
  1445. # define SYS_CS_ME1_MASK (0x7 << SYS_CS_ME1_BIT)
  1446. # define SYS_CS_DE1 (1 << 26)
  1447. # define SYS_CS_CE1 (1 << 25)
  1448. # define SYS_CS_ME0_BIT 22
  1449. # define SYS_CS_ME0_MASK (0x7 << SYS_CS_ME0_BIT)
  1450. # define SYS_CS_DE0 (1 << 21)
  1451. # define SYS_CS_CE0 (1 << 20)
  1452. # define SYS_CS_MI2_BIT 17
  1453. # define SYS_CS_MI2_MASK (0x7 << SYS_CS_MI2_BIT)
  1454. # define SYS_CS_DI2 (1 << 16)
  1455. # define SYS_CS_CI2 (1 << 15)
  1456. #ifdef CONFIG_SOC_AU1100
  1457. # define SYS_CS_ML_BIT 7
  1458. # define SYS_CS_ML_MASK (0x7 << SYS_CS_ML_BIT)
  1459. # define SYS_CS_DL (1 << 6)
  1460. # define SYS_CS_CL (1 << 5)
  1461. #else
  1462. # define SYS_CS_MUH_BIT 12
  1463. # define SYS_CS_MUH_MASK (0x7 << SYS_CS_MUH_BIT)
  1464. # define SYS_CS_DUH (1 << 11)
  1465. # define SYS_CS_CUH (1 << 10)
  1466. # define SYS_CS_MUD_BIT 7
  1467. # define SYS_CS_MUD_MASK (0x7 << SYS_CS_MUD_BIT)
  1468. # define SYS_CS_DUD (1 << 6)
  1469. # define SYS_CS_CUD (1 << 5)
  1470. #endif
  1471. # define SYS_CS_MIR_BIT 2
  1472. # define SYS_CS_MIR_MASK (0x7 << SYS_CS_MIR_BIT)
  1473. # define SYS_CS_DIR (1 << 1)
  1474. # define SYS_CS_CIR (1 << 0)
  1475. # define SYS_CS_MUX_AUX 0x1
  1476. # define SYS_CS_MUX_FQ0 0x2
  1477. # define SYS_CS_MUX_FQ1 0x3
  1478. # define SYS_CS_MUX_FQ2 0x4
  1479. # define SYS_CS_MUX_FQ3 0x5
  1480. # define SYS_CS_MUX_FQ4 0x6
  1481. # define SYS_CS_MUX_FQ5 0x7
  1482. #define SYS_CPUPLL 0xB1900060
  1483. #define SYS_AUXPLL 0xB1900064
  1484. /* AC97 Controller */
  1485. #define AC97C_CONFIG 0xB0000000
  1486. # define AC97C_RECV_SLOTS_BIT 13
  1487. # define AC97C_RECV_SLOTS_MASK (0x3ff << AC97C_RECV_SLOTS_BIT)
  1488. # define AC97C_XMIT_SLOTS_BIT 3
  1489. # define AC97C_XMIT_SLOTS_MASK (0x3ff << AC97C_XMIT_SLOTS_BIT)
  1490. # define AC97C_SG (1 << 2)
  1491. # define AC97C_SYNC (1 << 1)
  1492. # define AC97C_RESET (1 << 0)
  1493. #define AC97C_STATUS 0xB0000004
  1494. # define AC97C_XU (1 << 11)
  1495. # define AC97C_XO (1 << 10)
  1496. # define AC97C_RU (1 << 9)
  1497. # define AC97C_RO (1 << 8)
  1498. # define AC97C_READY (1 << 7)
  1499. # define AC97C_CP (1 << 6)
  1500. # define AC97C_TR (1 << 5)
  1501. # define AC97C_TE (1 << 4)
  1502. # define AC97C_TF (1 << 3)
  1503. # define AC97C_RR (1 << 2)
  1504. # define AC97C_RE (1 << 1)
  1505. # define AC97C_RF (1 << 0)
  1506. #define AC97C_DATA 0xB0000008
  1507. #define AC97C_CMD 0xB000000C
  1508. # define AC97C_WD_BIT 16
  1509. # define AC97C_READ (1 << 7)
  1510. # define AC97C_INDEX_MASK 0x7f
  1511. #define AC97C_CNTRL 0xB0000010
  1512. # define AC97C_RS (1 << 1)
  1513. # define AC97C_CE (1 << 0)
  1514. /* Secure Digital (SD) Controller */
  1515. #define SD0_XMIT_FIFO 0xB0600000
  1516. #define SD0_RECV_FIFO 0xB0600004
  1517. #define SD1_XMIT_FIFO 0xB0680000
  1518. #define SD1_RECV_FIFO 0xB0680004
  1519. #if defined(CONFIG_SOC_AU1500) || defined(CONFIG_SOC_AU1550)
  1520. /* Au1500 PCI Controller */
  1521. #define Au1500_CFG_BASE 0xB4005000 /* virtual, KSEG1 addr */
  1522. #define Au1500_PCI_CMEM (Au1500_CFG_BASE + 0)
  1523. #define Au1500_PCI_CFG (Au1500_CFG_BASE + 4)
  1524. # define PCI_ERROR ((1 << 22) | (1 << 23) | (1 << 24) | \
  1525. (1 << 25) | (1 << 26) | (1 << 27))
  1526. #define Au1500_PCI_B2BMASK_CCH (Au1500_CFG_BASE + 8)
  1527. #define Au1500_PCI_B2B0_VID (Au1500_CFG_BASE + 0xC)
  1528. #define Au1500_PCI_B2B1_ID (Au1500_CFG_BASE + 0x10)
  1529. #define Au1500_PCI_MWMASK_DEV (Au1500_CFG_BASE + 0x14)
  1530. #define Au1500_PCI_MWBASE_REV_CCL (Au1500_CFG_BASE + 0x18)
  1531. #define Au1500_PCI_ERR_ADDR (Au1500_CFG_BASE + 0x1C)
  1532. #define Au1500_PCI_SPEC_INTACK (Au1500_CFG_BASE + 0x20)
  1533. #define Au1500_PCI_ID (Au1500_CFG_BASE + 0x100)
  1534. #define Au1500_PCI_STATCMD (Au1500_CFG_BASE + 0x104)
  1535. #define Au1500_PCI_CLASSREV (Au1500_CFG_BASE + 0x108)
  1536. #define Au1500_PCI_HDRTYPE (Au1500_CFG_BASE + 0x10C)
  1537. #define Au1500_PCI_MBAR (Au1500_CFG_BASE + 0x110)
  1538. #define Au1500_PCI_HDR 0xB4005100 /* virtual, KSEG1 addr */
  1539. /*
  1540. * All of our structures, like PCI resource, have 32-bit members.
  1541. * Drivers are expected to do an ioremap on the PCI MEM resource, but it's
  1542. * hard to store 0x4 0000 0000 in a 32-bit type. We require a small patch
  1543. * to __ioremap to check for addresses between (u32)Au1500_PCI_MEM_START and
  1544. * (u32)Au1500_PCI_MEM_END and change those to the full 36-bit PCI MEM
  1545. * addresses. For PCI I/O, it's simpler because we get to do the ioremap
  1546. * ourselves and then adjust the device's resources.
  1547. */
  1548. #define Au1500_EXT_CFG 0x600000000ULL
  1549. #define Au1500_EXT_CFG_TYPE1 0x680000000ULL
  1550. #define Au1500_PCI_IO_START 0x500000000ULL
  1551. #define Au1500_PCI_IO_END 0x5000FFFFFULL
  1552. #define Au1500_PCI_MEM_START 0x440000000ULL
  1553. #define Au1500_PCI_MEM_END 0x44FFFFFFFULL
  1554. #define PCI_IO_START 0x00001000
  1555. #define PCI_IO_END 0x000FFFFF
  1556. #define PCI_MEM_START 0x40000000
  1557. #define PCI_MEM_END 0x4FFFFFFF
  1558. #define PCI_FIRST_DEVFN (0 << 3)
  1559. #define PCI_LAST_DEVFN (19 << 3)
  1560. #define IOPORT_RESOURCE_START 0x00001000 /* skip legacy probing */
  1561. #define IOPORT_RESOURCE_END 0xffffffff
  1562. #define IOMEM_RESOURCE_START 0x10000000
  1563. #define IOMEM_RESOURCE_END 0xffffffff
  1564. #else /* Au1000 and Au1100 and Au1200 */
  1565. /* Don't allow any legacy ports probing */
  1566. #define IOPORT_RESOURCE_START 0x10000000
  1567. #define IOPORT_RESOURCE_END 0xffffffff
  1568. #define IOMEM_RESOURCE_START 0x10000000
  1569. #define IOMEM_RESOURCE_END 0xffffffff
  1570. #define PCI_IO_START 0
  1571. #define PCI_IO_END 0
  1572. #define PCI_MEM_START 0
  1573. #define PCI_MEM_END 0
  1574. #define PCI_FIRST_DEVFN 0
  1575. #define PCI_LAST_DEVFN 0
  1576. #endif
  1577. #ifndef _LANGUAGE_ASSEMBLY
  1578. typedef volatile struct {
  1579. /* 0x0000 */ u32 toytrim;
  1580. /* 0x0004 */ u32 toywrite;
  1581. /* 0x0008 */ u32 toymatch0;
  1582. /* 0x000C */ u32 toymatch1;
  1583. /* 0x0010 */ u32 toymatch2;
  1584. /* 0x0014 */ u32 cntrctrl;
  1585. /* 0x0018 */ u32 scratch0;
  1586. /* 0x001C */ u32 scratch1;
  1587. /* 0x0020 */ u32 freqctrl0;
  1588. /* 0x0024 */ u32 freqctrl1;
  1589. /* 0x0028 */ u32 clksrc;
  1590. /* 0x002C */ u32 pinfunc;
  1591. /* 0x0030 */ u32 reserved0;
  1592. /* 0x0034 */ u32 wakemsk;
  1593. /* 0x0038 */ u32 endian;
  1594. /* 0x003C */ u32 powerctrl;
  1595. /* 0x0040 */ u32 toyread;
  1596. /* 0x0044 */ u32 rtctrim;
  1597. /* 0x0048 */ u32 rtcwrite;
  1598. /* 0x004C */ u32 rtcmatch0;
  1599. /* 0x0050 */ u32 rtcmatch1;
  1600. /* 0x0054 */ u32 rtcmatch2;
  1601. /* 0x0058 */ u32 rtcread;
  1602. /* 0x005C */ u32 wakesrc;
  1603. /* 0x0060 */ u32 cpupll;
  1604. /* 0x0064 */ u32 auxpll;
  1605. /* 0x0068 */ u32 reserved1;
  1606. /* 0x006C */ u32 reserved2;
  1607. /* 0x0070 */ u32 reserved3;
  1608. /* 0x0074 */ u32 reserved4;
  1609. /* 0x0078 */ u32 slppwr;
  1610. /* 0x007C */ u32 sleep;
  1611. /* 0x0080 */ u32 reserved5[32];
  1612. /* 0x0100 */ u32 trioutrd;
  1613. #define trioutclr trioutrd
  1614. /* 0x0104 */ u32 reserved6;
  1615. /* 0x0108 */ u32 outputrd;
  1616. #define outputset outputrd
  1617. /* 0x010C */ u32 outputclr;
  1618. /* 0x0110 */ u32 pinstaterd;
  1619. #define pininputen pinstaterd
  1620. } AU1X00_SYS;
  1621. static AU1X00_SYS * const sys = (AU1X00_SYS *)SYS_BASE;
  1622. #endif
  1623. #endif