au1000.h 62 KB

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