au1000.h 62 KB

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