au1000.h 51 KB

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