au1000.h 52 KB

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