m5445x.h 62 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541
  1. /*
  2. * MCF5445x Internal Memory Map
  3. *
  4. * Copyright (C) 2004-2007 Freescale Semiconductor, Inc.
  5. * TsiChung Liew (Tsi-Chung.Liew@freescale.com)
  6. *
  7. * See file CREDITS for list of people who contributed to this
  8. * project.
  9. *
  10. * This program is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU General Public License as
  12. * published by the Free Software Foundation; either version 2 of
  13. * the License, or (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public License
  21. * along with this program; if not, write to the Free Software
  22. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  23. * MA 02111-1307 USA
  24. */
  25. #ifndef __MCF5445X__
  26. #define __MCF5445X__
  27. /*********************************************************************
  28. * Cross-bar switch (XBS)
  29. *********************************************************************/
  30. /* Bit definitions and macros for PRS group */
  31. #define XBS_PRS_M0(x) (((x)&0x00000007)) /* Core */
  32. #define XBS_PRS_M1(x) (((x)&0x00000007)<<4) /* eDMA */
  33. #define XBS_PRS_M2(x) (((x)&0x00000007)<<8) /* FEC0 */
  34. #define XBS_PRS_M3(x) (((x)&0x00000007)<<12) /* FEC1 */
  35. #define XBS_PRS_M5(x) (((x)&0x00000007)<<20) /* PCI controller */
  36. #define XBS_PRS_M6(x) (((x)&0x00000007)<<24) /* USB OTG */
  37. #define XBS_PRS_M7(x) (((x)&0x00000007)<<28) /* Serial Boot */
  38. /* Bit definitions and macros for CRS group */
  39. #define XBS_CRS_PARK(x) (((x)&0x00000007)) /* Master parking ctrl */
  40. #define XBS_CRS_PCTL(x) (((x)&0x00000003)<<4) /* Parking mode ctrl */
  41. #define XBS_CRS_ARB (0x00000100) /* Arbitration Mode */
  42. #define XBS_CRS_RO (0x80000000) /* Read Only */
  43. #define XBS_CRS_PCTL_PARK_FIELD (0)
  44. #define XBS_CRS_PCTL_PARK_ON_LAST (1)
  45. #define XBS_CRS_PCTL_PARK_NONE (2)
  46. #define XBS_CRS_PCTL_PARK_CORE (0)
  47. #define XBS_CRS_PCTL_PARK_EDMA (1)
  48. #define XBS_CRS_PCTL_PARK_FEC0 (2)
  49. #define XBS_CRS_PCTL_PARK_FEC1 (3)
  50. #define XBS_CRS_PCTL_PARK_PCI (5)
  51. #define XBS_CRS_PCTL_PARK_USB (6)
  52. #define XBS_CRS_PCTL_PARK_SBF (7)
  53. /*********************************************************************
  54. * FlexBus Chip Selects (FBCS)
  55. *********************************************************************/
  56. /* Bit definitions and macros for CSAR group */
  57. #define FBCS_CSAR_BA(x) ((x)&0xFFFF0000)
  58. /* Bit definitions and macros for CSMR group */
  59. #define FBCS_CSMR_V (0x00000001) /* Valid bit */
  60. #define FBCS_CSMR_WP (0x00000100) /* Write protect */
  61. #define FBCS_CSMR_BAM(x) (((x)&0x0000FFFF)<<16) /* Base address mask */
  62. #define FBCS_CSMR_BAM_4G (0xFFFF0000)
  63. #define FBCS_CSMR_BAM_2G (0x7FFF0000)
  64. #define FBCS_CSMR_BAM_1G (0x3FFF0000)
  65. #define FBCS_CSMR_BAM_1024M (0x3FFF0000)
  66. #define FBCS_CSMR_BAM_512M (0x1FFF0000)
  67. #define FBCS_CSMR_BAM_256M (0x0FFF0000)
  68. #define FBCS_CSMR_BAM_128M (0x07FF0000)
  69. #define FBCS_CSMR_BAM_64M (0x03FF0000)
  70. #define FBCS_CSMR_BAM_32M (0x01FF0000)
  71. #define FBCS_CSMR_BAM_16M (0x00FF0000)
  72. #define FBCS_CSMR_BAM_8M (0x007F0000)
  73. #define FBCS_CSMR_BAM_4M (0x003F0000)
  74. #define FBCS_CSMR_BAM_2M (0x001F0000)
  75. #define FBCS_CSMR_BAM_1M (0x000F0000)
  76. #define FBCS_CSMR_BAM_1024K (0x000F0000)
  77. #define FBCS_CSMR_BAM_512K (0x00070000)
  78. #define FBCS_CSMR_BAM_256K (0x00030000)
  79. #define FBCS_CSMR_BAM_128K (0x00010000)
  80. #define FBCS_CSMR_BAM_64K (0x00000000)
  81. /* Bit definitions and macros for CSCR group */
  82. #define FBCS_CSCR_BSTW (0x00000008) /* Burst-write enable */
  83. #define FBCS_CSCR_BSTR (0x00000010) /* Burst-read enable */
  84. #define FBCS_CSCR_BEM (0x00000020) /* Byte-enable mode */
  85. #define FBCS_CSCR_PS(x) (((x)&0x00000003)<<6) /* Port size */
  86. #define FBCS_CSCR_AA (0x00000100) /* Auto-acknowledge */
  87. #define FBCS_CSCR_WS(x) (((x)&0x0000003F)<<10) /* Wait states */
  88. #define FBCS_CSCR_WRAH(x) (((x)&0x00000003)<<16) /* Write address hold or deselect */
  89. #define FBCS_CSCR_RDAH(x) (((x)&0x00000003)<<18) /* Read address hold or deselect */
  90. #define FBCS_CSCR_ASET(x) (((x)&0x00000003)<<20) /* Address setup */
  91. #define FBCS_CSCR_SWSEN (0x00800000) /* Secondary wait state enable */
  92. #define FBCS_CSCR_SWS(x) (((x)&0x0000003F)<<26) /* Secondary wait states */
  93. #define FBCS_CSCR_PS_8 (0x00000040)
  94. #define FBCS_CSCR_PS_16 (0x00000080)
  95. #define FBCS_CSCR_PS_32 (0x00000000)
  96. /*********************************************************************
  97. * Interrupt Controller (INTC)
  98. *********************************************************************/
  99. #define INT0_LO_RSVD0 (0)
  100. #define INT0_LO_EPORT1 (1)
  101. #define INT0_LO_EPORT2 (2)
  102. #define INT0_LO_EPORT3 (3)
  103. #define INT0_LO_EPORT4 (4)
  104. #define INT0_LO_EPORT5 (5)
  105. #define INT0_LO_EPORT6 (6)
  106. #define INT0_LO_EPORT7 (7)
  107. #define INT0_LO_EDMA_00 (8)
  108. #define INT0_LO_EDMA_01 (9)
  109. #define INT0_LO_EDMA_02 (10)
  110. #define INT0_LO_EDMA_03 (11)
  111. #define INT0_LO_EDMA_04 (12)
  112. #define INT0_LO_EDMA_05 (13)
  113. #define INT0_LO_EDMA_06 (14)
  114. #define INT0_LO_EDMA_07 (15)
  115. #define INT0_LO_EDMA_08 (16)
  116. #define INT0_LO_EDMA_09 (17)
  117. #define INT0_LO_EDMA_10 (18)
  118. #define INT0_LO_EDMA_11 (19)
  119. #define INT0_LO_EDMA_12 (20)
  120. #define INT0_LO_EDMA_13 (21)
  121. #define INT0_LO_EDMA_14 (22)
  122. #define INT0_LO_EDMA_15 (23)
  123. #define INT0_LO_EDMA_ERR (24)
  124. #define INT0_LO_SCM (25)
  125. #define INT0_LO_UART0 (26)
  126. #define INT0_LO_UART1 (27)
  127. #define INT0_LO_UART2 (28)
  128. #define INT0_LO_RSVD1 (29)
  129. #define INT0_LO_I2C (30)
  130. #define INT0_LO_QSPI (31)
  131. #define INT0_HI_DTMR0 (32)
  132. #define INT0_HI_DTMR1 (33)
  133. #define INT0_HI_DTMR2 (34)
  134. #define INT0_HI_DTMR3 (35)
  135. #define INT0_HI_FEC0_TXF (36)
  136. #define INT0_HI_FEC0_TXB (37)
  137. #define INT0_HI_FEC0_UN (38)
  138. #define INT0_HI_FEC0_RL (39)
  139. #define INT0_HI_FEC0_RXF (40)
  140. #define INT0_HI_FEC0_RXB (41)
  141. #define INT0_HI_FEC0_MII (42)
  142. #define INT0_HI_FEC0_LC (43)
  143. #define INT0_HI_FEC0_HBERR (44)
  144. #define INT0_HI_FEC0_GRA (45)
  145. #define INT0_HI_FEC0_EBERR (46)
  146. #define INT0_HI_FEC0_BABT (47)
  147. #define INT0_HI_FEC0_BABR (48)
  148. #define INT0_HI_FEC1_TXF (49)
  149. #define INT0_HI_FEC1_TXB (50)
  150. #define INT0_HI_FEC1_UN (51)
  151. #define INT0_HI_FEC1_RL (52)
  152. #define INT0_HI_FEC1_RXF (53)
  153. #define INT0_HI_FEC1_RXB (54)
  154. #define INT0_HI_FEC1_MII (55)
  155. #define INT0_HI_FEC1_LC (56)
  156. #define INT0_HI_FEC1_HBERR (57)
  157. #define INT0_HI_FEC1_GRA (58)
  158. #define INT0_HI_FEC1_EBERR (59)
  159. #define INT0_HI_FEC1_BABT (60)
  160. #define INT0_HI_FEC1_BABR (61)
  161. #define INT0_HI_SCMIR (62)
  162. #define INT0_HI_RTC_ISR (63)
  163. #define INT1_HI_DSPI_EOQF (33)
  164. #define INT1_HI_DSPI_TFFF (34)
  165. #define INT1_HI_DSPI_TCF (35)
  166. #define INT1_HI_DSPI_TFUF (36)
  167. #define INT1_HI_DSPI_RFDF (37)
  168. #define INT1_HI_DSPI_RFOF (38)
  169. #define INT1_HI_DSPI_RFOF_TFUF (39)
  170. #define INT1_HI_RNG_EI (40)
  171. #define INT1_HI_PIT0_PIF (43)
  172. #define INT1_HI_PIT1_PIF (44)
  173. #define INT1_HI_PIT2_PIF (45)
  174. #define INT1_HI_PIT3_PIF (46)
  175. #define INT1_HI_USBOTG_USBSTS (47)
  176. #define INT1_HI_SSI_ISR (49)
  177. #define INT1_HI_CCM_UOCSR (53)
  178. #define INT1_HI_ATA_ISR (54)
  179. #define INT1_HI_PCI_SCR (55)
  180. #define INT1_HI_PCI_ASR (56)
  181. #define INT1_HI_PLL_LOCKS (57)
  182. /* Bit definitions and macros for IPRH */
  183. #define INTC_IPRH_INT32 (0x00000001)
  184. #define INTC_IPRH_INT33 (0x00000002)
  185. #define INTC_IPRH_INT34 (0x00000004)
  186. #define INTC_IPRH_INT35 (0x00000008)
  187. #define INTC_IPRH_INT36 (0x00000010)
  188. #define INTC_IPRH_INT37 (0x00000020)
  189. #define INTC_IPRH_INT38 (0x00000040)
  190. #define INTC_IPRH_INT39 (0x00000080)
  191. #define INTC_IPRH_INT40 (0x00000100)
  192. #define INTC_IPRH_INT41 (0x00000200)
  193. #define INTC_IPRH_INT42 (0x00000400)
  194. #define INTC_IPRH_INT43 (0x00000800)
  195. #define INTC_IPRH_INT44 (0x00001000)
  196. #define INTC_IPRH_INT45 (0x00002000)
  197. #define INTC_IPRH_INT46 (0x00004000)
  198. #define INTC_IPRH_INT47 (0x00008000)
  199. #define INTC_IPRH_INT48 (0x00010000)
  200. #define INTC_IPRH_INT49 (0x00020000)
  201. #define INTC_IPRH_INT50 (0x00040000)
  202. #define INTC_IPRH_INT51 (0x00080000)
  203. #define INTC_IPRH_INT52 (0x00100000)
  204. #define INTC_IPRH_INT53 (0x00200000)
  205. #define INTC_IPRH_INT54 (0x00400000)
  206. #define INTC_IPRH_INT55 (0x00800000)
  207. #define INTC_IPRH_INT56 (0x01000000)
  208. #define INTC_IPRH_INT57 (0x02000000)
  209. #define INTC_IPRH_INT58 (0x04000000)
  210. #define INTC_IPRH_INT59 (0x08000000)
  211. #define INTC_IPRH_INT60 (0x10000000)
  212. #define INTC_IPRH_INT61 (0x20000000)
  213. #define INTC_IPRH_INT62 (0x40000000)
  214. #define INTC_IPRH_INT63 (0x80000000)
  215. /* Bit definitions and macros for IPRL */
  216. #define INTC_IPRL_INT0 (0x00000001)
  217. #define INTC_IPRL_INT1 (0x00000002)
  218. #define INTC_IPRL_INT2 (0x00000004)
  219. #define INTC_IPRL_INT3 (0x00000008)
  220. #define INTC_IPRL_INT4 (0x00000010)
  221. #define INTC_IPRL_INT5 (0x00000020)
  222. #define INTC_IPRL_INT6 (0x00000040)
  223. #define INTC_IPRL_INT7 (0x00000080)
  224. #define INTC_IPRL_INT8 (0x00000100)
  225. #define INTC_IPRL_INT9 (0x00000200)
  226. #define INTC_IPRL_INT10 (0x00000400)
  227. #define INTC_IPRL_INT11 (0x00000800)
  228. #define INTC_IPRL_INT12 (0x00001000)
  229. #define INTC_IPRL_INT13 (0x00002000)
  230. #define INTC_IPRL_INT14 (0x00004000)
  231. #define INTC_IPRL_INT15 (0x00008000)
  232. #define INTC_IPRL_INT16 (0x00010000)
  233. #define INTC_IPRL_INT17 (0x00020000)
  234. #define INTC_IPRL_INT18 (0x00040000)
  235. #define INTC_IPRL_INT19 (0x00080000)
  236. #define INTC_IPRL_INT20 (0x00100000)
  237. #define INTC_IPRL_INT21 (0x00200000)
  238. #define INTC_IPRL_INT22 (0x00400000)
  239. #define INTC_IPRL_INT23 (0x00800000)
  240. #define INTC_IPRL_INT24 (0x01000000)
  241. #define INTC_IPRL_INT25 (0x02000000)
  242. #define INTC_IPRL_INT26 (0x04000000)
  243. #define INTC_IPRL_INT27 (0x08000000)
  244. #define INTC_IPRL_INT28 (0x10000000)
  245. #define INTC_IPRL_INT29 (0x20000000)
  246. #define INTC_IPRL_INT30 (0x40000000)
  247. #define INTC_IPRL_INT31 (0x80000000)
  248. /* Bit definitions and macros for IMRH */
  249. #define INTC_IMRH_INT_MASK32 (0x00000001)
  250. #define INTC_IMRH_INT_MASK33 (0x00000002)
  251. #define INTC_IMRH_INT_MASK34 (0x00000004)
  252. #define INTC_IMRH_INT_MASK35 (0x00000008)
  253. #define INTC_IMRH_INT_MASK36 (0x00000010)
  254. #define INTC_IMRH_INT_MASK37 (0x00000020)
  255. #define INTC_IMRH_INT_MASK38 (0x00000040)
  256. #define INTC_IMRH_INT_MASK39 (0x00000080)
  257. #define INTC_IMRH_INT_MASK40 (0x00000100)
  258. #define INTC_IMRH_INT_MASK41 (0x00000200)
  259. #define INTC_IMRH_INT_MASK42 (0x00000400)
  260. #define INTC_IMRH_INT_MASK43 (0x00000800)
  261. #define INTC_IMRH_INT_MASK44 (0x00001000)
  262. #define INTC_IMRH_INT_MASK45 (0x00002000)
  263. #define INTC_IMRH_INT_MASK46 (0x00004000)
  264. #define INTC_IMRH_INT_MASK47 (0x00008000)
  265. #define INTC_IMRH_INT_MASK48 (0x00010000)
  266. #define INTC_IMRH_INT_MASK49 (0x00020000)
  267. #define INTC_IMRH_INT_MASK50 (0x00040000)
  268. #define INTC_IMRH_INT_MASK51 (0x00080000)
  269. #define INTC_IMRH_INT_MASK52 (0x00100000)
  270. #define INTC_IMRH_INT_MASK53 (0x00200000)
  271. #define INTC_IMRH_INT_MASK54 (0x00400000)
  272. #define INTC_IMRH_INT_MASK55 (0x00800000)
  273. #define INTC_IMRH_INT_MASK56 (0x01000000)
  274. #define INTC_IMRH_INT_MASK57 (0x02000000)
  275. #define INTC_IMRH_INT_MASK58 (0x04000000)
  276. #define INTC_IMRH_INT_MASK59 (0x08000000)
  277. #define INTC_IMRH_INT_MASK60 (0x10000000)
  278. #define INTC_IMRH_INT_MASK61 (0x20000000)
  279. #define INTC_IMRH_INT_MASK62 (0x40000000)
  280. #define INTC_IMRH_INT_MASK63 (0x80000000)
  281. /* Bit definitions and macros for IMRL */
  282. #define INTC_IMRL_INT_MASK0 (0x00000001)
  283. #define INTC_IMRL_INT_MASK1 (0x00000002)
  284. #define INTC_IMRL_INT_MASK2 (0x00000004)
  285. #define INTC_IMRL_INT_MASK3 (0x00000008)
  286. #define INTC_IMRL_INT_MASK4 (0x00000010)
  287. #define INTC_IMRL_INT_MASK5 (0x00000020)
  288. #define INTC_IMRL_INT_MASK6 (0x00000040)
  289. #define INTC_IMRL_INT_MASK7 (0x00000080)
  290. #define INTC_IMRL_INT_MASK8 (0x00000100)
  291. #define INTC_IMRL_INT_MASK9 (0x00000200)
  292. #define INTC_IMRL_INT_MASK10 (0x00000400)
  293. #define INTC_IMRL_INT_MASK11 (0x00000800)
  294. #define INTC_IMRL_INT_MASK12 (0x00001000)
  295. #define INTC_IMRL_INT_MASK13 (0x00002000)
  296. #define INTC_IMRL_INT_MASK14 (0x00004000)
  297. #define INTC_IMRL_INT_MASK15 (0x00008000)
  298. #define INTC_IMRL_INT_MASK16 (0x00010000)
  299. #define INTC_IMRL_INT_MASK17 (0x00020000)
  300. #define INTC_IMRL_INT_MASK18 (0x00040000)
  301. #define INTC_IMRL_INT_MASK19 (0x00080000)
  302. #define INTC_IMRL_INT_MASK20 (0x00100000)
  303. #define INTC_IMRL_INT_MASK21 (0x00200000)
  304. #define INTC_IMRL_INT_MASK22 (0x00400000)
  305. #define INTC_IMRL_INT_MASK23 (0x00800000)
  306. #define INTC_IMRL_INT_MASK24 (0x01000000)
  307. #define INTC_IMRL_INT_MASK25 (0x02000000)
  308. #define INTC_IMRL_INT_MASK26 (0x04000000)
  309. #define INTC_IMRL_INT_MASK27 (0x08000000)
  310. #define INTC_IMRL_INT_MASK28 (0x10000000)
  311. #define INTC_IMRL_INT_MASK29 (0x20000000)
  312. #define INTC_IMRL_INT_MASK30 (0x40000000)
  313. #define INTC_IMRL_INT_MASK31 (0x80000000)
  314. /* Bit definitions and macros for INTFRCH */
  315. #define INTC_INTFRCH_INTFRC32 (0x00000001)
  316. #define INTC_INTFRCH_INTFRC33 (0x00000002)
  317. #define INTC_INTFRCH_INTFRC34 (0x00000004)
  318. #define INTC_INTFRCH_INTFRC35 (0x00000008)
  319. #define INTC_INTFRCH_INTFRC36 (0x00000010)
  320. #define INTC_INTFRCH_INTFRC37 (0x00000020)
  321. #define INTC_INTFRCH_INTFRC38 (0x00000040)
  322. #define INTC_INTFRCH_INTFRC39 (0x00000080)
  323. #define INTC_INTFRCH_INTFRC40 (0x00000100)
  324. #define INTC_INTFRCH_INTFRC41 (0x00000200)
  325. #define INTC_INTFRCH_INTFRC42 (0x00000400)
  326. #define INTC_INTFRCH_INTFRC43 (0x00000800)
  327. #define INTC_INTFRCH_INTFRC44 (0x00001000)
  328. #define INTC_INTFRCH_INTFRC45 (0x00002000)
  329. #define INTC_INTFRCH_INTFRC46 (0x00004000)
  330. #define INTC_INTFRCH_INTFRC47 (0x00008000)
  331. #define INTC_INTFRCH_INTFRC48 (0x00010000)
  332. #define INTC_INTFRCH_INTFRC49 (0x00020000)
  333. #define INTC_INTFRCH_INTFRC50 (0x00040000)
  334. #define INTC_INTFRCH_INTFRC51 (0x00080000)
  335. #define INTC_INTFRCH_INTFRC52 (0x00100000)
  336. #define INTC_INTFRCH_INTFRC53 (0x00200000)
  337. #define INTC_INTFRCH_INTFRC54 (0x00400000)
  338. #define INTC_INTFRCH_INTFRC55 (0x00800000)
  339. #define INTC_INTFRCH_INTFRC56 (0x01000000)
  340. #define INTC_INTFRCH_INTFRC57 (0x02000000)
  341. #define INTC_INTFRCH_INTFRC58 (0x04000000)
  342. #define INTC_INTFRCH_INTFRC59 (0x08000000)
  343. #define INTC_INTFRCH_INTFRC60 (0x10000000)
  344. #define INTC_INTFRCH_INTFRC61 (0x20000000)
  345. #define INTC_INTFRCH_INTFRC62 (0x40000000)
  346. #define INTC_INTFRCH_INTFRC63 (0x80000000)
  347. /* Bit definitions and macros for INTFRCL */
  348. #define INTC_INTFRCL_INTFRC0 (0x00000001)
  349. #define INTC_INTFRCL_INTFRC1 (0x00000002)
  350. #define INTC_INTFRCL_INTFRC2 (0x00000004)
  351. #define INTC_INTFRCL_INTFRC3 (0x00000008)
  352. #define INTC_INTFRCL_INTFRC4 (0x00000010)
  353. #define INTC_INTFRCL_INTFRC5 (0x00000020)
  354. #define INTC_INTFRCL_INTFRC6 (0x00000040)
  355. #define INTC_INTFRCL_INTFRC7 (0x00000080)
  356. #define INTC_INTFRCL_INTFRC8 (0x00000100)
  357. #define INTC_INTFRCL_INTFRC9 (0x00000200)
  358. #define INTC_INTFRCL_INTFRC10 (0x00000400)
  359. #define INTC_INTFRCL_INTFRC11 (0x00000800)
  360. #define INTC_INTFRCL_INTFRC12 (0x00001000)
  361. #define INTC_INTFRCL_INTFRC13 (0x00002000)
  362. #define INTC_INTFRCL_INTFRC14 (0x00004000)
  363. #define INTC_INTFRCL_INTFRC15 (0x00008000)
  364. #define INTC_INTFRCL_INTFRC16 (0x00010000)
  365. #define INTC_INTFRCL_INTFRC17 (0x00020000)
  366. #define INTC_INTFRCL_INTFRC18 (0x00040000)
  367. #define INTC_INTFRCL_INTFRC19 (0x00080000)
  368. #define INTC_INTFRCL_INTFRC20 (0x00100000)
  369. #define INTC_INTFRCL_INTFRC21 (0x00200000)
  370. #define INTC_INTFRCL_INTFRC22 (0x00400000)
  371. #define INTC_INTFRCL_INTFRC23 (0x00800000)
  372. #define INTC_INTFRCL_INTFRC24 (0x01000000)
  373. #define INTC_INTFRCL_INTFRC25 (0x02000000)
  374. #define INTC_INTFRCL_INTFRC26 (0x04000000)
  375. #define INTC_INTFRCL_INTFRC27 (0x08000000)
  376. #define INTC_INTFRCL_INTFRC28 (0x10000000)
  377. #define INTC_INTFRCL_INTFRC29 (0x20000000)
  378. #define INTC_INTFRCL_INTFRC30 (0x40000000)
  379. #define INTC_INTFRCL_INTFRC31 (0x80000000)
  380. /* Bit definitions and macros for ICONFIG */
  381. #define INTC_ICONFIG_EMASK (0x0020)
  382. #define INTC_ICONFIG_ELVLPRI1 (0x0200)
  383. #define INTC_ICONFIG_ELVLPRI2 (0x0400)
  384. #define INTC_ICONFIG_ELVLPRI3 (0x0800)
  385. #define INTC_ICONFIG_ELVLPRI4 (0x1000)
  386. #define INTC_ICONFIG_ELVLPRI5 (0x2000)
  387. #define INTC_ICONFIG_ELVLPRI6 (0x4000)
  388. #define INTC_ICONFIG_ELVLPRI7 (0x8000)
  389. /* Bit definitions and macros for SIMR */
  390. #define INTC_SIMR_SIMR(x) (((x)&0x7F))
  391. /* Bit definitions and macros for CIMR */
  392. #define INTC_CIMR_CIMR(x) (((x)&0x7F))
  393. /* Bit definitions and macros for CLMASK */
  394. #define INTC_CLMASK_CLMASK(x) (((x)&0x0F))
  395. /* Bit definitions and macros for SLMASK */
  396. #define INTC_SLMASK_SLMASK(x) (((x)&0x0F))
  397. /* Bit definitions and macros for ICR group */
  398. #define INTC_ICR_IL(x) (((x)&0x07))
  399. /*********************************************************************
  400. * DMA Serial Peripheral Interface (DSPI)
  401. *********************************************************************/
  402. /* Bit definitions and macros for DMCR */
  403. #define DSPI_DMCR_HALT (0x00000001)
  404. #define DSPI_DMCR_SMPL_PT(x) (((x)&0x00000003)<<8)
  405. #define DSPI_DMCR_CRXF (0x00000400)
  406. #define DSPI_DMCR_CTXF (0x00000800)
  407. #define DSPI_DMCR_DRXF (0x00001000)
  408. #define DSPI_DMCR_DTXF (0x00002000)
  409. #define DSPI_DMCR_CSIS0 (0x00010000)
  410. #define DSPI_DMCR_CSIS2 (0x00040000)
  411. #define DSPI_DMCR_CSIS3 (0x00080000)
  412. #define DSPI_DMCR_CSIS5 (0x00200000)
  413. #define DSPI_DMCR_ROOE (0x01000000)
  414. #define DSPI_DMCR_PCSSE (0x02000000)
  415. #define DSPI_DMCR_MTFE (0x04000000)
  416. #define DSPI_DMCR_FRZ (0x08000000)
  417. #define DSPI_DMCR_DCONF(x) (((x)&0x00000003)<<28)
  418. #define DSPI_DMCR_CSCK (0x40000000)
  419. #define DSPI_DMCR_MSTR (0x80000000)
  420. /* Bit definitions and macros for DTCR */
  421. #define DSPI_DTCR_SPI_TCNT(x) (((x)&0x0000FFFF)<<16)
  422. /* Bit definitions and macros for DCTAR group */
  423. #define DSPI_DCTAR_BR(x) (((x)&0x0000000F))
  424. #define DSPI_DCTAR_DT(x) (((x)&0x0000000F)<<4)
  425. #define DSPI_DCTAR_ASC(x) (((x)&0x0000000F)<<8)
  426. #define DSPI_DCTAR_CSSCK(x) (((x)&0x0000000F)<<12)
  427. #define DSPI_DCTAR_PBR(x) (((x)&0x00000003)<<16)
  428. #define DSPI_DCTAR_PDT(x) (((x)&0x00000003)<<18)
  429. #define DSPI_DCTAR_PASC(x) (((x)&0x00000003)<<20)
  430. #define DSPI_DCTAR_PCSSCK(x) (((x)&0x00000003)<<22)
  431. #define DSPI_DCTAR_LSBFE (0x01000000)
  432. #define DSPI_DCTAR_CPHA (0x02000000)
  433. #define DSPI_DCTAR_CPOL (0x04000000)
  434. #define DSPI_DCTAR_TRSZ(x) (((x)&0x0000000F)<<27)
  435. #define DSPI_DCTAR_PCSSCK_1CLK (0x00000000)
  436. #define DSPI_DCTAR_PCSSCK_3CLK (0x00400000)
  437. #define DSPI_DCTAR_PCSSCK_5CLK (0x00800000)
  438. #define DSPI_DCTAR_PCSSCK_7CLK (0x00A00000)
  439. #define DSPI_DCTAR_PASC_1CLK (0x00000000)
  440. #define DSPI_DCTAR_PASC_3CLK (0x00100000)
  441. #define DSPI_DCTAR_PASC_5CLK (0x00200000)
  442. #define DSPI_DCTAR_PASC_7CLK (0x00300000)
  443. #define DSPI_DCTAR_PDT_1CLK (0x00000000)
  444. #define DSPI_DCTAR_PDT_3CLK (0x00040000)
  445. #define DSPI_DCTAR_PDT_5CLK (0x00080000)
  446. #define DSPI_DCTAR_PDT_7CLK (0x000A0000)
  447. #define DSPI_DCTAR_PBR_1CLK (0x00000000)
  448. #define DSPI_DCTAR_PBR_3CLK (0x00010000)
  449. #define DSPI_DCTAR_PBR_5CLK (0x00020000)
  450. #define DSPI_DCTAR_PBR_7CLK (0x00030000)
  451. /* Bit definitions and macros for DSR */
  452. #define DSPI_DSR_RXPTR(x) (((x)&0x0000000F))
  453. #define DSPI_DSR_RXCTR(x) (((x)&0x0000000F)<<4)
  454. #define DSPI_DSR_TXPTR(x) (((x)&0x0000000F)<<8)
  455. #define DSPI_DSR_TXCTR(x) (((x)&0x0000000F)<<12)
  456. #define DSPI_DSR_RFDF (0x00020000)
  457. #define DSPI_DSR_RFOF (0x00080000)
  458. #define DSPI_DSR_TFFF (0x02000000)
  459. #define DSPI_DSR_TFUF (0x08000000)
  460. #define DSPI_DSR_EOQF (0x10000000)
  461. #define DSPI_DSR_TXRXS (0x40000000)
  462. #define DSPI_DSR_TCF (0x80000000)
  463. /* Bit definitions and macros for DIRSR */
  464. #define DSPI_DIRSR_RFDFS (0x00010000)
  465. #define DSPI_DIRSR_RFDFE (0x00020000)
  466. #define DSPI_DIRSR_RFOFE (0x00080000)
  467. #define DSPI_DIRSR_TFFFS (0x01000000)
  468. #define DSPI_DIRSR_TFFFE (0x02000000)
  469. #define DSPI_DIRSR_TFUFE (0x08000000)
  470. #define DSPI_DIRSR_EOQFE (0x10000000)
  471. #define DSPI_DIRSR_TCFE (0x80000000)
  472. /* Bit definitions and macros for DTFR */
  473. #define DSPI_DTFR_TXDATA(x) (((x)&0x0000FFFF))
  474. #define DSPI_DTFR_CS0 (0x00010000)
  475. #define DSPI_DTFR_CS2 (0x00040000)
  476. #define DSPI_DTFR_CS3 (0x00080000)
  477. #define DSPI_DTFR_CS5 (0x00200000)
  478. #define DSPI_DTFR_CTCNT (0x04000000)
  479. #define DSPI_DTFR_EOQ (0x08000000)
  480. #define DSPI_DTFR_CTAS(x) (((x)&0x00000007)<<28)
  481. #define DSPI_DTFR_CONT (0x80000000)
  482. /* Bit definitions and macros for DRFR */
  483. #define DSPI_DRFR_RXDATA(x) (((x)&0x0000FFFF))
  484. /* Bit definitions and macros for DTFDR group */
  485. #define DSPI_DTFDR_TXDATA(x) (((x)&0x0000FFFF))
  486. #define DSPI_DTFDR_TXCMD(x) (((x)&0x0000FFFF)<<16)
  487. /* Bit definitions and macros for DRFDR group */
  488. #define DSPI_DRFDR_RXDATA(x) (((x)&0x0000FFFF))
  489. /*********************************************************************
  490. * Edge Port Module (EPORT)
  491. *********************************************************************/
  492. /* Bit definitions and macros for EPPAR */
  493. #define EPORT_EPPAR_EPPA1(x) (((x)&0x0003)<<2)
  494. #define EPORT_EPPAR_EPPA2(x) (((x)&0x0003)<<4)
  495. #define EPORT_EPPAR_EPPA3(x) (((x)&0x0003)<<6)
  496. #define EPORT_EPPAR_EPPA4(x) (((x)&0x0003)<<8)
  497. #define EPORT_EPPAR_EPPA5(x) (((x)&0x0003)<<10)
  498. #define EPORT_EPPAR_EPPA6(x) (((x)&0x0003)<<12)
  499. #define EPORT_EPPAR_EPPA7(x) (((x)&0x0003)<<14)
  500. #define EPORT_EPPAR_LEVEL (0)
  501. #define EPORT_EPPAR_RISING (1)
  502. #define EPORT_EPPAR_FALLING (2)
  503. #define EPORT_EPPAR_BOTH (3)
  504. #define EPORT_EPPAR_EPPA7_LEVEL (0x0000)
  505. #define EPORT_EPPAR_EPPA7_RISING (0x4000)
  506. #define EPORT_EPPAR_EPPA7_FALLING (0x8000)
  507. #define EPORT_EPPAR_EPPA7_BOTH (0xC000)
  508. #define EPORT_EPPAR_EPPA6_LEVEL (0x0000)
  509. #define EPORT_EPPAR_EPPA6_RISING (0x1000)
  510. #define EPORT_EPPAR_EPPA6_FALLING (0x2000)
  511. #define EPORT_EPPAR_EPPA6_BOTH (0x3000)
  512. #define EPORT_EPPAR_EPPA5_LEVEL (0x0000)
  513. #define EPORT_EPPAR_EPPA5_RISING (0x0400)
  514. #define EPORT_EPPAR_EPPA5_FALLING (0x0800)
  515. #define EPORT_EPPAR_EPPA5_BOTH (0x0C00)
  516. #define EPORT_EPPAR_EPPA4_LEVEL (0x0000)
  517. #define EPORT_EPPAR_EPPA4_RISING (0x0100)
  518. #define EPORT_EPPAR_EPPA4_FALLING (0x0200)
  519. #define EPORT_EPPAR_EPPA4_BOTH (0x0300)
  520. #define EPORT_EPPAR_EPPA3_LEVEL (0x0000)
  521. #define EPORT_EPPAR_EPPA3_RISING (0x0040)
  522. #define EPORT_EPPAR_EPPA3_FALLING (0x0080)
  523. #define EPORT_EPPAR_EPPA3_BOTH (0x00C0)
  524. #define EPORT_EPPAR_EPPA2_LEVEL (0x0000)
  525. #define EPORT_EPPAR_EPPA2_RISING (0x0010)
  526. #define EPORT_EPPAR_EPPA2_FALLING (0x0020)
  527. #define EPORT_EPPAR_EPPA2_BOTH (0x0030)
  528. #define EPORT_EPPAR_EPPA1_LEVEL (0x0000)
  529. #define EPORT_EPPAR_EPPA1_RISING (0x0004)
  530. #define EPORT_EPPAR_EPPA1_FALLING (0x0008)
  531. #define EPORT_EPPAR_EPPA1_BOTH (0x000C)
  532. /* Bit definitions and macros for EPDDR */
  533. #define EPORT_EPDDR_EPDD1 (0x02)
  534. #define EPORT_EPDDR_EPDD2 (0x04)
  535. #define EPORT_EPDDR_EPDD3 (0x08)
  536. #define EPORT_EPDDR_EPDD4 (0x10)
  537. #define EPORT_EPDDR_EPDD5 (0x20)
  538. #define EPORT_EPDDR_EPDD6 (0x40)
  539. #define EPORT_EPDDR_EPDD7 (0x80)
  540. /* Bit definitions and macros for EPIER */
  541. #define EPORT_EPIER_EPIE1 (0x02)
  542. #define EPORT_EPIER_EPIE2 (0x04)
  543. #define EPORT_EPIER_EPIE3 (0x08)
  544. #define EPORT_EPIER_EPIE4 (0x10)
  545. #define EPORT_EPIER_EPIE5 (0x20)
  546. #define EPORT_EPIER_EPIE6 (0x40)
  547. #define EPORT_EPIER_EPIE7 (0x80)
  548. /* Bit definitions and macros for EPDR */
  549. #define EPORT_EPDR_EPD1 (0x02)
  550. #define EPORT_EPDR_EPD2 (0x04)
  551. #define EPORT_EPDR_EPD3 (0x08)
  552. #define EPORT_EPDR_EPD4 (0x10)
  553. #define EPORT_EPDR_EPD5 (0x20)
  554. #define EPORT_EPDR_EPD6 (0x40)
  555. #define EPORT_EPDR_EPD7 (0x80)
  556. /* Bit definitions and macros for EPPDR */
  557. #define EPORT_EPPDR_EPPD1 (0x02)
  558. #define EPORT_EPPDR_EPPD2 (0x04)
  559. #define EPORT_EPPDR_EPPD3 (0x08)
  560. #define EPORT_EPPDR_EPPD4 (0x10)
  561. #define EPORT_EPPDR_EPPD5 (0x20)
  562. #define EPORT_EPPDR_EPPD6 (0x40)
  563. #define EPORT_EPPDR_EPPD7 (0x80)
  564. /* Bit definitions and macros for EPFR */
  565. #define EPORT_EPFR_EPF1 (0x02)
  566. #define EPORT_EPFR_EPF2 (0x04)
  567. #define EPORT_EPFR_EPF3 (0x08)
  568. #define EPORT_EPFR_EPF4 (0x10)
  569. #define EPORT_EPFR_EPF5 (0x20)
  570. #define EPORT_EPFR_EPF6 (0x40)
  571. #define EPORT_EPFR_EPF7 (0x80)
  572. /*********************************************************************
  573. * Watchdog Timer Modules (WTM)
  574. *********************************************************************/
  575. /* Bit definitions and macros for WCR */
  576. #define WTM_WCR_EN (0x0001)
  577. #define WTM_WCR_HALTED (0x0002)
  578. #define WTM_WCR_DOZE (0x0004)
  579. #define WTM_WCR_WAIT (0x0008)
  580. /*********************************************************************
  581. * Serial Boot Facility (SBF)
  582. *********************************************************************/
  583. /* Bit definitions and macros for SBFCR */
  584. #define SBF_SBFCR_BLDIV(x) (((x)&0x000F)) /* Boot loader clock divider */
  585. #define SBF_SBFCR_FR (0x0010) /* Fast read */
  586. /*********************************************************************
  587. * Reset Controller Module (RCM)
  588. *********************************************************************/
  589. /* Bit definitions and macros for RCR */
  590. #define RCM_RCR_FRCRSTOUT (0x40)
  591. #define RCM_RCR_SOFTRST (0x80)
  592. /* Bit definitions and macros for RSR */
  593. #define RCM_RSR_LOL (0x01)
  594. #define RCM_RSR_WDR_CORE (0x02)
  595. #define RCM_RSR_EXT (0x04)
  596. #define RCM_RSR_POR (0x08)
  597. #define RCM_RSR_SOFT (0x20)
  598. /*********************************************************************
  599. * Chip Configuration Module (CCM)
  600. *********************************************************************/
  601. /* Bit definitions and macros for CCR_360 */
  602. #define CCM_CCR_360_PLLMULT2(x) (((x)&0x0003)) /* 2-Bit PLL clock mode */
  603. #define CCM_CCR_360_PCISLEW (0x0004) /* PCI pad slew rate mode */
  604. #define CCM_CCR_360_PCIMODE (0x0008) /* PCI host/agent mode */
  605. #define CCM_CCR_360_PLLMODE (0x0010) /* PLL Mode */
  606. #define CCM_CCR_360_FBCONFIG(x) (((x)&0x0007)<<5) /* Flexbus/PCI port size configuration */
  607. #define CCM_CCR_360_PLLMULT3(x) (((x)&0x0007)) /* 3-Bit PLL Clock Mode */
  608. #define CCM_CCR_360_OSCMODE (0x0008) /* Oscillator Clock Mode */
  609. #define CCM_CCR_360_FBCONFIG_MASK (0x00E0)
  610. #define CCM_CCR_360_PLLMULT2_MASK (0x0003)
  611. #define CCM_CCR_360_PLLMULT3_MASK (0x0007)
  612. #define CCM_CCR_360_FBCONFIG_NM_NP_32 (0x0000)
  613. #define CCM_CCR_360_FBCONFIG_NM_NP_8 (0x0020)
  614. #define CCM_CCR_360_FBCONFIG_NM_NP_16 (0x0040)
  615. #define CCM_CCR_360_FBCONFIG_M_P_16 (0x0060)
  616. #define CCM_CCR_360_FBCONFIG_M_NP_32 (0x0080)
  617. #define CCM_CCR_360_FBCONFIG_M_NP_8 (0x00A0)
  618. #define CCM_CCR_360_FBCONFIG_M_NP_16 (0x00C0)
  619. #define CCM_CCR_360_FBCONFIG_M_P_8 (0x00E0)
  620. #define CCM_CCR_360_PLLMULT2_12X (0x0000)
  621. #define CCM_CCR_360_PLLMULT2_6X (0x0001)
  622. #define CCM_CCR_360_PLLMULT2_16X (0x0002)
  623. #define CCM_CCR_360_PLLMULT2_8X (0x0003)
  624. #define CCM_CCR_360_PLLMULT3_20X (0x0000)
  625. #define CCM_CCR_360_PLLMULT3_10X (0x0001)
  626. #define CCM_CCR_360_PLLMULT3_24X (0x0002)
  627. #define CCM_CCR_360_PLLMULT3_18X (0x0003)
  628. #define CCM_CCR_360_PLLMULT3_12X (0x0004)
  629. #define CCM_CCR_360_PLLMULT3_6X (0x0005)
  630. #define CCM_CCR_360_PLLMULT3_16X (0x0006)
  631. #define CCM_CCR_360_PLLMULT3_8X (0x0007)
  632. /* Bit definitions and macros for CCR_256 */
  633. #define CCM_CCR_256_PLLMULT3(x) (((x)&0x0007)) /* 3-Bit PLL clock mode */
  634. #define CCM_CCR_256_OSCMODE (0x0008) /* Oscillator clock mode */
  635. #define CCM_CCR_256_PLLMODE (0x0010) /* PLL Mode */
  636. #define CCM_CCR_256_FBCONFIG(x) (((x)&0x0007)<<5) /* Flexbus/PCI port size configuration */
  637. #define CCM_CCR_256_FBCONFIG_MASK (0x00E0)
  638. #define CCM_CCR_256_FBCONFIG_NM_32 (0x0000)
  639. #define CCM_CCR_256_FBCONFIG_NM_8 (0x0020)
  640. #define CCM_CCR_256_FBCONFIG_NM_16 (0x0040)
  641. #define CCM_CCR_256_FBCONFIG_M_32 (0x0080)
  642. #define CCM_CCR_256_FBCONFIG_M_8 (0x00A0)
  643. #define CCM_CCR_256_FBCONFIG_M_16 (0x00C0)
  644. #define CCM_CCR_256_PLLMULT3_MASK (0x0007)
  645. #define CCM_CCR_256_PLLMULT3_20X (0x0000)
  646. #define CCM_CCR_256_PLLMULT3_10X (0x0001)
  647. #define CCM_CCR_256_PLLMULT3_24X (0x0002)
  648. #define CCM_CCR_256_PLLMULT3_18X (0x0003)
  649. #define CCM_CCR_256_PLLMULT3_12X (0x0004)
  650. #define CCM_CCR_256_PLLMULT3_6X (0x0005)
  651. #define CCM_CCR_256_PLLMULT3_16X (0x0006)
  652. #define CCM_CCR_256_PLLMULT3_8X (0x0007)
  653. /* Bit definitions and macros for RCON_360 */
  654. #define CCM_RCON_360_PLLMULT(x) (((x)&0x0003)) /* PLL clock mode */
  655. #define CCM_RCON_360_PCISLEW (0x0004) /* PCI pad slew rate mode */
  656. #define CCM_RCON_360_PCIMODE (0x0008) /* PCI host/agent mode */
  657. #define CCM_RCON_360_PLLMODE (0x0010) /* PLL Mode */
  658. #define CCM_RCON_360_FBCONFIG(x) (((x)&0x0007)<<5) /* Flexbus/PCI port size configuration */
  659. /* Bit definitions and macros for RCON_256 */
  660. #define CCM_RCON_256_PLLMULT(x) (((x)&0x0007)) /* PLL clock mode */
  661. #define CCM_RCON_256_OSCMODE (0x0008) /* Oscillator clock mode */
  662. #define CCM_RCON_256_PLLMODE (0x0010) /* PLL Mode */
  663. #define CCM_RCON_256_FBCONFIG(x) (((x)&0x0007)<<5) /* Flexbus/PCI port size configuration */
  664. /* Bit definitions and macros for CIR */
  665. #define CCM_CIR_PRN(x) (((x)&0x003F)) /* Part revision number */
  666. #define CCM_CIR_PIN(x) (((x)&0x03FF)<<6) /* Part identification number */
  667. #define CCM_CIR_PIN_MASK (0xFFC0)
  668. #define CCM_CIR_PRN_MASK (0x003F)
  669. #define CCM_CIR_PIN_MCF54450 (0x4F<<6)
  670. #define CCM_CIR_PIN_MCF54451 (0x4D<<6)
  671. #define CCM_CIR_PIN_MCF54452 (0x4B<<6)
  672. #define CCM_CIR_PIN_MCF54453 (0x49<<6)
  673. #define CCM_CIR_PIN_MCF54454 (0x4A<<6)
  674. #define CCM_CIR_PIN_MCF54455 (0x48<<6)
  675. /* Bit definitions and macros for MISCCR */
  676. #define CCM_MISCCR_USBSRC (0x0001) /* USB clock source */
  677. #define CCM_MISCCR_USBOC (0x0002) /* USB VBUS over-current sense polarity */
  678. #define CCM_MISCCR_USBPUE (0x0004) /* USB transceiver pull-up enable */
  679. #define CCM_MISCCR_SSISRC (0x0010) /* SSI clock source */
  680. #define CCM_MISCCR_TIMDMA (0x0020) /* Timer DMA mux selection */
  681. #define CCM_MISCCR_SSIPUS (0x0040) /* SSI RXD/TXD pull select */
  682. #define CCM_MISCCR_SSIPUE (0x0080) /* SSI RXD/TXD pull enable */
  683. #define CCM_MISCCR_BMT(x) (((x)&0x0007)<<8) /* Bus monitor timing field */
  684. #define CCM_MISCCR_BME (0x0800) /* Bus monitor external enable bit */
  685. #define CCM_MISCCR_LIMP (0x1000) /* Limp mode enable */
  686. #define CCM_MISCCR_BMT_65536 (0)
  687. #define CCM_MISCCR_BMT_32768 (1)
  688. #define CCM_MISCCR_BMT_16384 (2)
  689. #define CCM_MISCCR_BMT_8192 (3)
  690. #define CCM_MISCCR_BMT_4096 (4)
  691. #define CCM_MISCCR_BMT_2048 (5)
  692. #define CCM_MISCCR_BMT_1024 (6)
  693. #define CCM_MISCCR_BMT_512 (7)
  694. #define CCM_MISCCR_SSIPUS_UP (1)
  695. #define CCM_MISCCR_SSIPUS_DOWN (0)
  696. #define CCM_MISCCR_TIMDMA_TIM (1)
  697. #define CCM_MISCCR_TIMDMA_SSI (0)
  698. #define CCM_MISCCR_SSISRC_CLKIN (0)
  699. #define CCM_MISCCR_SSISRC_PLL (1)
  700. #define CCM_MISCCR_USBOC_ACTHI (0)
  701. #define CCM_MISCCR_USBOV_ACTLO (1)
  702. #define CCM_MISCCR_USBSRC_CLKIN (0)
  703. #define CCM_MISCCR_USBSRC_PLL (1)
  704. /* Bit definitions and macros for CDR */
  705. #define CCM_CDR_SSIDIV(x) (((x)&0x00FF)) /* SSI oversampling clock divider */
  706. #define CCM_CDR_LPDIV(x) (((x)&0x000F)<<8) /* Low power clock divider */
  707. /* Bit definitions and macros for UOCSR */
  708. #define CCM_UOCSR_XPDE (0x0001) /* On-chip transceiver pull-down enable */
  709. #define CCM_UOCSR_UOMIE (0x0002) /* USB OTG misc interrupt enable */
  710. #define CCM_UOCSR_WKUP (0x0004) /* USB OTG controller wake-up event */
  711. #define CCM_UOCSR_PWRFLT (0x0008) /* VBUS power fault */
  712. #define CCM_UOCSR_SEND (0x0010) /* Session end */
  713. #define CCM_UOCSR_VVLD (0x0020) /* VBUS valid indicator */
  714. #define CCM_UOCSR_BVLD (0x0040) /* B-peripheral valid indicator */
  715. #define CCM_UOCSR_AVLD (0x0080) /* A-peripheral valid indicator */
  716. #define CCM_UOCSR_DPPU (0x0100) /* D+ pull-up for FS enabled (read-only) */
  717. #define CCM_UOCSR_DCR_VBUS (0x0200) /* VBUS discharge resistor enabled (read-only) */
  718. #define CCM_UOCSR_CRG_VBUS (0x0400) /* VBUS charge resistor enabled (read-only) */
  719. #define CCM_UOCSR_DMPD (0x1000) /* D- 15Kohm pull-down (read-only) */
  720. #define CCM_UOCSR_DPPD (0x2000) /* D+ 15Kohm pull-down (read-only) */
  721. /*********************************************************************
  722. * General Purpose I/O Module (GPIO)
  723. *********************************************************************/
  724. /* Bit definitions and macros for PAR_FEC */
  725. #define GPIO_PAR_FEC_FEC0(x) (((x)&0x07))
  726. #define GPIO_PAR_FEC_FEC1(x) (((x)&0x07)<<4)
  727. #define GPIO_PAR_FEC_FEC1_MASK (0x8F)
  728. #define GPIO_PAR_FEC_FEC1_MII (0x70)
  729. #define GPIO_PAR_FEC_FEC1_RMII_GPIO (0x30)
  730. #define GPIO_PAR_FEC_FEC1_RMII_ATA (0x20)
  731. #define GPIO_PAR_FEC_FEC1_ATA (0x10)
  732. #define GPIO_PAR_FEC_FEC1_GPIO (0x00)
  733. #define GPIO_PAR_FEC_FEC0_MASK (0xF8)
  734. #define GPIO_PAR_FEC_FEC0_MII (0x07)
  735. #define GPIO_PAR_FEC_FEC0_RMII_GPIO (0x03)
  736. #define GPIO_PAR_FEC_FEC0_RMII_ATA (0x02)
  737. #define GPIO_PAR_FEC_FEC0_ATA (0x01)
  738. #define GPIO_PAR_FEC_FEC0_GPIO (0x00)
  739. /* Bit definitions and macros for PAR_DMA */
  740. #define GPIO_PAR_DMA_DREQ0 (0x01)
  741. #define GPIO_PAR_DMA_DACK0(x) (((x)&0x03)<<2)
  742. #define GPIO_PAR_DMA_DREQ1(x) (((x)&0x03)<<4)
  743. #define GPIO_PAR_DMA_DACK1(x) (((x)&0x03)<<6)
  744. #define GPIO_PAR_DMA_DACK1_MASK (0x3F)
  745. #define GPIO_PAR_DMA_DACK1_DACK1 (0xC0)
  746. #define GPIO_PAR_DMA_DACK1_ULPI_DIR (0x40)
  747. #define GPIO_PAR_DMA_DACK1_GPIO (0x00)
  748. #define GPIO_PAR_DMA_DREQ1_MASK (0xCF)
  749. #define GPIO_PAR_DMA_DREQ1_DREQ1 (0x30)
  750. #define GPIO_PAR_DMA_DREQ1_USB_CLKIN (0x10)
  751. #define GPIO_PAR_DMA_DREQ1_GPIO (0x00)
  752. #define GPIO_PAR_DMA_DACK0_MASK (0xF3)
  753. #define GPIO_PAR_DMA_DACK0_DACK1 (0x0C)
  754. #define GPIO_PAR_DMA_DACK0_ULPI_DIR (0x04)
  755. #define GPIO_PAR_DMA_DACK0_GPIO (0x00)
  756. #define GPIO_PAR_DMA_DREQ0_DREQ0 (0x01)
  757. #define GPIO_PAR_DMA_DREQ0_GPIO (0x00)
  758. /* Bit definitions and macros for PAR_FBCTL */
  759. #define GPIO_PAR_FBCTL_TS(x) (((x)&0x03)<<3)
  760. #define GPIO_PAR_FBCTL_RW (0x20)
  761. #define GPIO_PAR_FBCTL_TA (0x40)
  762. #define GPIO_PAR_FBCTL_OE (0x80)
  763. #define GPIO_PAR_FBCTL_OE_OE (0x80)
  764. #define GPIO_PAR_FBCTL_OE_GPIO (0x00)
  765. #define GPIO_PAR_FBCTL_TA_TA (0x40)
  766. #define GPIO_PAR_FBCTL_TA_GPIO (0x00)
  767. #define GPIO_PAR_FBCTL_RW_RW (0x20)
  768. #define GPIO_PAR_FBCTL_RW_GPIO (0x00)
  769. #define GPIO_PAR_FBCTL_TS_MASK (0xE7)
  770. #define GPIO_PAR_FBCTL_TS_TS (0x18)
  771. #define GPIO_PAR_FBCTL_TS_ALE (0x10)
  772. #define GPIO_PAR_FBCTL_TS_TBST (0x08)
  773. #define GPIO_PAR_FBCTL_TS_GPIO (0x80)
  774. /* Bit definitions and macros for PAR_DSPI */
  775. #define GPIO_PAR_DSPI_SCK (0x01)
  776. #define GPIO_PAR_DSPI_SOUT (0x02)
  777. #define GPIO_PAR_DSPI_SIN (0x04)
  778. #define GPIO_PAR_DSPI_PCS0 (0x08)
  779. #define GPIO_PAR_DSPI_PCS1 (0x10)
  780. #define GPIO_PAR_DSPI_PCS2 (0x20)
  781. #define GPIO_PAR_DSPI_PCS5 (0x40)
  782. #define GPIO_PAR_DSPI_PCS5_PCS5 (0x40)
  783. #define GPIO_PAR_DSPI_PCS5_GPIO (0x00)
  784. #define GPIO_PAR_DSPI_PCS2_PCS2 (0x20)
  785. #define GPIO_PAR_DSPI_PCS2_GPIO (0x00)
  786. #define GPIO_PAR_DSPI_PCS1_PCS1 (0x10)
  787. #define GPIO_PAR_DSPI_PCS1_GPIO (0x00)
  788. #define GPIO_PAR_DSPI_PCS0_PCS0 (0x08)
  789. #define GPIO_PAR_DSPI_PCS0_GPIO (0x00)
  790. #define GPIO_PAR_DSPI_SIN_SIN (0x04)
  791. #define GPIO_PAR_DSPI_SIN_GPIO (0x00)
  792. #define GPIO_PAR_DSPI_SOUT_SOUT (0x02)
  793. #define GPIO_PAR_DSPI_SOUT_GPIO (0x00)
  794. #define GPIO_PAR_DSPI_SCK_SCK (0x01)
  795. #define GPIO_PAR_DSPI_SCK_GPIO (0x00)
  796. /* Bit definitions and macros for PAR_BE */
  797. #define GPIO_PAR_BE_BS0 (0x01)
  798. #define GPIO_PAR_BE_BS1 (0x04)
  799. #define GPIO_PAR_BE_BS2(x) (((x)&0x03)<<4)
  800. #define GPIO_PAR_BE_BS3(x) (((x)&0x03)<<6)
  801. #define GPIO_PAR_BE_BE3_MASK (0x3F)
  802. #define GPIO_PAR_BE_BE3_BE3 (0xC0)
  803. #define GPIO_PAR_BE_BE3_TSIZ1 (0x80)
  804. #define GPIO_PAR_BE_BE3_GPIO (0x00)
  805. #define GPIO_PAR_BE_BE2_MASK (0xCF)
  806. #define GPIO_PAR_BE_BE2_BE2 (0x30)
  807. #define GPIO_PAR_BE_BE2_TSIZ0 (0x20)
  808. #define GPIO_PAR_BE_BE2_GPIO (0x00)
  809. #define GPIO_PAR_BE_BE1_BE1 (0x04)
  810. #define GPIO_PAR_BE_BE1_GPIO (0x00)
  811. #define GPIO_PAR_BE_BE0_BE0 (0x01)
  812. #define GPIO_PAR_BE_BE0_GPIO (0x00)
  813. /* Bit definitions and macros for PAR_CS */
  814. #define GPIO_PAR_CS_CS1 (0x02)
  815. #define GPIO_PAR_CS_CS2 (0x04)
  816. #define GPIO_PAR_CS_CS3 (0x08)
  817. #define GPIO_PAR_CS_CS3_CS3 (0x08)
  818. #define GPIO_PAR_CS_CS3_GPIO (0x00)
  819. #define GPIO_PAR_CS_CS2_CS2 (0x04)
  820. #define GPIO_PAR_CS_CS2_GPIO (0x00)
  821. #define GPIO_PAR_CS_CS1_CS1 (0x02)
  822. #define GPIO_PAR_CS_CS1_GPIO (0x00)
  823. /* Bit definitions and macros for PAR_TIMER */
  824. #define GPIO_PAR_TIMER_T0IN(x) (((x)&0x03))
  825. #define GPIO_PAR_TIMER_T1IN(x) (((x)&0x03)<<2)
  826. #define GPIO_PAR_TIMER_T2IN(x) (((x)&0x03)<<4)
  827. #define GPIO_PAR_TIMER_T3IN(x) (((x)&0x03)<<6)
  828. #define GPIO_PAR_TIMER_T3IN_MASK (0x3F)
  829. #define GPIO_PAR_TIMER_T3IN_T3IN (0xC0)
  830. #define GPIO_PAR_TIMER_T3IN_T3OUT (0x80)
  831. #define GPIO_PAR_TIMER_T3IN_U2RXD (0x40)
  832. #define GPIO_PAR_TIMER_T3IN_GPIO (0x00)
  833. #define GPIO_PAR_TIMER_T2IN_MASK (0xCF)
  834. #define GPIO_PAR_TIMER_T2IN_T2IN (0x30)
  835. #define GPIO_PAR_TIMER_T2IN_T2OUT (0x20)
  836. #define GPIO_PAR_TIMER_T2IN_U2TXD (0x10)
  837. #define GPIO_PAR_TIMER_T2IN_GPIO (0x00)
  838. #define GPIO_PAR_TIMER_T1IN_MASK (0xF3)
  839. #define GPIO_PAR_TIMER_T1IN_T1IN (0x0C)
  840. #define GPIO_PAR_TIMER_T1IN_T1OUT (0x08)
  841. #define GPIO_PAR_TIMER_T1IN_U2CTS (0x04)
  842. #define GPIO_PAR_TIMER_T1IN_GPIO (0x00)
  843. #define GPIO_PAR_TIMER_T0IN_MASK (0xFC)
  844. #define GPIO_PAR_TIMER_T0IN_T0IN (0x03)
  845. #define GPIO_PAR_TIMER_T0IN_T0OUT (0x02)
  846. #define GPIO_PAR_TIMER_T0IN_U2RTS (0x01)
  847. #define GPIO_PAR_TIMER_T0IN_GPIO (0x00)
  848. /* Bit definitions and macros for PAR_USB */
  849. #define GPIO_PAR_USB_VBUSOC(x) (((x)&0x03))
  850. #define GPIO_PAR_USB_VBUSEN(x) (((x)&0x03)<<2)
  851. #define GPIO_PAR_USB_VBUSEN_MASK (0xF3)
  852. #define GPIO_PAR_USB_VBUSEN_VBUSEN (0x0C)
  853. #define GPIO_PAR_USB_VBUSEN_USBPULLUP (0x08)
  854. #define GPIO_PAR_USB_VBUSEN_ULPI_NXT (0x04)
  855. #define GPIO_PAR_USB_VBUSEN_GPIO (0x00)
  856. #define GPIO_PAR_USB_VBUSOC_MASK (0xFC)
  857. #define GPIO_PAR_USB_VBUSOC_VBUSOC (0x03)
  858. #define GPIO_PAR_USB_VBUSOC_ULPI_STP (0x01)
  859. #define GPIO_PAR_USB_VBUSOC_GPIO (0x00)
  860. /* Bit definitions and macros for PAR_UART */
  861. #define GPIO_PAR_UART_U0TXD (0x01)
  862. #define GPIO_PAR_UART_U0RXD (0x02)
  863. #define GPIO_PAR_UART_U0RTS (0x04)
  864. #define GPIO_PAR_UART_U0CTS (0x08)
  865. #define GPIO_PAR_UART_U1TXD (0x10)
  866. #define GPIO_PAR_UART_U1RXD (0x20)
  867. #define GPIO_PAR_UART_U1RTS (0x40)
  868. #define GPIO_PAR_UART_U1CTS (0x80)
  869. #define GPIO_PAR_UART_U1CTS_U1CTS (0x80)
  870. #define GPIO_PAR_UART_U1CTS_GPIO (0x00)
  871. #define GPIO_PAR_UART_U1RTS_U1RTS (0x40)
  872. #define GPIO_PAR_UART_U1RTS_GPIO (0x00)
  873. #define GPIO_PAR_UART_U1RXD_U1RXD (0x20)
  874. #define GPIO_PAR_UART_U1RXD_GPIO (0x00)
  875. #define GPIO_PAR_UART_U1TXD_U1TXD (0x10)
  876. #define GPIO_PAR_UART_U1TXD_GPIO (0x00)
  877. #define GPIO_PAR_UART_U0CTS_U0CTS (0x08)
  878. #define GPIO_PAR_UART_U0CTS_GPIO (0x00)
  879. #define GPIO_PAR_UART_U0RTS_U0RTS (0x04)
  880. #define GPIO_PAR_UART_U0RTS_GPIO (0x00)
  881. #define GPIO_PAR_UART_U0RXD_U0RXD (0x02)
  882. #define GPIO_PAR_UART_U0RXD_GPIO (0x00)
  883. #define GPIO_PAR_UART_U0TXD_U0TXD (0x01)
  884. #define GPIO_PAR_UART_U0TXD_GPIO (0x00)
  885. /* Bit definitions and macros for PAR_FECI2C */
  886. #define GPIO_PAR_FECI2C_SDA(x) (((x)&0x0003))
  887. #define GPIO_PAR_FECI2C_SCL(x) (((x)&0x0003)<<2)
  888. #define GPIO_PAR_FECI2C_MDIO0 (0x0010)
  889. #define GPIO_PAR_FECI2C_MDC0 (0x0040)
  890. #define GPIO_PAR_FECI2C_MDIO1(x) (((x)&0x0003)<<8)
  891. #define GPIO_PAR_FECI2C_MDC1(x) (((x)&0x0003)<<10)
  892. #define GPIO_PAR_FECI2C_MDC1_MASK (0xF3FF)
  893. #define GPIO_PAR_FECI2C_MDC1_MDC1 (0x0C00)
  894. #define GPIO_PAR_FECI2C_MDC1_ATA_DIOR (0x0800)
  895. #define GPIO_PAR_FECI2C_MDC1_GPIO (0x0000)
  896. #define GPIO_PAR_FECI2C_MDIO1_MASK (0xFCFF)
  897. #define GPIO_PAR_FECI2C_MDIO1_MDIO1 (0x0300)
  898. #define GPIO_PAR_FECI2C_MDIO1_ATA_DIOW (0x0200)
  899. #define GPIO_PAR_FECI2C_MDIO1_GPIO (0x0000)
  900. #define GPIO_PAR_FECI2C_MDC0_MDC0 (0x0040)
  901. #define GPIO_PAR_FECI2C_MDC0_GPIO (0x0000)
  902. #define GPIO_PAR_FECI2C_MDIO0_MDIO0 (0x0010)
  903. #define GPIO_PAR_FECI2C_MDIO0_GPIO (0x0000)
  904. #define GPIO_PAR_FECI2C_SCL_MASK (0xFFF3)
  905. #define GPIO_PAR_FECI2C_SCL_SCL (0x000C)
  906. #define GPIO_PAR_FECI2C_SCL_U2TXD (0x0004)
  907. #define GPIO_PAR_FECI2C_SCL_GPIO (0x0000)
  908. #define GPIO_PAR_FECI2C_SDA_MASK (0xFFFC)
  909. #define GPIO_PAR_FECI2C_SDA_SDA (0x0003)
  910. #define GPIO_PAR_FECI2C_SDA_U2RXD (0x0001)
  911. #define GPIO_PAR_FECI2C_SDA_GPIO (0x0000)
  912. /* Bit definitions and macros for PAR_SSI */
  913. #define GPIO_PAR_SSI_MCLK (0x0001)
  914. #define GPIO_PAR_SSI_STXD(x) (((x)&0x0003)<<2)
  915. #define GPIO_PAR_SSI_SRXD(x) (((x)&0x0003)<<4)
  916. #define GPIO_PAR_SSI_FS(x) (((x)&0x0003)<<6)
  917. #define GPIO_PAR_SSI_BCLK(x) (((x)&0x0003)<<8)
  918. #define GPIO_PAR_SSI_BCLK_MASK (0xFCFF)
  919. #define GPIO_PAR_SSI_BCLK_BCLK (0x0300)
  920. #define GPIO_PAR_SSI_BCLK_U1CTS (0x0200)
  921. #define GPIO_PAR_SSI_BCLK_GPIO (0x0000)
  922. #define GPIO_PAR_SSI_FS_MASK (0xFF3F)
  923. #define GPIO_PAR_SSI_FS_FS (0x00C0)
  924. #define GPIO_PAR_SSI_FS_U1RTS (0x0080)
  925. #define GPIO_PAR_SSI_FS_GPIO (0x0000)
  926. #define GPIO_PAR_SSI_SRXD_MASK (0xFFCF)
  927. #define GPIO_PAR_SSI_SRXD_SRXD (0x0030)
  928. #define GPIO_PAR_SSI_SRXD_U1RXD (0x0020)
  929. #define GPIO_PAR_SSI_SRXD_GPIO (0x0000)
  930. #define GPIO_PAR_SSI_STXD_MASK (0xFFF3)
  931. #define GPIO_PAR_SSI_STXD_STXD (0x000C)
  932. #define GPIO_PAR_SSI_STXD_U1TXD (0x0008)
  933. #define GPIO_PAR_SSI_STXD_GPIO (0x0000)
  934. #define GPIO_PAR_SSI_MCLK_MCLK (0x0001)
  935. #define GPIO_PAR_SSI_MCLK_GPIO (0x0000)
  936. /* Bit definitions and macros for PAR_ATA */
  937. #define GPIO_PAR_ATA_IORDY (0x0001)
  938. #define GPIO_PAR_ATA_DMARQ (0x0002)
  939. #define GPIO_PAR_ATA_RESET (0x0004)
  940. #define GPIO_PAR_ATA_DA0 (0x0020)
  941. #define GPIO_PAR_ATA_DA1 (0x0040)
  942. #define GPIO_PAR_ATA_DA2 (0x0080)
  943. #define GPIO_PAR_ATA_CS0 (0x0100)
  944. #define GPIO_PAR_ATA_CS1 (0x0200)
  945. #define GPIO_PAR_ATA_BUFEN (0x0400)
  946. #define GPIO_PAR_ATA_BUFEN_BUFEN (0x0400)
  947. #define GPIO_PAR_ATA_BUFEN_GPIO (0x0000)
  948. #define GPIO_PAR_ATA_CS1_CS1 (0x0200)
  949. #define GPIO_PAR_ATA_CS1_GPIO (0x0000)
  950. #define GPIO_PAR_ATA_CS0_CS0 (0x0100)
  951. #define GPIO_PAR_ATA_CS0_GPIO (0x0000)
  952. #define GPIO_PAR_ATA_DA2_DA2 (0x0080)
  953. #define GPIO_PAR_ATA_DA2_GPIO (0x0000)
  954. #define GPIO_PAR_ATA_DA1_DA1 (0x0040)
  955. #define GPIO_PAR_ATA_DA1_GPIO (0x0000)
  956. #define GPIO_PAR_ATA_DA0_DA0 (0x0020)
  957. #define GPIO_PAR_ATA_DA0_GPIO (0x0000)
  958. #define GPIO_PAR_ATA_RESET_RESET (0x0004)
  959. #define GPIO_PAR_ATA_RESET_GPIO (0x0000)
  960. #define GPIO_PAR_ATA_DMARQ_DMARQ (0x0002)
  961. #define GPIO_PAR_ATA_DMARQ_GPIO (0x0000)
  962. #define GPIO_PAR_ATA_IORDY_IORDY (0x0001)
  963. #define GPIO_PAR_ATA_IORDY_GPIO (0x0000)
  964. /* Bit definitions and macros for PAR_IRQ */
  965. #define GPIO_PAR_IRQ_IRQ1 (0x02)
  966. #define GPIO_PAR_IRQ_IRQ4 (0x10)
  967. #define GPIO_PAR_IRQ_IRQ4_IRQ4 (0x10)
  968. #define GPIO_PAR_IRQ_IRQ4_GPIO (0x00)
  969. #define GPIO_PAR_IRQ_IRQ1_IRQ1 (0x02)
  970. #define GPIO_PAR_IRQ_IRQ1_GPIO (0x00)
  971. /* Bit definitions and macros for PAR_PCI */
  972. #define GPIO_PAR_PCI_REQ0 (0x0001)
  973. #define GPIO_PAR_PCI_REQ1 (0x0004)
  974. #define GPIO_PAR_PCI_REQ2 (0x0010)
  975. #define GPIO_PAR_PCI_REQ3(x) (((x)&0x0003)<<6)
  976. #define GPIO_PAR_PCI_GNT0 (0x0100)
  977. #define GPIO_PAR_PCI_GNT1 (0x0400)
  978. #define GPIO_PAR_PCI_GNT2 (0x1000)
  979. #define GPIO_PAR_PCI_GNT3(x) (((x)&0x0003)<<14)
  980. #define GPIO_PAR_PCI_GNT3_MASK (0x3FFF)
  981. #define GPIO_PAR_PCI_GNT3_GNT3 (0xC000)
  982. #define GPIO_PAR_PCI_GNT3_ATA_DMACK (0x8000)
  983. #define GPIO_PAR_PCI_GNT3_GPIO (0x0000)
  984. #define GPIO_PAR_PCI_GNT2_GNT2 (0x1000)
  985. #define GPIO_PAR_PCI_GNT2_GPIO (0x0000)
  986. #define GPIO_PAR_PCI_GNT1_GNT1 (0x0400)
  987. #define GPIO_PAR_PCI_GNT1_GPIO (0x0000)
  988. #define GPIO_PAR_PCI_GNT0_GNT0 (0x0100)
  989. #define GPIO_PAR_PCI_GNT0_GPIO (0x0000)
  990. #define GPIO_PAR_PCI_REQ3_MASK (0xFF3F)
  991. #define GPIO_PAR_PCI_REQ3_REQ3 (0x00C0)
  992. #define GPIO_PAR_PCI_REQ3_ATA_INTRQ (0x0080)
  993. #define GPIO_PAR_PCI_REQ3_GPIO (0x0000)
  994. #define GPIO_PAR_PCI_REQ2_REQ2 (0x0010)
  995. #define GPIO_PAR_PCI_REQ2_GPIO (0x0000)
  996. #define GPIO_PAR_PCI_REQ1_REQ1 (0x0040)
  997. #define GPIO_PAR_PCI_REQ1_GPIO (0x0000)
  998. #define GPIO_PAR_PCI_REQ0_REQ0 (0x0001)
  999. #define GPIO_PAR_PCI_REQ0_GPIO (0x0000)
  1000. /* Bit definitions and macros for MSCR_SDRAM */
  1001. #define GPIO_MSCR_SDRAM_SDCTL(x) (((x)&0x03))
  1002. #define GPIO_MSCR_SDRAM_SDCLK(x) (((x)&0x03)<<2)
  1003. #define GPIO_MSCR_SDRAM_SDDQS(x) (((x)&0x03)<<4)
  1004. #define GPIO_MSCR_SDRAM_SDDATA(x) (((x)&0x03)<<6)
  1005. #define GPIO_MSCR_SDRAM_SDDATA_MASK (0x3F)
  1006. #define GPIO_MSCR_SDRAM_SDDATA_DDR1 (0xC0)
  1007. #define GPIO_MSCR_SDRAM_SDDATA_DDR2 (0x80)
  1008. #define GPIO_MSCR_SDRAM_SDDATA_FS_LPDDR (0x40)
  1009. #define GPIO_MSCR_SDRAM_SDDATA_HS_LPDDR (0x00)
  1010. #define GPIO_MSCR_SDRAM_SDDQS_MASK (0xCF)
  1011. #define GPIO_MSCR_SDRAM_SDDQS_DDR1 (0x30)
  1012. #define GPIO_MSCR_SDRAM_SDDQS_DDR2 (0x20)
  1013. #define GPIO_MSCR_SDRAM_SDDQS_FS_LPDDR (0x10)
  1014. #define GPIO_MSCR_SDRAM_SDDQS_HS_LPDDR (0x00)
  1015. #define GPIO_MSCR_SDRAM_SDCLK_MASK (0xF3)
  1016. #define GPIO_MSCR_SDRAM_SDCLK_DDR1 (0x0C)
  1017. #define GPIO_MSCR_SDRAM_SDCLK_DDR2 (0x08)
  1018. #define GPIO_MSCR_SDRAM_SDCLK_FS_LPDDR (0x04)
  1019. #define GPIO_MSCR_SDRAM_SDCLK_HS_LPDDR (0x00)
  1020. #define GPIO_MSCR_SDRAM_SDCTL_MASK (0xFC)
  1021. #define GPIO_MSCR_SDRAM_SDCTL_DDR1 (0x03)
  1022. #define GPIO_MSCR_SDRAM_SDCTL_DDR2 (0x02)
  1023. #define GPIO_MSCR_SDRAM_SDCTL_FS_LPDDR (0x01)
  1024. #define GPIO_MSCR_SDRAM_SDCTL_HS_LPDDR (0x00)
  1025. /* Bit definitions and macros for MSCR_PCI */
  1026. #define GPIO_MSCR_PCI_PCI (0x01)
  1027. #define GPIO_MSCR_PCI_PCI_HI_66MHZ (0x01)
  1028. #define GPIO_MSCR_PCI_PCI_LO_33MHZ (0x00)
  1029. /* Bit definitions and macros for DSCR_I2C */
  1030. #define GPIO_DSCR_I2C_I2C(x) (((x)&0x03))
  1031. #define GPIO_DSCR_I2C_I2C_LOAD_50PF (0x03)
  1032. #define GPIO_DSCR_I2C_I2C_LOAD_30PF (0x02)
  1033. #define GPIO_DSCR_I2C_I2C_LOAD_20PF (0x01)
  1034. #define GPIO_DSCR_I2C_I2C_LOAD_10PF (0x00)
  1035. /* Bit definitions and macros for DSCR_FLEXBUS */
  1036. #define GPIO_DSCR_FLEXBUS_FBADL(x) (((x)&0x03))
  1037. #define GPIO_DSCR_FLEXBUS_FBADH(x) (((x)&0x03)<<2)
  1038. #define GPIO_DSCR_FLEXBUS_FBCTL(x) (((x)&0x03)<<4)
  1039. #define GPIO_DSCR_FLEXBUS_FBCLK(x) (((x)&0x03)<<6)
  1040. #define GPIO_DSCR_FLEXBUS_FBCLK_LOAD_50PF (0xC0)
  1041. #define GPIO_DSCR_FLEXBUS_FBCLK_LOAD_30PF (0x80)
  1042. #define GPIO_DSCR_FLEXBUS_FBCLK_LOAD_20PF (0x40)
  1043. #define GPIO_DSCR_FLEXBUS_FBCLK_LOAD_10PF (0x00)
  1044. #define GPIO_DSCR_FLEXBUS_FBCTL_LOAD_50PF (0x30)
  1045. #define GPIO_DSCR_FLEXBUS_FBCTL_LOAD_30PF (0x20)
  1046. #define GPIO_DSCR_FLEXBUS_FBCTL_LOAD_20PF (0x10)
  1047. #define GPIO_DSCR_FLEXBUS_FBCTL_LOAD_10PF (0x00)
  1048. #define GPIO_DSCR_FLEXBUS_FBADH_LOAD_50PF (0x0C)
  1049. #define GPIO_DSCR_FLEXBUS_FBADH_LOAD_30PF (0x08)
  1050. #define GPIO_DSCR_FLEXBUS_FBADH_LOAD_20PF (0x04)
  1051. #define GPIO_DSCR_FLEXBUS_FBADH_LOAD_10PF (0x00)
  1052. #define GPIO_DSCR_FLEXBUS_FBADL_LOAD_50PF (0x03)
  1053. #define GPIO_DSCR_FLEXBUS_FBADL_LOAD_30PF (0x02)
  1054. #define GPIO_DSCR_FLEXBUS_FBADL_LOAD_20PF (0x01)
  1055. #define GPIO_DSCR_FLEXBUS_FBADL_LOAD_10PF (0x00)
  1056. /* Bit definitions and macros for DSCR_FEC */
  1057. #define GPIO_DSCR_FEC_FEC0(x) (((x)&0x03))
  1058. #define GPIO_DSCR_FEC_FEC1(x) (((x)&0x03)<<2)
  1059. #define GPIO_DSCR_FEC_FEC1_LOAD_50PF (0x0C)
  1060. #define GPIO_DSCR_FEC_FEC1_LOAD_30PF (0x08)
  1061. #define GPIO_DSCR_FEC_FEC1_LOAD_20PF (0x04)
  1062. #define GPIO_DSCR_FEC_FEC1_LOAD_10PF (0x00)
  1063. #define GPIO_DSCR_FEC_FEC0_LOAD_50PF (0x03)
  1064. #define GPIO_DSCR_FEC_FEC0_LOAD_30PF (0x02)
  1065. #define GPIO_DSCR_FEC_FEC0_LOAD_20PF (0x01)
  1066. #define GPIO_DSCR_FEC_FEC0_LOAD_10PF (0x00)
  1067. /* Bit definitions and macros for DSCR_UART */
  1068. #define GPIO_DSCR_UART_UART0(x) (((x)&0x03))
  1069. #define GPIO_DSCR_UART_UART1(x) (((x)&0x03)<<2)
  1070. #define GPIO_DSCR_UART_UART1_LOAD_50PF (0x0C)
  1071. #define GPIO_DSCR_UART_UART1_LOAD_30PF (0x08)
  1072. #define GPIO_DSCR_UART_UART1_LOAD_20PF (0x04)
  1073. #define GPIO_DSCR_UART_UART1_LOAD_10PF (0x00)
  1074. #define GPIO_DSCR_UART_UART0_LOAD_50PF (0x03)
  1075. #define GPIO_DSCR_UART_UART0_LOAD_30PF (0x02)
  1076. #define GPIO_DSCR_UART_UART0_LOAD_20PF (0x01)
  1077. #define GPIO_DSCR_UART_UART0_LOAD_10PF (0x00)
  1078. /* Bit definitions and macros for DSCR_DSPI */
  1079. #define GPIO_DSCR_DSPI_DSPI(x) (((x)&0x03))
  1080. #define GPIO_DSCR_DSPI_DSPI_LOAD_50PF (0x03)
  1081. #define GPIO_DSCR_DSPI_DSPI_LOAD_30PF (0x02)
  1082. #define GPIO_DSCR_DSPI_DSPI_LOAD_20PF (0x01)
  1083. #define GPIO_DSCR_DSPI_DSPI_LOAD_10PF (0x00)
  1084. /* Bit definitions and macros for DSCR_TIMER */
  1085. #define GPIO_DSCR_TIMER_TIMER(x) (((x)&0x03))
  1086. #define GPIO_DSCR_TIMER_TIMER_LOAD_50PF (0x03)
  1087. #define GPIO_DSCR_TIMER_TIMER_LOAD_30PF (0x02)
  1088. #define GPIO_DSCR_TIMER_TIMER_LOAD_20PF (0x01)
  1089. #define GPIO_DSCR_TIMER_TIMER_LOAD_10PF (0x00)
  1090. /* Bit definitions and macros for DSCR_SSI */
  1091. #define GPIO_DSCR_SSI_SSI(x) (((x)&0x03))
  1092. #define GPIO_DSCR_SSI_SSI_LOAD_50PF (0x03)
  1093. #define GPIO_DSCR_SSI_SSI_LOAD_30PF (0x02)
  1094. #define GPIO_DSCR_SSI_SSI_LOAD_20PF (0x01)
  1095. #define GPIO_DSCR_SSI_SSI_LOAD_10PF (0x00)
  1096. /* Bit definitions and macros for DSCR_DMA */
  1097. #define GPIO_DSCR_DMA_DMA(x) (((x)&0x03))
  1098. #define GPIO_DSCR_DMA_DMA_LOAD_50PF (0x03)
  1099. #define GPIO_DSCR_DMA_DMA_LOAD_30PF (0x02)
  1100. #define GPIO_DSCR_DMA_DMA_LOAD_20PF (0x01)
  1101. #define GPIO_DSCR_DMA_DMA_LOAD_10PF (0x00)
  1102. /* Bit definitions and macros for DSCR_DEBUG */
  1103. #define GPIO_DSCR_DEBUG_DEBUG(x) (((x)&0x03))
  1104. #define GPIO_DSCR_DEBUG_DEBUG_LOAD_50PF (0x03)
  1105. #define GPIO_DSCR_DEBUG_DEBUG_LOAD_30PF (0x02)
  1106. #define GPIO_DSCR_DEBUG_DEBUG_LOAD_20PF (0x01)
  1107. #define GPIO_DSCR_DEBUG_DEBUG_LOAD_10PF (0x00)
  1108. /* Bit definitions and macros for DSCR_RESET */
  1109. #define GPIO_DSCR_RESET_RESET(x) (((x)&0x03))
  1110. #define GPIO_DSCR_RESET_RESET_LOAD_50PF (0x03)
  1111. #define GPIO_DSCR_RESET_RESET_LOAD_30PF (0x02)
  1112. #define GPIO_DSCR_RESET_RESET_LOAD_20PF (0x01)
  1113. #define GPIO_DSCR_RESET_RESET_LOAD_10PF (0x00)
  1114. /* Bit definitions and macros for DSCR_IRQ */
  1115. #define GPIO_DSCR_IRQ_IRQ(x) (((x)&0x03))
  1116. #define GPIO_DSCR_IRQ_IRQ_LOAD_50PF (0x03)
  1117. #define GPIO_DSCR_IRQ_IRQ_LOAD_30PF (0x02)
  1118. #define GPIO_DSCR_IRQ_IRQ_LOAD_20PF (0x01)
  1119. #define GPIO_DSCR_IRQ_IRQ_LOAD_10PF (0x00)
  1120. /* Bit definitions and macros for DSCR_USB */
  1121. #define GPIO_DSCR_USB_USB(x) (((x)&0x03))
  1122. #define GPIO_DSCR_USB_USB_LOAD_50PF (0x03)
  1123. #define GPIO_DSCR_USB_USB_LOAD_30PF (0x02)
  1124. #define GPIO_DSCR_USB_USB_LOAD_20PF (0x01)
  1125. #define GPIO_DSCR_USB_USB_LOAD_10PF (0x00)
  1126. /* Bit definitions and macros for DSCR_ATA */
  1127. #define GPIO_DSCR_ATA_ATA(x) (((x)&0x03))
  1128. #define GPIO_DSCR_ATA_ATA_LOAD_50PF (0x03)
  1129. #define GPIO_DSCR_ATA_ATA_LOAD_30PF (0x02)
  1130. #define GPIO_DSCR_ATA_ATA_LOAD_20PF (0x01)
  1131. #define GPIO_DSCR_ATA_ATA_LOAD_10PF (0x00)
  1132. /*********************************************************************
  1133. * Random Number Generator (RNG)
  1134. *********************************************************************/
  1135. /* Bit definitions and macros for RNGCR */
  1136. #define RNG_RNGCR_GO (0x00000001)
  1137. #define RNG_RNGCR_HA (0x00000002)
  1138. #define RNG_RNGCR_IM (0x00000004)
  1139. #define RNG_RNGCR_CI (0x00000008)
  1140. /* Bit definitions and macros for RNGSR */
  1141. #define RNG_RNGSR_SV (0x00000001)
  1142. #define RNG_RNGSR_LRS (0x00000002)
  1143. #define RNG_RNGSR_FUF (0x00000004)
  1144. #define RNG_RNGSR_EI (0x00000008)
  1145. #define RNG_RNGSR_OFL(x) (((x)&0x000000FF)<<8)
  1146. #define RNG_RNGSR_OFS(x) (((x)&0x000000FF)<<16)
  1147. /*********************************************************************
  1148. * SDRAM Controller (SDRAMC)
  1149. *********************************************************************/
  1150. /* Bit definitions and macros for SDMR */
  1151. #define SDRAMC_SDMR_DDR2_AD(x) (((x)&0x00003FFF)) /* Address for DDR2 */
  1152. #define SDRAMC_SDMR_CMD (0x00010000) /* Command */
  1153. #define SDRAMC_SDMR_AD(x) (((x)&0x00000FFF)<<18) /* Address */
  1154. #define SDRAMC_SDMR_BK(x) (((x)&0x00000003)<<30) /* Bank Address */
  1155. #define SDRAMC_SDMR_BK_LMR (0x00000000)
  1156. #define SDRAMC_SDMR_BK_LEMR (0x40000000)
  1157. /* Bit definitions and macros for SDCR */
  1158. #define SDRAMC_SDCR_DPD (0x00000001) /* Deep Power-Down Mode */
  1159. #define SDRAMC_SDCR_IPALL (0x00000002) /* Initiate Precharge All */
  1160. #define SDRAMC_SDCR_IREF (0x00000004) /* Initiate Refresh */
  1161. #define SDRAMC_SDCR_DQS_OE(x) (((x)&0x00000003)<<10) /* DQS Output Enable */
  1162. #define SDRAMC_SDCR_MEM_PS (0x00002000) /* Data Port Size */
  1163. #define SDRAMC_SDCR_REF_CNT(x) (((x)&0x0000003F)<<16) /* Periodic Refresh Counter */
  1164. #define SDRAMC_SDCR_OE_RULE (0x00400000) /* Drive Rule Selection */
  1165. #define SDRAMC_SDCR_ADDR_MUX(x) (((x)&0x00000003)<<24) /* Internal Address Mux Select */
  1166. #define SDRAMC_SDCR_DDR2_MODE (0x08000000) /* DDR2 Mode Select */
  1167. #define SDRAMC_SDCR_REF_EN (0x10000000) /* Refresh Enable */
  1168. #define SDRAMC_SDCR_DDR_MODE (0x20000000) /* DDR Mode Select */
  1169. #define SDRAMC_SDCR_CKE (0x40000000) /* Clock Enable */
  1170. #define SDRAMC_SDCR_MODE_EN (0x80000000) /* SDRAM Mode Register Programming Enable */
  1171. #define SDRAMC_SDCR_DQS_OE_BOTH (0x00000C000)
  1172. /* Bit definitions and macros for SDCFG1 */
  1173. #define SDRAMC_SDCFG1_WT_LAT(x) (((x)&0x00000007)<<4) /* Write Latency */
  1174. #define SDRAMC_SDCFG1_REF2ACT(x) (((x)&0x0000000F)<<8) /* Refresh to active delay */
  1175. #define SDRAMC_SDCFG1_PRE2ACT(x) (((x)&0x00000007)<<12) /* Precharge to active delay */
  1176. #define SDRAMC_SDCFG1_ACT2RW(x) (((x)&0x00000007)<<16) /* Active to read/write delay */
  1177. #define SDRAMC_SDCFG1_RD_LAT(x) (((x)&0x0000000F)<<20) /* Read CAS Latency */
  1178. #define SDRAMC_SDCFG1_SWT2RWP(x) (((x)&0x00000007)<<24) /* Single write to read/write/precharge delay */
  1179. #define SDRAMC_SDCFG1_SRD2RWP(x) (((x)&0x0000000F)<<28) /* Single read to read/write/precharge delay */
  1180. /* Bit definitions and macros for SDCFG2 */
  1181. #define SDRAMC_SDCFG2_BL(x) (((x)&0x0000000F)<<16) /* Burst Length */
  1182. #define SDRAMC_SDCFG2_BRD2W(x) (((x)&0x0000000F)<<20) /* Burst read to write delay */
  1183. #define SDRAMC_SDCFG2_BWT2RWP(x) (((x)&0x0000000F)<<24) /* Burst write to read/write/precharge delay */
  1184. #define SDRAMC_SDCFG2_BRD2RP(x) (((x)&0x0000000F)<<28) /* Burst read to read/precharge delay */
  1185. /* Bit definitions and macros for SDCS group */
  1186. #define SDRAMC_SDCS_CSSZ(x) (((x)&0x0000001F)) /* Chip-Select Size */
  1187. #define SDRAMC_SDCS_CSBA(x) (((x)&0x00000FFF)<<20) /* Chip-Select Base Address */
  1188. #define SDRAMC_SDCS_BA(x) ((x)&0xFFF00000)
  1189. #define SDRAMC_SDCS_CSSZ_DISABLE (0x00000000)
  1190. #define SDRAMC_SDCS_CSSZ_1MBYTE (0x00000013)
  1191. #define SDRAMC_SDCS_CSSZ_2MBYTE (0x00000014)
  1192. #define SDRAMC_SDCS_CSSZ_4MBYTE (0x00000015)
  1193. #define SDRAMC_SDCS_CSSZ_8MBYTE (0x00000016)
  1194. #define SDRAMC_SDCS_CSSZ_16MBYTE (0x00000017)
  1195. #define SDRAMC_SDCS_CSSZ_32MBYTE (0x00000018)
  1196. #define SDRAMC_SDCS_CSSZ_64MBYTE (0x00000019)
  1197. #define SDRAMC_SDCS_CSSZ_128MBYTE (0x0000001A)
  1198. #define SDRAMC_SDCS_CSSZ_256MBYTE (0x0000001B)
  1199. #define SDRAMC_SDCS_CSSZ_512MBYTE (0x0000001C)
  1200. #define SDRAMC_SDCS_CSSZ_1GBYTE (0x0000001D)
  1201. #define SDRAMC_SDCS_CSSZ_2GBYTE (0x0000001E)
  1202. #define SDRAMC_SDCS_CSSZ_4GBYTE (0x0000001F)
  1203. /*********************************************************************
  1204. * Synchronous Serial Interface (SSI)
  1205. *********************************************************************/
  1206. /* Bit definitions and macros for CR */
  1207. #define SSI_CR_SSI_EN (0x00000001)
  1208. #define SSI_CR_TE (0x00000002)
  1209. #define SSI_CR_RE (0x00000004)
  1210. #define SSI_CR_NET (0x00000008)
  1211. #define SSI_CR_SYN (0x00000010)
  1212. #define SSI_CR_I2S(x) (((x)&0x00000003)<<5)
  1213. #define SSI_CR_MCE (0x00000080)
  1214. #define SSI_CR_TCH (0x00000100)
  1215. #define SSI_CR_CIS (0x00000200)
  1216. #define SSI_CR_I2S_NORMAL (0x00000000)
  1217. #define SSI_CR_I2S_MASTER (0x00000020)
  1218. #define SSI_CR_I2S_SLAVE (0x00000040)
  1219. /* Bit definitions and macros for ISR */
  1220. #define SSI_ISR_TFE0 (0x00000001)
  1221. #define SSI_ISR_TFE1 (0x00000002)
  1222. #define SSI_ISR_RFF0 (0x00000004)
  1223. #define SSI_ISR_RFF1 (0x00000008)
  1224. #define SSI_ISR_RLS (0x00000010)
  1225. #define SSI_ISR_TLS (0x00000020)
  1226. #define SSI_ISR_RFS (0x00000040)
  1227. #define SSI_ISR_TFS (0x00000080)
  1228. #define SSI_ISR_TUE0 (0x00000100)
  1229. #define SSI_ISR_TUE1 (0x00000200)
  1230. #define SSI_ISR_ROE0 (0x00000400)
  1231. #define SSI_ISR_ROE1 (0x00000800)
  1232. #define SSI_ISR_TDE0 (0x00001000)
  1233. #define SSI_ISR_TDE1 (0x00002000)
  1234. #define SSI_ISR_RDR0 (0x00004000)
  1235. #define SSI_ISR_RDR1 (0x00008000)
  1236. #define SSI_ISR_RXT (0x00010000)
  1237. #define SSI_ISR_CMDDU (0x00020000)
  1238. #define SSI_ISR_CMDAU (0x00040000)
  1239. /* Bit definitions and macros for IER */
  1240. #define SSI_IER_TFE0 (0x00000001)
  1241. #define SSI_IER_TFE1 (0x00000002)
  1242. #define SSI_IER_RFF0 (0x00000004)
  1243. #define SSI_IER_RFF1 (0x00000008)
  1244. #define SSI_IER_RLS (0x00000010)
  1245. #define SSI_IER_TLS (0x00000020)
  1246. #define SSI_IER_RFS (0x00000040)
  1247. #define SSI_IER_TFS (0x00000080)
  1248. #define SSI_IER_TUE0 (0x00000100)
  1249. #define SSI_IER_TUE1 (0x00000200)
  1250. #define SSI_IER_ROE0 (0x00000400)
  1251. #define SSI_IER_ROE1 (0x00000800)
  1252. #define SSI_IER_TDE0 (0x00001000)
  1253. #define SSI_IER_TDE1 (0x00002000)
  1254. #define SSI_IER_RDR0 (0x00004000)
  1255. #define SSI_IER_RDR1 (0x00008000)
  1256. #define SSI_IER_RXT (0x00010000)
  1257. #define SSI_IER_CMDU (0x00020000)
  1258. #define SSI_IER_CMDAU (0x00040000)
  1259. #define SSI_IER_TIE (0x00080000)
  1260. #define SSI_IER_TDMAE (0x00100000)
  1261. #define SSI_IER_RIE (0x00200000)
  1262. #define SSI_IER_RDMAE (0x00400000)
  1263. /* Bit definitions and macros for TCR */
  1264. #define SSI_TCR_TEFS (0x00000001)
  1265. #define SSI_TCR_TFSL (0x00000002)
  1266. #define SSI_TCR_TFSI (0x00000004)
  1267. #define SSI_TCR_TSCKP (0x00000008)
  1268. #define SSI_TCR_TSHFD (0x00000010)
  1269. #define SSI_TCR_TXDIR (0x00000020)
  1270. #define SSI_TCR_TFDIR (0x00000040)
  1271. #define SSI_TCR_TFEN0 (0x00000080)
  1272. #define SSI_TCR_TFEN1 (0x00000100)
  1273. #define SSI_TCR_TXBIT0 (0x00000200)
  1274. /* Bit definitions and macros for RCR */
  1275. #define SSI_RCR_REFS (0x00000001)
  1276. #define SSI_RCR_RFSL (0x00000002)
  1277. #define SSI_RCR_RFSI (0x00000004)
  1278. #define SSI_RCR_RSCKP (0x00000008)
  1279. #define SSI_RCR_RSHFD (0x00000010)
  1280. #define SSI_RCR_RFEN0 (0x00000080)
  1281. #define SSI_RCR_RFEN1 (0x00000100)
  1282. #define SSI_RCR_RXBIT0 (0x00000200)
  1283. #define SSI_RCR_RXEXT (0x00000400)
  1284. /* Bit definitions and macros for CCR */
  1285. #define SSI_CCR_PM(x) (((x)&0x000000FF))
  1286. #define SSI_CCR_DC(x) (((x)&0x0000001F)<<8)
  1287. #define SSI_CCR_WL(x) (((x)&0x0000000F)<<13)
  1288. #define SSI_CCR_PSR (0x00020000)
  1289. #define SSI_CCR_DIV2 (0x00040000)
  1290. /* Bit definitions and macros for FCSR */
  1291. #define SSI_FCSR_TFWM0(x) (((x)&0x0000000F))
  1292. #define SSI_FCSR_RFWM0(x) (((x)&0x0000000F)<<4)
  1293. #define SSI_FCSR_TFCNT0(x) (((x)&0x0000000F)<<8)
  1294. #define SSI_FCSR_RFCNT0(x) (((x)&0x0000000F)<<12)
  1295. #define SSI_FCSR_TFWM1(x) (((x)&0x0000000F)<<16)
  1296. #define SSI_FCSR_RFWM1(x) (((x)&0x0000000F)<<20)
  1297. #define SSI_FCSR_TFCNT1(x) (((x)&0x0000000F)<<24)
  1298. #define SSI_FCSR_RFCNT1(x) (((x)&0x0000000F)<<28)
  1299. /* Bit definitions and macros for ACR */
  1300. #define SSI_ACR_AC97EN (0x00000001)
  1301. #define SSI_ACR_FV (0x00000002)
  1302. #define SSI_ACR_TIF (0x00000004)
  1303. #define SSI_ACR_RD (0x00000008)
  1304. #define SSI_ACR_WR (0x00000010)
  1305. #define SSI_ACR_FRDIV(x) (((x)&0x0000003F)<<5)
  1306. /* Bit definitions and macros for ACADD */
  1307. #define SSI_ACADD_SSI_ACADD(x) (((x)&0x0007FFFF))
  1308. /* Bit definitions and macros for ACDAT */
  1309. #define SSI_ACDAT_SSI_ACDAT(x) (((x)&0x0007FFFF))
  1310. /* Bit definitions and macros for ATAG */
  1311. #define SSI_ATAG_DDI_ATAG(x) (((x)&0x0000FFFF))
  1312. /*********************************************************************
  1313. * Phase Locked Loop (PLL)
  1314. *********************************************************************/
  1315. /* Bit definitions and macros for PCR */
  1316. #define PLL_PCR_OUTDIV1(x) (((x)&0x0000000F)) /* Output divider for CPU clock frequency */
  1317. #define PLL_PCR_OUTDIV2(x) (((x)&0x0000000F)<<4) /* Output divider for internal bus clock frequency */
  1318. #define PLL_PCR_OUTDIV3(x) (((x)&0x0000000F)<<8) /* Output divider for Flexbus clock frequency */
  1319. #define PLL_PCR_OUTDIV4(x) (((x)&0x0000000F)<<12) /* Output divider for PCI clock frequency */
  1320. #define PLL_PCR_OUTDIV5(x) (((x)&0x0000000F)<<16) /* Output divider for USB clock frequency */
  1321. #define PLL_PCR_PFDR(x) (((x)&0x000000FF)<<24) /* Feedback divider for VCO frequency */
  1322. #define PLL_PCR_PFDR_MASK (0x000F0000)
  1323. #define PLL_PCR_OUTDIV5_MASK (0x000F0000)
  1324. #define PLL_PCR_OUTDIV4_MASK (0x0000F000)
  1325. #define PLL_PCR_OUTDIV3_MASK (0x00000F00)
  1326. #define PLL_PCR_OUTDIV2_MASK (0x000000F0)
  1327. #define PLL_PCR_OUTDIV1_MASK (0x0000000F)
  1328. /* Bit definitions and macros for PSR */
  1329. #define PLL_PSR_LOCKS (0x00000001) /* PLL lost lock - sticky */
  1330. #define PLL_PSR_LOCK (0x00000002) /* PLL lock status */
  1331. #define PLL_PSR_LOLIRQ (0x00000004) /* PLL loss-of-lock interrupt enable */
  1332. #define PLL_PSR_LOLRE (0x00000008) /* PLL loss-of-lock reset enable */
  1333. /*********************************************************************
  1334. * PCI
  1335. *********************************************************************/
  1336. /* Bit definitions and macros for SCR */
  1337. #define PCI_SCR_PE (0x80000000) /* Parity Error detected */
  1338. #define PCI_SCR_SE (0x40000000) /* System error signalled */
  1339. #define PCI_SCR_MA (0x20000000) /* Master aboart received */
  1340. #define PCI_SCR_TR (0x10000000) /* Target abort received */
  1341. #define PCI_SCR_TS (0x08000000) /* Target abort signalled */
  1342. #define PCI_SCR_DT (0x06000000) /* PCI_DEVSEL timing */
  1343. #define PCI_SCR_DP (0x01000000) /* Master data parity err */
  1344. #define PCI_SCR_FC (0x00800000) /* Fast back-to-back */
  1345. #define PCI_SCR_R (0x00400000) /* Reserved */
  1346. #define PCI_SCR_66M (0x00200000) /* 66Mhz */
  1347. #define PCI_SCR_C (0x00100000) /* Capabilities list */
  1348. #define PCI_SCR_F (0x00000200) /* Fast back-to-back enable */
  1349. #define PCI_SCR_S (0x00000100) /* SERR enable */
  1350. #define PCI_SCR_ST (0x00000080) /* Addr and Data stepping */
  1351. #define PCI_SCR_PER (0x00000040) /* Parity error response */
  1352. #define PCI_SCR_V (0x00000020) /* VGA palette snoop enable */
  1353. #define PCI_SCR_MW (0x00000010) /* Memory write and invalidate enable */
  1354. #define PCI_SCR_SP (0x00000008) /* Special cycle monitor or ignore */
  1355. #define PCI_SCR_B (0x00000004) /* Bus master enable */
  1356. #define PCI_SCR_M (0x00000002) /* Memory access control */
  1357. #define PCI_SCR_IO (0x00000001) /* I/O access control */
  1358. #define PCI_CR1_BIST(x) ((x & 0xFF) << 24) /* Built in self test */
  1359. #define PCI_CR1_HDR(x) ((x & 0xFF) << 16) /* Header type */
  1360. #define PCI_CR1_LTMR(x) ((x & 0xF8) << 8) /* Latency timer */
  1361. #define PCI_CR1_CLS(x) (x & 0x0F) /* Cache line size */
  1362. #define PCI_BAR_BAR0(x) (x & 0xFFFC0000)
  1363. #define PCI_BAR_BAR1(x) (x & 0xFFF00000)
  1364. #define PCI_BAR_BAR2(x) (x & 0xFFC00000)
  1365. #define PCI_BAR_BAR3(x) (x & 0xFF000000)
  1366. #define PCI_BAR_BAR4(x) (x & 0xF8000000)
  1367. #define PCI_BAR_BAR5(x) (x & 0xE0000000)
  1368. #define PCI_BAR_PREF (0x00000004) /* Prefetchable access */
  1369. #define PCI_BAR_RANGE (0x00000002) /* Fixed to 00 */
  1370. #define PCI_BAR_IO_M (0x00000001) /* IO / memory space */
  1371. #define PCI_CR2_MAXLAT(x) ((x & 0xFF) << 24) /* Maximum latency */
  1372. #define PCI_CR2_MINGNT(x) ((x & 0xFF) << 16) /* Minimum grant */
  1373. #define PCI_CR2_INTPIN(x) ((x & 0xFF) << 8) /* Interrupt Pin */
  1374. #define PCI_CR2_INTLIN(x) (x & 0xFF) /* Interrupt Line */
  1375. #define PCI_GSCR_DRD (0x80000000) /* Delayed read discarded */
  1376. #define PCI_GSCR_PE (0x20000000) /* PCI_PERR detected */
  1377. #define PCI_GSCR_SE (0x10000000) /* SERR detected */
  1378. #define PCI_GSCR_ER (0x08000000) /* Error response detected */
  1379. #define PCI_GSCR_DRDE (0x00008000) /* Delayed read discarded enable */
  1380. #define PCI_GSCR_PEE (0x00002000) /* PERR detected interrupt enable */
  1381. #define PCI_GSCR_SEE (0x00001000) /* SERR detected interrupt enable */
  1382. #define PCI_GSCR_PR (0x00000001) /* PCI reset */
  1383. #define PCI_TCR1_LD (0x01000000) /* Latency rule disable */
  1384. #define PCI_TCR1_PID (0x00020000) /* Prefetch invalidate and disable */
  1385. #define PCI_TCR1_P (0x00010000) /* Prefetch reads */
  1386. #define PCI_TCR1_WCD (0x00000100) /* Write combine disable */
  1387. #define PCI_TCR1_B5E (0x00002000) /* */
  1388. #define PCI_TCR1_B4E (0x00001000) /* */
  1389. #define PCI_TCR1_B3E (0x00000800) /* */
  1390. #define PCI_TCR1_B2E (0x00000400) /* */
  1391. #define PCI_TCR1_B1E (0x00000200) /* */
  1392. #define PCI_TCR1_B0E (0x00000100) /* */
  1393. #define PCI_TCR1_CR (0x00000001) /* */
  1394. #define PCI_TBATR_BAT(x) ((x & 0xFFF) << 20)
  1395. #define PCI_TBATR_EN (0x00000001) /* Enable */
  1396. #define PCI_IWCR_W0C_IO (0x08000000) /* Windows Maps to PCI I/O */
  1397. #define PCI_IWCR_W0C_PRC_RDMUL (0x04000000) /* PCI Memory Read multiple */
  1398. #define PCI_IWCR_W0C_PRC_RDLN (0x02000000) /* PCI Memory Read line */
  1399. #define PCI_IWCR_W0C_PRC_RD (0x00000000) /* PCI Memory Read */
  1400. #define PCI_IWCR_W0C_EN (0x01000000) /* Enable - Register initialize */
  1401. #define PCI_IWCR_W1C_IO (0x00080000) /* Windows Maps to PCI I/O */
  1402. #define PCI_IWCR_W1C_PRC_RDMUL (0x00040000) /* PCI Memory Read multiple */
  1403. #define PCI_IWCR_W1C_PRC_RDLN (0x00020000) /* PCI Memory Read line */
  1404. #define PCI_IWCR_W1C_PRC_RD (0x00000000) /* PCI Memory Read */
  1405. #define PCI_IWCR_W1C_EN (0x00010000) /* Enable - Register initialize */
  1406. #define PCI_IWCR_W2C_IO (0x00000800) /* Windows Maps to PCI I/O */
  1407. #define PCI_IWCR_W2C_PRC_RDMUL (0x00000400) /* PCI Memory Read multiple */
  1408. #define PCI_IWCR_W2C_PRC_RDLN (0x00000200) /* PCI Memory Read line */
  1409. #define PCI_IWCR_W2C_PRC_RD (0x00000000) /* PCI Memory Read */
  1410. #define PCI_IWCR_W2C_EN (0x00000100) /* Enable - Register initialize */
  1411. #define PCI_ICR_REE (0x04000000) /* Retry error enable */
  1412. #define PCI_ICR_IAE (0x02000000) /* Initiator abort enable */
  1413. #define PCI_ICR_TAE (0x01000000) /* Target abort enable */
  1414. #define PCI_IDR_DEVID (
  1415. /********************************************************************/
  1416. #endif /* __MCF5445X__ */