au1000.h 62 KB

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