mpc83xx.h 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278
  1. /*
  2. * Copyright (C) 2004-2006 Freescale Semiconductor, Inc.
  3. *
  4. * See file CREDITS for list of people who contributed to this
  5. * project.
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License as
  9. * published by the Free Software Foundation; either version 2 of
  10. * the License, or (at your option) any later version.
  11. */
  12. #ifndef __MPC83XX_H__
  13. #define __MPC83XX_H__
  14. #include <config.h>
  15. #if defined(CONFIG_E300)
  16. #include <asm/e300.h>
  17. #endif
  18. /* MPC83xx cpu provide RCR register to do reset thing specially
  19. */
  20. #define MPC83xx_RESET
  21. /* System reset offset (PowerPC standard)
  22. */
  23. #define EXC_OFF_SYS_RESET 0x0100
  24. #define _START_OFFSET EXC_OFF_SYS_RESET
  25. /* IMMRBAR - Internal Memory Register Base Address
  26. */
  27. #define CONFIG_DEFAULT_IMMR 0xFF400000 /* Default IMMR base address */
  28. #define IMMRBAR 0x0000 /* Register offset to immr */
  29. #define IMMRBAR_BASE_ADDR 0xFFF00000 /* Base address mask */
  30. #define IMMRBAR_RES ~(IMMRBAR_BASE_ADDR)
  31. /* LAWBAR - Local Access Window Base Address Register
  32. */
  33. #define LBLAWBAR0 0x0020 /* Register offset to immr */
  34. #define LBLAWAR0 0x0024
  35. #define LBLAWBAR1 0x0028
  36. #define LBLAWAR1 0x002C
  37. #define LBLAWBAR2 0x0030
  38. #define LBLAWAR2 0x0034
  39. #define LBLAWBAR3 0x0038
  40. #define LBLAWAR3 0x003C
  41. #define LAWBAR_BAR 0xFFFFF000 /* Base address mask */
  42. /* SPRIDR - System Part and Revision ID Register
  43. */
  44. #define SPRIDR_PARTID 0xFFFF0000 /* Part Identification */
  45. #define SPRIDR_REVID 0x0000FFFF /* Revision Identification */
  46. #define SPR_8349E_REV10 0x80300100
  47. #define SPR_8349_REV10 0x80310100
  48. #define SPR_8347E_REV10_TBGA 0x80320100
  49. #define SPR_8347_REV10_TBGA 0x80330100
  50. #define SPR_8347E_REV10_PBGA 0x80340100
  51. #define SPR_8347_REV10_PBGA 0x80350100
  52. #define SPR_8343E_REV10 0x80360100
  53. #define SPR_8343_REV10 0x80370100
  54. #define SPR_8349E_REV11 0x80300101
  55. #define SPR_8349_REV11 0x80310101
  56. #define SPR_8347E_REV11_TBGA 0x80320101
  57. #define SPR_8347_REV11_TBGA 0x80330101
  58. #define SPR_8347E_REV11_PBGA 0x80340101
  59. #define SPR_8347_REV11_PBGA 0x80350101
  60. #define SPR_8343E_REV11 0x80360101
  61. #define SPR_8343_REV11 0x80370101
  62. #define SPR_8349E_REV31 0x80300300
  63. #define SPR_8349_REV31 0x80310300
  64. #define SPR_8347E_REV31_TBGA 0x80320300
  65. #define SPR_8347_REV31_TBGA 0x80330300
  66. #define SPR_8347E_REV31_PBGA 0x80340300
  67. #define SPR_8347_REV31_PBGA 0x80350300
  68. #define SPR_8343E_REV31 0x80360300
  69. #define SPR_8343_REV31 0x80370300
  70. #define SPR_8360E_REV10 0x80480010
  71. #define SPR_8360_REV10 0x80490010
  72. #define SPR_8360E_REV11 0x80480011
  73. #define SPR_8360_REV11 0x80490011
  74. #define SPR_8360E_REV12 0x80480012
  75. #define SPR_8360_REV12 0x80490012
  76. #define SPR_8360E_REV20 0x80480020
  77. #define SPR_8360_REV20 0x80490020
  78. #define SPR_8323E_REV10 0x80620010
  79. #define SPR_8323_REV10 0x80630010
  80. #define SPR_8321E_REV10 0x80660010
  81. #define SPR_8321_REV10 0x80670010
  82. #define SPR_8323E_REV11 0x80620011
  83. #define SPR_8323_REV11 0x80630011
  84. #define SPR_8321E_REV11 0x80660011
  85. #define SPR_8321_REV11 0x80670011
  86. #define SPR_8311_REV10 0x80B30010
  87. #define SPR_8311E_REV10 0x80B20010
  88. #define SPR_8313_REV10 0x80B10010
  89. #define SPR_8313E_REV10 0x80B00010
  90. /* SPCR - System Priority Configuration Register
  91. */
  92. #define SPCR_PCIHPE 0x10000000 /* PCI Highest Priority Enable */
  93. #define SPCR_PCIHPE_SHIFT (31-3)
  94. #define SPCR_PCIPR 0x03000000 /* PCI bridge system bus request priority */
  95. #define SPCR_PCIPR_SHIFT (31-7)
  96. #define SPCR_OPT 0x00800000 /* Optimize */
  97. #define SPCR_TBEN 0x00400000 /* E300 PowerPC core time base unit enable */
  98. #define SPCR_TBEN_SHIFT (31-9)
  99. #define SPCR_COREPR 0x00300000 /* E300 PowerPC Core system bus request priority */
  100. #define SPCR_COREPR_SHIFT (31-11)
  101. #if defined(CONFIG_MPC834X)
  102. /* SPCR bits - MPC8349 specific */
  103. #define SPCR_TSEC1DP 0x00003000 /* TSEC1 data priority */
  104. #define SPCR_TSEC1DP_SHIFT (31-19)
  105. #define SPCR_TSEC1BDP 0x00000C00 /* TSEC1 buffer descriptor priority */
  106. #define SPCR_TSEC1BDP_SHIFT (31-21)
  107. #define SPCR_TSEC1EP 0x00000300 /* TSEC1 emergency priority */
  108. #define SPCR_TSEC1EP_SHIFT (31-23)
  109. #define SPCR_TSEC2DP 0x00000030 /* TSEC2 data priority */
  110. #define SPCR_TSEC2DP_SHIFT (31-27)
  111. #define SPCR_TSEC2BDP 0x0000000C /* TSEC2 buffer descriptor priority */
  112. #define SPCR_TSEC2BDP_SHIFT (31-29)
  113. #define SPCR_TSEC2EP 0x00000003 /* TSEC2 emergency priority */
  114. #define SPCR_TSEC2EP_SHIFT (31-31)
  115. #elif defined(CONFIG_MPC831X)
  116. /* SPCR bits - MPC831x specific */
  117. #define SPCR_TSECDP 0x00003000 /* TSEC data priority */
  118. #define SPCR_TSECDP_SHIFT (31-19)
  119. #define SPCR_TSECEP 0x00000C00 /* TSEC emergency priority */
  120. #define SPCR_TSECEP_SHIFT (31-21)
  121. #define SPCR_TSECBDP 0x00000300 /* TSEC buffer descriptor priority */
  122. #define SPCR_TSECBDP_SHIFT (31-23)
  123. #endif
  124. /* SICRL/H - System I/O Configuration Register Low/High
  125. */
  126. #if defined(CONFIG_MPC834X)
  127. /* SICRL bits - MPC8349 specific */
  128. #define SICRL_LDP_A 0x80000000
  129. #define SICRL_USB1 0x40000000
  130. #define SICRL_USB0 0x20000000
  131. #define SICRL_UART 0x0C000000
  132. #define SICRL_GPIO1_A 0x02000000
  133. #define SICRL_GPIO1_B 0x01000000
  134. #define SICRL_GPIO1_C 0x00800000
  135. #define SICRL_GPIO1_D 0x00400000
  136. #define SICRL_GPIO1_E 0x00200000
  137. #define SICRL_GPIO1_F 0x00180000
  138. #define SICRL_GPIO1_G 0x00040000
  139. #define SICRL_GPIO1_H 0x00020000
  140. #define SICRL_GPIO1_I 0x00010000
  141. #define SICRL_GPIO1_J 0x00008000
  142. #define SICRL_GPIO1_K 0x00004000
  143. #define SICRL_GPIO1_L 0x00003000
  144. /* SICRH bits - MPC8349 specific */
  145. #define SICRH_DDR 0x80000000
  146. #define SICRH_TSEC1_A 0x10000000
  147. #define SICRH_TSEC1_B 0x08000000
  148. #define SICRH_TSEC1_C 0x04000000
  149. #define SICRH_TSEC1_D 0x02000000
  150. #define SICRH_TSEC1_E 0x01000000
  151. #define SICRH_TSEC1_F 0x00800000
  152. #define SICRH_TSEC2_A 0x00400000
  153. #define SICRH_TSEC2_B 0x00200000
  154. #define SICRH_TSEC2_C 0x00100000
  155. #define SICRH_TSEC2_D 0x00080000
  156. #define SICRH_TSEC2_E 0x00040000
  157. #define SICRH_TSEC2_F 0x00020000
  158. #define SICRH_TSEC2_G 0x00010000
  159. #define SICRH_TSEC2_H 0x00008000
  160. #define SICRH_GPIO2_A 0x00004000
  161. #define SICRH_GPIO2_B 0x00002000
  162. #define SICRH_GPIO2_C 0x00001000
  163. #define SICRH_GPIO2_D 0x00000800
  164. #define SICRH_GPIO2_E 0x00000400
  165. #define SICRH_GPIO2_F 0x00000200
  166. #define SICRH_GPIO2_G 0x00000180
  167. #define SICRH_GPIO2_H 0x00000060
  168. #define SICRH_TSOBI1 0x00000002
  169. #define SICRH_TSOBI2 0x00000001
  170. #elif defined(CONFIG_MPC8360)
  171. /* SICRL bits - MPC8360 specific */
  172. #define SICRL_LDP_A 0xC0000000
  173. #define SICRL_LCLK_1 0x10000000
  174. #define SICRL_LCLK_2 0x08000000
  175. #define SICRL_SRCID_A 0x03000000
  176. #define SICRL_IRQ_CKSTP_A 0x00C00000
  177. /* SICRH bits - MPC8360 specific */
  178. #define SICRH_DDR 0x80000000
  179. #define SICRH_SECONDARY_DDR 0x40000000
  180. #define SICRH_SDDROE 0x20000000
  181. #define SICRH_IRQ3 0x10000000
  182. #define SICRH_UC1EOBI 0x00000004
  183. #define SICRH_UC2E1OBI 0x00000002
  184. #define SICRH_UC2E2OBI 0x00000001
  185. #elif defined(CONFIG_MPC832X)
  186. /* SICRL bits - MPC832X specific */
  187. #define SICRL_LDP_LCS_A 0x80000000
  188. #define SICRL_IRQ_CKS 0x20000000
  189. #define SICRL_PCI_MSRC 0x10000000
  190. #define SICRL_URT_CTPR 0x06000000
  191. #define SICRL_IRQ_CTPR 0x00C00000
  192. #elif defined(CONFIG_MPC831X)
  193. /* SICRL bits - MPC831x specific */
  194. #define SICRL_LBC 0x30000000
  195. #define SICRL_UART 0x0C000000
  196. #define SICRL_SPI_A 0x03000000
  197. #define SICRL_SPI_B 0x00C00000
  198. #define SICRL_SPI_C 0x00300000
  199. #define SICRL_SPI_D 0x000C0000
  200. #define SICRL_USBDR 0x00000C00
  201. #define SICRL_ETSEC1_A 0x0000000C
  202. #define SICRL_ETSEC2_A 0x00000003
  203. /* SICRH bits - MPC831x specific */
  204. #define SICRH_INTR_A 0x02000000
  205. #define SICRH_INTR_B 0x00C00000
  206. #define SICRH_IIC 0x00300000
  207. #define SICRH_ETSEC2_B 0x000C0000
  208. #define SICRH_ETSEC2_C 0x00030000
  209. #define SICRH_ETSEC2_D 0x0000C000
  210. #define SICRH_ETSEC2_E 0x00003000
  211. #define SICRH_ETSEC2_F 0x00000C00
  212. #define SICRH_ETSEC2_G 0x00000300
  213. #define SICRH_ETSEC1_B 0x00000080
  214. #define SICRH_ETSEC1_C 0x00000060
  215. #define SICRH_GTX1_DLY 0x00000008
  216. #define SICRH_GTX2_DLY 0x00000004
  217. #define SICRH_TSOBI1 0x00000002
  218. #define SICRH_TSOBI2 0x00000001
  219. #endif
  220. /* SWCRR - System Watchdog Control Register
  221. */
  222. #define SWCRR 0x0204 /* Register offset to immr */
  223. #define SWCRR_SWTC 0xFFFF0000 /* Software Watchdog Time Count */
  224. #define SWCRR_SWEN 0x00000004 /* Watchdog Enable bit */
  225. #define SWCRR_SWRI 0x00000002 /* Software Watchdog Reset/Interrupt Select bit */
  226. #define SWCRR_SWPR 0x00000001 /* Software Watchdog Counter Prescale bit */
  227. #define SWCRR_RES ~(SWCRR_SWTC | SWCRR_SWEN | SWCRR_SWRI | SWCRR_SWPR)
  228. /* SWCNR - System Watchdog Counter Register
  229. */
  230. #define SWCNR 0x0208 /* Register offset to immr */
  231. #define SWCNR_SWCN 0x0000FFFF /* Software Watchdog Count mask */
  232. #define SWCNR_RES ~(SWCNR_SWCN)
  233. /* SWSRR - System Watchdog Service Register
  234. */
  235. #define SWSRR 0x020E /* Register offset to immr */
  236. /* ACR - Arbiter Configuration Register
  237. */
  238. #define ACR_COREDIS 0x10000000 /* Core disable */
  239. #define ACR_COREDIS_SHIFT (31-7)
  240. #define ACR_PIPE_DEP 0x00070000 /* Pipeline depth */
  241. #define ACR_PIPE_DEP_SHIFT (31-15)
  242. #define ACR_PCI_RPTCNT 0x00007000 /* PCI repeat count */
  243. #define ACR_PCI_RPTCNT_SHIFT (31-19)
  244. #define ACR_RPTCNT 0x00000700 /* Repeat count */
  245. #define ACR_RPTCNT_SHIFT (31-23)
  246. #define ACR_APARK 0x00000030 /* Address parking */
  247. #define ACR_APARK_SHIFT (31-27)
  248. #define ACR_PARKM 0x0000000F /* Parking master */
  249. #define ACR_PARKM_SHIFT (31-31)
  250. /* ATR - Arbiter Timers Register
  251. */
  252. #define ATR_DTO 0x00FF0000 /* Data time out */
  253. #define ATR_ATO 0x000000FF /* Address time out */
  254. /* AER - Arbiter Event Register
  255. */
  256. #define AER_ETEA 0x00000020 /* Transfer error */
  257. #define AER_RES 0x00000010 /* Reserved transfer type */
  258. #define AER_ECW 0x00000008 /* External control word transfer type */
  259. #define AER_AO 0x00000004 /* Address Only transfer type */
  260. #define AER_DTO 0x00000002 /* Data time out */
  261. #define AER_ATO 0x00000001 /* Address time out */
  262. /* AEATR - Arbiter Event Address Register
  263. */
  264. #define AEATR_EVENT 0x07000000 /* Event type */
  265. #define AEATR_MSTR_ID 0x001F0000 /* Master Id */
  266. #define AEATR_TBST 0x00000800 /* Transfer burst */
  267. #define AEATR_TSIZE 0x00000700 /* Transfer Size */
  268. #define AEATR_TTYPE 0x0000001F /* Transfer Type */
  269. /* HRCWL - Hard Reset Configuration Word Low
  270. */
  271. #define HRCWL_LBIUCM 0x80000000
  272. #define HRCWL_LBIUCM_SHIFT 31
  273. #define HRCWL_LCL_BUS_TO_SCB_CLK_1X1 0x00000000
  274. #define HRCWL_LCL_BUS_TO_SCB_CLK_2X1 0x80000000
  275. #define HRCWL_DDRCM 0x40000000
  276. #define HRCWL_DDRCM_SHIFT 30
  277. #define HRCWL_DDR_TO_SCB_CLK_1X1 0x00000000
  278. #define HRCWL_DDR_TO_SCB_CLK_2X1 0x40000000
  279. #define HRCWL_SPMF 0x0f000000
  280. #define HRCWL_SPMF_SHIFT 24
  281. #define HRCWL_CSB_TO_CLKIN_16X1 0x00000000
  282. #define HRCWL_CSB_TO_CLKIN_1X1 0x01000000
  283. #define HRCWL_CSB_TO_CLKIN_2X1 0x02000000
  284. #define HRCWL_CSB_TO_CLKIN_3X1 0x03000000
  285. #define HRCWL_CSB_TO_CLKIN_4X1 0x04000000
  286. #define HRCWL_CSB_TO_CLKIN_5X1 0x05000000
  287. #define HRCWL_CSB_TO_CLKIN_6X1 0x06000000
  288. #define HRCWL_CSB_TO_CLKIN_7X1 0x07000000
  289. #define HRCWL_CSB_TO_CLKIN_8X1 0x08000000
  290. #define HRCWL_CSB_TO_CLKIN_9X1 0x09000000
  291. #define HRCWL_CSB_TO_CLKIN_10X1 0x0A000000
  292. #define HRCWL_CSB_TO_CLKIN_11X1 0x0B000000
  293. #define HRCWL_CSB_TO_CLKIN_12X1 0x0C000000
  294. #define HRCWL_CSB_TO_CLKIN_13X1 0x0D000000
  295. #define HRCWL_CSB_TO_CLKIN_14X1 0x0E000000
  296. #define HRCWL_CSB_TO_CLKIN_15X1 0x0F000000
  297. #define HRCWL_VCO_BYPASS 0x00000000
  298. #define HRCWL_VCO_1X2 0x00000000
  299. #define HRCWL_VCO_1X4 0x00200000
  300. #define HRCWL_VCO_1X8 0x00400000
  301. #define HRCWL_COREPLL 0x007F0000
  302. #define HRCWL_COREPLL_SHIFT 16
  303. #define HRCWL_CORE_TO_CSB_BYPASS 0x00000000
  304. #define HRCWL_CORE_TO_CSB_1X1 0x00020000
  305. #define HRCWL_CORE_TO_CSB_1_5X1 0x00030000
  306. #define HRCWL_CORE_TO_CSB_2X1 0x00040000
  307. #define HRCWL_CORE_TO_CSB_2_5X1 0x00050000
  308. #define HRCWL_CORE_TO_CSB_3X1 0x00060000
  309. #if defined(CONFIG_MPC8360) || defined(CONFIG_MPC832X)
  310. #define HRCWL_CEVCOD 0x000000C0
  311. #define HRCWL_CEVCOD_SHIFT 6
  312. #define HRCWL_CE_PLL_VCO_DIV_4 0x00000000
  313. #define HRCWL_CE_PLL_VCO_DIV_8 0x00000040
  314. #define HRCWL_CE_PLL_VCO_DIV_2 0x00000080
  315. #define HRCWL_CEPDF 0x00000020
  316. #define HRCWL_CEPDF_SHIFT 5
  317. #define HRCWL_CE_PLL_DIV_1X1 0x00000000
  318. #define HRCWL_CE_PLL_DIV_2X1 0x00000020
  319. #define HRCWL_CEPMF 0x0000001F
  320. #define HRCWL_CEPMF_SHIFT 0
  321. #define HRCWL_CE_TO_PLL_1X16_ 0x00000000
  322. #define HRCWL_CE_TO_PLL_1X2 0x00000002
  323. #define HRCWL_CE_TO_PLL_1X3 0x00000003
  324. #define HRCWL_CE_TO_PLL_1X4 0x00000004
  325. #define HRCWL_CE_TO_PLL_1X5 0x00000005
  326. #define HRCWL_CE_TO_PLL_1X6 0x00000006
  327. #define HRCWL_CE_TO_PLL_1X7 0x00000007
  328. #define HRCWL_CE_TO_PLL_1X8 0x00000008
  329. #define HRCWL_CE_TO_PLL_1X9 0x00000009
  330. #define HRCWL_CE_TO_PLL_1X10 0x0000000A
  331. #define HRCWL_CE_TO_PLL_1X11 0x0000000B
  332. #define HRCWL_CE_TO_PLL_1X12 0x0000000C
  333. #define HRCWL_CE_TO_PLL_1X13 0x0000000D
  334. #define HRCWL_CE_TO_PLL_1X14 0x0000000E
  335. #define HRCWL_CE_TO_PLL_1X15 0x0000000F
  336. #define HRCWL_CE_TO_PLL_1X16 0x00000010
  337. #define HRCWL_CE_TO_PLL_1X17 0x00000011
  338. #define HRCWL_CE_TO_PLL_1X18 0x00000012
  339. #define HRCWL_CE_TO_PLL_1X19 0x00000013
  340. #define HRCWL_CE_TO_PLL_1X20 0x00000014
  341. #define HRCWL_CE_TO_PLL_1X21 0x00000015
  342. #define HRCWL_CE_TO_PLL_1X22 0x00000016
  343. #define HRCWL_CE_TO_PLL_1X23 0x00000017
  344. #define HRCWL_CE_TO_PLL_1X24 0x00000018
  345. #define HRCWL_CE_TO_PLL_1X25 0x00000019
  346. #define HRCWL_CE_TO_PLL_1X26 0x0000001A
  347. #define HRCWL_CE_TO_PLL_1X27 0x0000001B
  348. #define HRCWL_CE_TO_PLL_1X28 0x0000001C
  349. #define HRCWL_CE_TO_PLL_1X29 0x0000001D
  350. #define HRCWL_CE_TO_PLL_1X30 0x0000001E
  351. #define HRCWL_CE_TO_PLL_1X31 0x0000001F
  352. #endif
  353. /* HRCWH - Hardware Reset Configuration Word High
  354. */
  355. #define HRCWH_PCI_HOST 0x80000000
  356. #define HRCWH_PCI_HOST_SHIFT 31
  357. #define HRCWH_PCI_AGENT 0x00000000
  358. #if defined(CONFIG_MPC834X)
  359. #define HRCWH_32_BIT_PCI 0x00000000
  360. #define HRCWH_64_BIT_PCI 0x40000000
  361. #endif
  362. #define HRCWH_PCI1_ARBITER_DISABLE 0x00000000
  363. #define HRCWH_PCI1_ARBITER_ENABLE 0x20000000
  364. #define HRCWH_PCI_ARBITER_DISABLE 0x00000000
  365. #define HRCWH_PCI_ARBITER_ENABLE 0x20000000
  366. #if defined(CONFIG_MPC834X)
  367. #define HRCWH_PCI2_ARBITER_DISABLE 0x00000000
  368. #define HRCWH_PCI2_ARBITER_ENABLE 0x10000000
  369. #elif defined(CONFIG_MPC8360)
  370. #define HRCWH_PCICKDRV_DISABLE 0x00000000
  371. #define HRCWH_PCICKDRV_ENABLE 0x10000000
  372. #endif
  373. #define HRCWH_CORE_DISABLE 0x08000000
  374. #define HRCWH_CORE_ENABLE 0x00000000
  375. #define HRCWH_FROM_0X00000100 0x00000000
  376. #define HRCWH_FROM_0XFFF00100 0x04000000
  377. #define HRCWH_BOOTSEQ_DISABLE 0x00000000
  378. #define HRCWH_BOOTSEQ_NORMAL 0x01000000
  379. #define HRCWH_BOOTSEQ_EXTENDED 0x02000000
  380. #define HRCWH_SW_WATCHDOG_DISABLE 0x00000000
  381. #define HRCWH_SW_WATCHDOG_ENABLE 0x00800000
  382. #define HRCWH_ROM_LOC_DDR_SDRAM 0x00000000
  383. #define HRCWH_ROM_LOC_PCI1 0x00100000
  384. #if defined(CONFIG_MPC834X)
  385. #define HRCWH_ROM_LOC_PCI2 0x00200000
  386. #endif
  387. #define HRCWH_ROM_LOC_LOCAL_8BIT 0x00500000
  388. #define HRCWH_ROM_LOC_LOCAL_16BIT 0x00600000
  389. #define HRCWH_ROM_LOC_LOCAL_32BIT 0x00700000
  390. #if defined(CONFIG_MPC831X)
  391. #define HRCWH_ROM_LOC_NAND_SP_8BIT 0x00100000
  392. #define HRCWH_ROM_LOC_NAND_SP_16BIT 0x00200000
  393. #define HRCWH_ROM_LOC_NAND_LP_8BIT 0x00500000
  394. #define HRCWH_ROM_LOC_NAND_LP_16BIT 0x00600000
  395. #define HRCWH_RL_EXT_LEGACY 0x00000000
  396. #define HRCWH_RL_EXT_NAND 0x00040000
  397. #define HRCWH_TSEC1M_IN_MII 0x00000000
  398. #define HRCWH_TSEC1M_IN_RMII 0x00002000
  399. #define HRCWH_TSEC1M_IN_RGMII 0x00006000
  400. #define HRCWH_TSEC1M_IN_RTBI 0x0000A000
  401. #define HRCWH_TSEC1M_IN_SGMII 0x0000C000
  402. #define HRCWH_TSEC2M_IN_MII 0x00000000
  403. #define HRCWH_TSEC2M_IN_RMII 0x00000400
  404. #define HRCWH_TSEC2M_IN_RGMII 0x00000C00
  405. #define HRCWH_TSEC2M_IN_RTBI 0x00001400
  406. #define HRCWH_TSEC2M_IN_SGMII 0x00001800
  407. #endif
  408. #if defined(CONFIG_MPC834X)
  409. #define HRCWH_TSEC1M_IN_RGMII 0x00000000
  410. #define HRCWH_TSEC1M_IN_RTBI 0x00004000
  411. #define HRCWH_TSEC1M_IN_GMII 0x00008000
  412. #define HRCWH_TSEC1M_IN_TBI 0x0000C000
  413. #define HRCWH_TSEC2M_IN_RGMII 0x00000000
  414. #define HRCWH_TSEC2M_IN_RTBI 0x00001000
  415. #define HRCWH_TSEC2M_IN_GMII 0x00002000
  416. #define HRCWH_TSEC2M_IN_TBI 0x00003000
  417. #endif
  418. #if defined(CONFIG_MPC8360)
  419. #define HRCWH_SECONDARY_DDR_DISABLE 0x00000000
  420. #define HRCWH_SECONDARY_DDR_ENABLE 0x00000010
  421. #endif
  422. #define HRCWH_BIG_ENDIAN 0x00000000
  423. #define HRCWH_LITTLE_ENDIAN 0x00000008
  424. #define HRCWH_LALE_NORMAL 0x00000000
  425. #define HRCWH_LALE_EARLY 0x00000004
  426. #define HRCWH_LDP_SET 0x00000000
  427. #define HRCWH_LDP_CLEAR 0x00000002
  428. /* RSR - Reset Status Register
  429. */
  430. #define RSR_RSTSRC 0xE0000000 /* Reset source */
  431. #define RSR_RSTSRC_SHIFT 29
  432. #define RSR_BSF 0x00010000 /* Boot seq. fail */
  433. #define RSR_BSF_SHIFT 16
  434. #define RSR_SWSR 0x00002000 /* software soft reset */
  435. #define RSR_SWSR_SHIFT 13
  436. #define RSR_SWHR 0x00001000 /* software hard reset */
  437. #define RSR_SWHR_SHIFT 12
  438. #define RSR_JHRS 0x00000200 /* jtag hreset */
  439. #define RSR_JHRS_SHIFT 9
  440. #define RSR_JSRS 0x00000100 /* jtag sreset status */
  441. #define RSR_JSRS_SHIFT 8
  442. #define RSR_CSHR 0x00000010 /* checkstop reset status */
  443. #define RSR_CSHR_SHIFT 4
  444. #define RSR_SWRS 0x00000008 /* software watchdog reset status */
  445. #define RSR_SWRS_SHIFT 3
  446. #define RSR_BMRS 0x00000004 /* bus monitop reset status */
  447. #define RSR_BMRS_SHIFT 2
  448. #define RSR_SRS 0x00000002 /* soft reset status */
  449. #define RSR_SRS_SHIFT 1
  450. #define RSR_HRS 0x00000001 /* hard reset status */
  451. #define RSR_HRS_SHIFT 0
  452. #define RSR_RES ~(RSR_RSTSRC | RSR_BSF | RSR_SWSR | RSR_SWHR |\
  453. RSR_JHRS | RSR_JSRS | RSR_CSHR | RSR_SWRS |\
  454. RSR_BMRS | RSR_SRS | RSR_HRS)
  455. /* RMR - Reset Mode Register
  456. */
  457. #define RMR_CSRE 0x00000001 /* checkstop reset enable */
  458. #define RMR_CSRE_SHIFT 0
  459. #define RMR_RES ~(RMR_CSRE)
  460. /* RCR - Reset Control Register
  461. */
  462. #define RCR_SWHR 0x00000002 /* software hard reset */
  463. #define RCR_SWSR 0x00000001 /* software soft reset */
  464. #define RCR_RES ~(RCR_SWHR | RCR_SWSR)
  465. /* RCER - Reset Control Enable Register
  466. */
  467. #define RCER_CRE 0x00000001 /* software hard reset */
  468. #define RCER_RES ~(RCER_CRE)
  469. /* SPMR - System PLL Mode Register
  470. */
  471. #define SPMR_LBIUCM 0x80000000
  472. #define SPMR_DDRCM 0x40000000
  473. #define SPMR_SPMF 0x0F000000
  474. #define SPMR_CKID 0x00800000
  475. #define SPMR_CKID_SHIFT 23
  476. #define SPMR_COREPLL 0x007F0000
  477. #define SPMR_CEVCOD 0x000000C0
  478. #define SPMR_CEPDF 0x00000020
  479. #define SPMR_CEPMF 0x0000001F
  480. /* OCCR - Output Clock Control Register
  481. */
  482. #define OCCR_PCICOE0 0x80000000
  483. #define OCCR_PCICOE1 0x40000000
  484. #define OCCR_PCICOE2 0x20000000
  485. #define OCCR_PCICOE3 0x10000000
  486. #define OCCR_PCICOE4 0x08000000
  487. #define OCCR_PCICOE5 0x04000000
  488. #define OCCR_PCICOE6 0x02000000
  489. #define OCCR_PCICOE7 0x01000000
  490. #define OCCR_PCICD0 0x00800000
  491. #define OCCR_PCICD1 0x00400000
  492. #define OCCR_PCICD2 0x00200000
  493. #define OCCR_PCICD3 0x00100000
  494. #define OCCR_PCICD4 0x00080000
  495. #define OCCR_PCICD5 0x00040000
  496. #define OCCR_PCICD6 0x00020000
  497. #define OCCR_PCICD7 0x00010000
  498. #define OCCR_PCI1CR 0x00000002
  499. #define OCCR_PCI2CR 0x00000001
  500. #define OCCR_PCICR OCCR_PCI1CR
  501. /* SCCR - System Clock Control Register
  502. */
  503. #define SCCR_ENCCM 0x03000000
  504. #define SCCR_ENCCM_SHIFT 24
  505. #define SCCR_ENCCM_0 0x00000000
  506. #define SCCR_ENCCM_1 0x01000000
  507. #define SCCR_ENCCM_2 0x02000000
  508. #define SCCR_ENCCM_3 0x03000000
  509. #define SCCR_PCICM 0x00010000
  510. #define SCCR_PCICM_SHIFT 16
  511. /* SCCR bits - MPC8349 specific */
  512. #ifdef CONFIG_MPC834X
  513. #define SCCR_TSEC1CM 0xc0000000
  514. #define SCCR_TSEC1CM_SHIFT 30
  515. #define SCCR_TSEC1CM_0 0x00000000
  516. #define SCCR_TSEC1CM_1 0x40000000
  517. #define SCCR_TSEC1CM_2 0x80000000
  518. #define SCCR_TSEC1CM_3 0xC0000000
  519. #define SCCR_TSEC2CM 0x30000000
  520. #define SCCR_TSEC2CM_SHIFT 28
  521. #define SCCR_TSEC2CM_0 0x00000000
  522. #define SCCR_TSEC2CM_1 0x10000000
  523. #define SCCR_TSEC2CM_2 0x20000000
  524. #define SCCR_TSEC2CM_3 0x30000000
  525. #elif defined(CONFIG_MPC831X)
  526. /* TSEC1 bits are for TSEC2 as well */
  527. #define SCCR_TSEC1CM 0xc0000000
  528. #define SCCR_TSEC1CM_SHIFT 30
  529. #define SCCR_TSEC1CM_1 0x40000000
  530. #define SCCR_TSEC1CM_2 0x80000000
  531. #define SCCR_TSEC1CM_3 0xC0000000
  532. #define SCCR_TSEC1ON 0x20000000
  533. #define SCCR_TSEC2ON 0x10000000
  534. #endif
  535. #define SCCR_USBMPHCM 0x00c00000
  536. #define SCCR_USBMPHCM_SHIFT 22
  537. #define SCCR_USBDRCM 0x00300000
  538. #define SCCR_USBDRCM_SHIFT 20
  539. #define SCCR_USBCM_0 0x00000000
  540. #define SCCR_USBCM_1 0x00500000
  541. #define SCCR_USBCM_2 0x00A00000
  542. #define SCCR_USBCM_3 0x00F00000
  543. /* CSn_BDNS - Chip Select memory Bounds Register
  544. */
  545. #define CSBNDS_SA 0x00FF0000
  546. #define CSBNDS_SA_SHIFT 8
  547. #define CSBNDS_EA 0x000000FF
  548. #define CSBNDS_EA_SHIFT 24
  549. /* CSn_CONFIG - Chip Select Configuration Register
  550. */
  551. #define CSCONFIG_EN 0x80000000
  552. #define CSCONFIG_AP 0x00800000
  553. #define CSCONFIG_ROW_BIT 0x00000700
  554. #define CSCONFIG_ROW_BIT_12 0x00000000
  555. #define CSCONFIG_ROW_BIT_13 0x00000100
  556. #define CSCONFIG_ROW_BIT_14 0x00000200
  557. #define CSCONFIG_COL_BIT 0x00000007
  558. #define CSCONFIG_COL_BIT_8 0x00000000
  559. #define CSCONFIG_COL_BIT_9 0x00000001
  560. #define CSCONFIG_COL_BIT_10 0x00000002
  561. #define CSCONFIG_COL_BIT_11 0x00000003
  562. /* TIMING_CFG_0 - DDR SDRAM Timing Configuration 0
  563. */
  564. #define TIMING_CFG0_RWT 0xC0000000
  565. #define TIMING_CFG0_RWT_SHIFT 30
  566. #define TIMING_CFG0_WRT 0x30000000
  567. #define TIMING_CFG0_WRT_SHIFT 28
  568. #define TIMING_CFG0_RRT 0x0C000000
  569. #define TIMING_CFG0_RRT_SHIFT 26
  570. #define TIMING_CFG0_WWT 0x03000000
  571. #define TIMING_CFG0_WWT_SHIFT 24
  572. #define TIMING_CFG0_ACT_PD_EXIT 0x00700000
  573. #define TIMING_CFG0_ACT_PD_EXIT_SHIFT 20
  574. #define TIMING_CFG0_PRE_PD_EXIT 0x00070000
  575. #define TIMING_CFG0_PRE_PD_EXIT_SHIFT 16
  576. #define TIMING_CFG0_ODT_PD_EXIT 0x00000F00
  577. #define TIMING_CFG0_ODT_PD_EXIT_SHIFT 8
  578. #define TIMING_CFG0_MRS_CYC 0x00000F00
  579. #define TIMING_CFG0_MRS_CYC_SHIFT 0
  580. /* TIMING_CFG_1 - DDR SDRAM Timing Configuration 1
  581. */
  582. #define TIMING_CFG1_PRETOACT 0x70000000
  583. #define TIMING_CFG1_PRETOACT_SHIFT 28
  584. #define TIMING_CFG1_ACTTOPRE 0x0F000000
  585. #define TIMING_CFG1_ACTTOPRE_SHIFT 24
  586. #define TIMING_CFG1_ACTTORW 0x00700000
  587. #define TIMING_CFG1_ACTTORW_SHIFT 20
  588. #define TIMING_CFG1_CASLAT 0x00070000
  589. #define TIMING_CFG1_CASLAT_SHIFT 16
  590. #define TIMING_CFG1_REFREC 0x0000F000
  591. #define TIMING_CFG1_REFREC_SHIFT 12
  592. #define TIMING_CFG1_WRREC 0x00000700
  593. #define TIMING_CFG1_WRREC_SHIFT 8
  594. #define TIMING_CFG1_ACTTOACT 0x00000070
  595. #define TIMING_CFG1_ACTTOACT_SHIFT 4
  596. #define TIMING_CFG1_WRTORD 0x00000007
  597. #define TIMING_CFG1_WRTORD_SHIFT 0
  598. #define TIMING_CFG1_CASLAT_20 0x00030000 /* CAS latency = 2.0 */
  599. #define TIMING_CFG1_CASLAT_25 0x00040000 /* CAS latency = 2.5 */
  600. /* TIMING_CFG_2 - DDR SDRAM Timing Configuration 2
  601. */
  602. #define TIMING_CFG2_CPO 0x0F800000
  603. #define TIMING_CFG2_CPO_SHIFT 23
  604. #define TIMING_CFG2_ACSM 0x00080000
  605. #define TIMING_CFG2_WR_DATA_DELAY 0x00001C00
  606. #define TIMING_CFG2_WR_DATA_DELAY_SHIFT 10
  607. #define TIMING_CFG2_CPO_DEF 0x00000000 /* default (= CASLAT + 1) */
  608. #define TIMING_CFG2_ADD_LAT 0x70000000
  609. #define TIMING_CFG2_ADD_LAT_SHIFT 28
  610. #define TIMING_CFG2_WR_LAT_DELAY 0x00380000
  611. #define TIMING_CFG2_WR_LAT_DELAY_SHIFT 19
  612. #define TIMING_CFG2_RD_TO_PRE 0x0000E000
  613. #define TIMING_CFG2_RD_TO_PRE_SHIFT 13
  614. #define TIMING_CFG2_CKE_PLS 0x000001C0
  615. #define TIMING_CFG2_CKE_PLS_SHIFT 6
  616. #define TIMING_CFG2_FOUR_ACT 0x0000003F
  617. #define TIMING_CFG2_FOUR_ACT_SHIFT 0
  618. /* DDR_SDRAM_CFG - DDR SDRAM Control Configuration
  619. */
  620. #define SDRAM_CFG_MEM_EN 0x80000000
  621. #define SDRAM_CFG_SREN 0x40000000
  622. #define SDRAM_CFG_ECC_EN 0x20000000
  623. #define SDRAM_CFG_RD_EN 0x10000000
  624. #define SDRAM_CFG_SDRAM_TYPE 0x03000000
  625. #define SDRAM_CFG_SDRAM_TYPE_DDR 0x02000000
  626. #define SDRAM_CFG_SDRAM_TYPE_SHIFT 24
  627. #define SDRAM_CFG_DYN_PWR 0x00200000
  628. #define SDRAM_CFG_32_BE 0x00080000
  629. #define SDRAM_CFG_8_BE 0x00040000
  630. #define SDRAM_CFG_NCAP 0x00020000
  631. #define SDRAM_CFG_2T_EN 0x00008000
  632. #define SDRAM_CFG_BI 0x00000001
  633. /* DDR_SDRAM_MODE - DDR SDRAM Mode Register
  634. */
  635. #define SDRAM_MODE_ESD 0xFFFF0000
  636. #define SDRAM_MODE_ESD_SHIFT 16
  637. #define SDRAM_MODE_SD 0x0000FFFF
  638. #define SDRAM_MODE_SD_SHIFT 0
  639. #define DDR_MODE_EXT_MODEREG 0x4000 /* select extended mode reg */
  640. #define DDR_MODE_EXT_OPMODE 0x3FF8 /* operating mode, mask */
  641. #define DDR_MODE_EXT_OP_NORMAL 0x0000 /* normal operation */
  642. #define DDR_MODE_QFC 0x0004 /* QFC / compatibility, mask */
  643. #define DDR_MODE_QFC_COMP 0x0000 /* compatible to older SDRAMs */
  644. #define DDR_MODE_WEAK 0x0002 /* weak drivers */
  645. #define DDR_MODE_DLL_DIS 0x0001 /* disable DLL */
  646. #define DDR_MODE_CASLAT 0x0070 /* CAS latency, mask */
  647. #define DDR_MODE_CASLAT_15 0x0010 /* CAS latency 1.5 */
  648. #define DDR_MODE_CASLAT_20 0x0020 /* CAS latency 2 */
  649. #define DDR_MODE_CASLAT_25 0x0060 /* CAS latency 2.5 */
  650. #define DDR_MODE_CASLAT_30 0x0030 /* CAS latency 3 */
  651. #define DDR_MODE_BTYPE_SEQ 0x0000 /* sequential burst */
  652. #define DDR_MODE_BTYPE_ILVD 0x0008 /* interleaved burst */
  653. #define DDR_MODE_BLEN_2 0x0001 /* burst length 2 */
  654. #define DDR_MODE_BLEN_4 0x0002 /* burst length 4 */
  655. #define DDR_REFINT_166MHZ_7US 1302 /* exact value for 7.8125us */
  656. #define DDR_BSTOPRE 256 /* use 256 cycles as a starting point */
  657. #define DDR_MODE_MODEREG 0x0000 /* select mode register */
  658. /* DDR_SDRAM_INTERVAL - DDR SDRAM Interval Register
  659. */
  660. #define SDRAM_INTERVAL_REFINT 0x3FFF0000
  661. #define SDRAM_INTERVAL_REFINT_SHIFT 16
  662. #define SDRAM_INTERVAL_BSTOPRE 0x00003FFF
  663. #define SDRAM_INTERVAL_BSTOPRE_SHIFT 0
  664. /* DDR_SDRAM_CLK_CNTL - DDR SDRAM Clock Control Register
  665. */
  666. #define DDR_SDRAM_CLK_CNTL_SS_EN 0x80000000
  667. #define DDR_SDRAM_CLK_CNTL_CLK_ADJUST_025 0x01000000
  668. #define DDR_SDRAM_CLK_CNTL_CLK_ADJUST_05 0x02000000
  669. #define DDR_SDRAM_CLK_CNTL_CLK_ADJUST_075 0x03000000
  670. #define DDR_SDRAM_CLK_CNTL_CLK_ADJUST_1 0x04000000
  671. /* ECC_ERR_INJECT - Memory data path error injection mask ECC
  672. */
  673. #define ECC_ERR_INJECT_EMB (0x80000000>>22) /* ECC Mirror Byte */
  674. #define ECC_ERR_INJECT_EIEN (0x80000000>>23) /* Error Injection Enable */
  675. #define ECC_ERR_INJECT_EEIM (0xff000000>>24) /* ECC Erroe Injection Enable */
  676. #define ECC_ERR_INJECT_EEIM_SHIFT 0
  677. /* CAPTURE_ECC - Memory data path read capture ECC
  678. */
  679. #define CAPTURE_ECC_ECE (0xff000000>>24)
  680. #define CAPTURE_ECC_ECE_SHIFT 0
  681. /* ERR_DETECT - Memory error detect
  682. */
  683. #define ECC_ERROR_DETECT_MME (0x80000000>>0) /* Multiple Memory Errors */
  684. #define ECC_ERROR_DETECT_MBE (0x80000000>>28) /* Multiple-Bit Error */
  685. #define ECC_ERROR_DETECT_SBE (0x80000000>>29) /* Single-Bit ECC Error Pickup */
  686. #define ECC_ERROR_DETECT_MSE (0x80000000>>31) /* Memory Select Error */
  687. /* ERR_DISABLE - Memory error disable
  688. */
  689. #define ECC_ERROR_DISABLE_MBED (0x80000000>>28) /* Multiple-Bit ECC Error Disable */
  690. #define ECC_ERROR_DISABLE_SBED (0x80000000>>29) /* Sinle-Bit ECC Error disable */
  691. #define ECC_ERROR_DISABLE_MSED (0x80000000>>31) /* Memory Select Error Disable */
  692. #define ECC_ERROR_ENABLE ~(ECC_ERROR_DISABLE_MSED | ECC_ERROR_DISABLE_SBED |\
  693. ECC_ERROR_DISABLE_MBED)
  694. /* ERR_INT_EN - Memory error interrupt enable
  695. */
  696. #define ECC_ERR_INT_EN_MBEE (0x80000000>>28) /* Multiple-Bit ECC Error Interrupt Enable */
  697. #define ECC_ERR_INT_EN_SBEE (0x80000000>>29) /* Single-Bit ECC Error Interrupt Enable */
  698. #define ECC_ERR_INT_EN_MSEE (0x80000000>>31) /* Memory Select Error Interrupt Enable */
  699. #define ECC_ERR_INT_DISABLE ~(ECC_ERR_INT_EN_MBEE | ECC_ERR_INT_EN_SBEE |\
  700. ECC_ERR_INT_EN_MSEE)
  701. /* CAPTURE_ATTRIBUTES - Memory error attributes capture
  702. */
  703. #define ECC_CAPT_ATTR_BNUM (0xe0000000>>1) /* Data Beat Num */
  704. #define ECC_CAPT_ATTR_BNUM_SHIFT 28
  705. #define ECC_CAPT_ATTR_TSIZ (0xc0000000>>6) /* Transaction Size */
  706. #define ECC_CAPT_ATTR_TSIZ_FOUR_DW 0
  707. #define ECC_CAPT_ATTR_TSIZ_ONE_DW 1
  708. #define ECC_CAPT_ATTR_TSIZ_TWO_DW 2
  709. #define ECC_CAPT_ATTR_TSIZ_THREE_DW 3
  710. #define ECC_CAPT_ATTR_TSIZ_SHIFT 24
  711. #define ECC_CAPT_ATTR_TSRC (0xf8000000>>11) /* Transaction Source */
  712. #define ECC_CAPT_ATTR_TSRC_E300_CORE_DT 0x0
  713. #define ECC_CAPT_ATTR_TSRC_E300_CORE_IF 0x2
  714. #define ECC_CAPT_ATTR_TSRC_TSEC1 0x4
  715. #define ECC_CAPT_ATTR_TSRC_TSEC2 0x5
  716. #define ECC_CAPT_ATTR_TSRC_USB (0x06|0x07)
  717. #define ECC_CAPT_ATTR_TSRC_ENCRYPT 0x8
  718. #define ECC_CAPT_ATTR_TSRC_I2C 0x9
  719. #define ECC_CAPT_ATTR_TSRC_JTAG 0xA
  720. #define ECC_CAPT_ATTR_TSRC_PCI1 0xD
  721. #define ECC_CAPT_ATTR_TSRC_PCI2 0xE
  722. #define ECC_CAPT_ATTR_TSRC_DMA 0xF
  723. #define ECC_CAPT_ATTR_TSRC_SHIFT 16
  724. #define ECC_CAPT_ATTR_TTYP (0xe0000000>>18) /* Transaction Type */
  725. #define ECC_CAPT_ATTR_TTYP_WRITE 0x1
  726. #define ECC_CAPT_ATTR_TTYP_READ 0x2
  727. #define ECC_CAPT_ATTR_TTYP_R_M_W 0x3
  728. #define ECC_CAPT_ATTR_TTYP_SHIFT 12
  729. #define ECC_CAPT_ATTR_VLD (0x80000000>>31) /* Valid */
  730. /* ERR_SBE - Single bit ECC memory error management
  731. */
  732. #define ECC_ERROR_MAN_SBET (0xff000000>>8) /* Single-Bit Error Threshold 0..255 */
  733. #define ECC_ERROR_MAN_SBET_SHIFT 16
  734. #define ECC_ERROR_MAN_SBEC (0xff000000>>24) /* Single Bit Error Counter 0..255 */
  735. #define ECC_ERROR_MAN_SBEC_SHIFT 0
  736. /* BR - Base Registers
  737. */
  738. #define BR0 0x5000 /* Register offset to immr */
  739. #define BR1 0x5008
  740. #define BR2 0x5010
  741. #define BR3 0x5018
  742. #define BR4 0x5020
  743. #define BR5 0x5028
  744. #define BR6 0x5030
  745. #define BR7 0x5038
  746. #define BR_BA 0xFFFF8000
  747. #define BR_BA_SHIFT 15
  748. #define BR_PS 0x00001800
  749. #define BR_PS_SHIFT 11
  750. #define BR_PS_8 0x00000800 /* Port Size 8 bit */
  751. #define BR_PS_16 0x00001000 /* Port Size 16 bit */
  752. #define BR_PS_32 0x00001800 /* Port Size 32 bit */
  753. #define BR_DECC 0x00000600
  754. #define BR_DECC_SHIFT 9
  755. #define BR_DECC_OFF 0x00000000
  756. #define BR_DECC_CHK 0x00000200
  757. #define BR_DECC_CHK_GEN 0x00000400
  758. #define BR_WP 0x00000100
  759. #define BR_WP_SHIFT 8
  760. #define BR_MSEL 0x000000E0
  761. #define BR_MSEL_SHIFT 5
  762. #define BR_MS_GPCM 0x00000000 /* GPCM */
  763. #define BR_MS_FCM 0x00000020 /* FCM */
  764. #define BR_MS_SDRAM 0x00000060 /* SDRAM */
  765. #define BR_MS_UPMA 0x00000080 /* UPMA */
  766. #define BR_MS_UPMB 0x000000A0 /* UPMB */
  767. #define BR_MS_UPMC 0x000000C0 /* UPMC */
  768. #if defined(CONFIG_MPC8360) || defined(CONFIG_MPC832X)
  769. #define BR_ATOM 0x0000000C
  770. #define BR_ATOM_SHIFT 2
  771. #endif
  772. #define BR_V 0x00000001
  773. #define BR_V_SHIFT 0
  774. #if defined(CONFIG_MPC834X)
  775. #define BR_RES ~(BR_BA | BR_PS | BR_DECC | BR_WP | BR_MSEL | BR_V)
  776. #elif defined(CONFIG_MPC8360)
  777. #define BR_RES ~(BR_BA | BR_PS | BR_DECC | BR_WP | BR_MSEL | BR_ATOM | BR_V)
  778. #endif
  779. /* OR - Option Registers
  780. */
  781. #define OR0 0x5004 /* Register offset to immr */
  782. #define OR1 0x500C
  783. #define OR2 0x5014
  784. #define OR3 0x501C
  785. #define OR4 0x5024
  786. #define OR5 0x502C
  787. #define OR6 0x5034
  788. #define OR7 0x503C
  789. #define OR_GPCM_AM 0xFFFF8000
  790. #define OR_GPCM_AM_SHIFT 15
  791. #define OR_GPCM_BCTLD 0x00001000
  792. #define OR_GPCM_BCTLD_SHIFT 12
  793. #define OR_GPCM_CSNT 0x00000800
  794. #define OR_GPCM_CSNT_SHIFT 11
  795. #define OR_GPCM_ACS 0x00000600
  796. #define OR_GPCM_ACS_SHIFT 9
  797. #define OR_GPCM_ACS_0b10 0x00000400
  798. #define OR_GPCM_ACS_0b11 0x00000600
  799. #define OR_GPCM_XACS 0x00000100
  800. #define OR_GPCM_XACS_SHIFT 8
  801. #define OR_GPCM_SCY 0x000000F0
  802. #define OR_GPCM_SCY_SHIFT 4
  803. #define OR_GPCM_SCY_1 0x00000010
  804. #define OR_GPCM_SCY_2 0x00000020
  805. #define OR_GPCM_SCY_3 0x00000030
  806. #define OR_GPCM_SCY_4 0x00000040
  807. #define OR_GPCM_SCY_5 0x00000050
  808. #define OR_GPCM_SCY_6 0x00000060
  809. #define OR_GPCM_SCY_7 0x00000070
  810. #define OR_GPCM_SCY_8 0x00000080
  811. #define OR_GPCM_SCY_9 0x00000090
  812. #define OR_GPCM_SCY_10 0x000000a0
  813. #define OR_GPCM_SCY_11 0x000000b0
  814. #define OR_GPCM_SCY_12 0x000000c0
  815. #define OR_GPCM_SCY_13 0x000000d0
  816. #define OR_GPCM_SCY_14 0x000000e0
  817. #define OR_GPCM_SCY_15 0x000000f0
  818. #define OR_GPCM_SETA 0x00000008
  819. #define OR_GPCM_SETA_SHIFT 3
  820. #define OR_GPCM_TRLX 0x00000004
  821. #define OR_GPCM_TRLX_SHIFT 2
  822. #define OR_GPCM_EHTR 0x00000002
  823. #define OR_GPCM_EHTR_SHIFT 1
  824. #define OR_GPCM_EAD 0x00000001
  825. #define OR_GPCM_EAD_SHIFT 0
  826. #define OR_FCM_AM 0xFFFF8000
  827. #define OR_FCM_AM_SHIFT 15
  828. #define OR_FCM_BCTLD 0x00001000
  829. #define OR_FCM_BCTLD_SHIFT 12
  830. #define OR_FCM_PGS 0x00000400
  831. #define OR_FCM_PGS_SHIFT 10
  832. #define OR_FCM_CSCT 0x00000200
  833. #define OR_FCM_CSCT_SHIFT 9
  834. #define OR_FCM_CST 0x00000100
  835. #define OR_FCM_CST_SHIFT 8
  836. #define OR_FCM_CHT 0x00000080
  837. #define OR_FCM_CHT_SHIFT 7
  838. #define OR_FCM_SCY 0x00000070
  839. #define OR_FCM_SCY_SHIFT 4
  840. #define OR_FCM_SCY_1 0x00000010
  841. #define OR_FCM_SCY_2 0x00000020
  842. #define OR_FCM_SCY_3 0x00000030
  843. #define OR_FCM_SCY_4 0x00000040
  844. #define OR_FCM_SCY_5 0x00000050
  845. #define OR_FCM_SCY_6 0x00000060
  846. #define OR_FCM_SCY_7 0x00000070
  847. #define OR_FCM_RST 0x00000008
  848. #define OR_FCM_RST_SHIFT 3
  849. #define OR_FCM_TRLX 0x00000004
  850. #define OR_FCM_TRLX_SHIFT 2
  851. #define OR_FCM_EHTR 0x00000002
  852. #define OR_FCM_EHTR_SHIFT 1
  853. #define OR_UPM_AM 0xFFFF8000
  854. #define OR_UPM_AM_SHIFT 15
  855. #define OR_UPM_XAM 0x00006000
  856. #define OR_UPM_XAM_SHIFT 13
  857. #define OR_UPM_BCTLD 0x00001000
  858. #define OR_UPM_BCTLD_SHIFT 12
  859. #define OR_UPM_BI 0x00000100
  860. #define OR_UPM_BI_SHIFT 8
  861. #define OR_UPM_TRLX 0x00000004
  862. #define OR_UPM_TRLX_SHIFT 2
  863. #define OR_UPM_EHTR 0x00000002
  864. #define OR_UPM_EHTR_SHIFT 1
  865. #define OR_UPM_EAD 0x00000001
  866. #define OR_UPM_EAD_SHIFT 0
  867. #define OR_SDRAM_AM 0xFFFF8000
  868. #define OR_SDRAM_AM_SHIFT 15
  869. #define OR_SDRAM_XAM 0x00006000
  870. #define OR_SDRAM_XAM_SHIFT 13
  871. #define OR_SDRAM_COLS 0x00001C00
  872. #define OR_SDRAM_COLS_SHIFT 10
  873. #define OR_SDRAM_ROWS 0x000001C0
  874. #define OR_SDRAM_ROWS_SHIFT 6
  875. #define OR_SDRAM_PMSEL 0x00000020
  876. #define OR_SDRAM_PMSEL_SHIFT 5
  877. #define OR_SDRAM_EAD 0x00000001
  878. #define OR_SDRAM_EAD_SHIFT 0
  879. #define OR_AM_32KB 0xFFFF8000
  880. #define OR_AM_64KB 0xFFFF0000
  881. #define OR_AM_128KB 0xFFFE0000
  882. #define OR_AM_256KB 0xFFFC0000
  883. #define OR_AM_512KB 0xFFF80000
  884. #define OR_AM_1MB 0xFFF00000
  885. #define OR_AM_2MB 0xFFE00000
  886. #define OR_AM_4MB 0xFFC00000
  887. #define OR_AM_8MB 0xFF800000
  888. #define OR_AM_16MB 0xFF000000
  889. #define OR_AM_32MB 0xFE000000
  890. #define OR_AM_64MB 0xFC000000
  891. #define OR_AM_128MB 0xF8000000
  892. #define OR_AM_256MB 0xF0000000
  893. #define OR_AM_512MB 0xE0000000
  894. #define OR_AM_1GB 0xC0000000
  895. #define OR_AM_2GB 0x80000000
  896. #define OR_AM_4GB 0x00000000
  897. #define LBLAWAR_EN 0x80000000
  898. #define LBLAWAR_4KB 0x0000000B
  899. #define LBLAWAR_8KB 0x0000000C
  900. #define LBLAWAR_16KB 0x0000000D
  901. #define LBLAWAR_32KB 0x0000000E
  902. #define LBLAWAR_64KB 0x0000000F
  903. #define LBLAWAR_128KB 0x00000010
  904. #define LBLAWAR_256KB 0x00000011
  905. #define LBLAWAR_512KB 0x00000012
  906. #define LBLAWAR_1MB 0x00000013
  907. #define LBLAWAR_2MB 0x00000014
  908. #define LBLAWAR_4MB 0x00000015
  909. #define LBLAWAR_8MB 0x00000016
  910. #define LBLAWAR_16MB 0x00000017
  911. #define LBLAWAR_32MB 0x00000018
  912. #define LBLAWAR_64MB 0x00000019
  913. #define LBLAWAR_128MB 0x0000001A
  914. #define LBLAWAR_256MB 0x0000001B
  915. #define LBLAWAR_512MB 0x0000001C
  916. #define LBLAWAR_1GB 0x0000001D
  917. #define LBLAWAR_2GB 0x0000001E
  918. /* LBCR - Local Bus Configuration Register
  919. */
  920. #define LBCR_LDIS 0x80000000
  921. #define LBCR_LDIS_SHIFT 31
  922. #define LBCR_BCTLC 0x00C00000
  923. #define LBCR_BCTLC_SHIFT 22
  924. #define LBCR_LPBSE 0x00020000
  925. #define LBCR_LPBSE_SHIFT 17
  926. #define LBCR_EPAR 0x00010000
  927. #define LBCR_EPAR_SHIFT 16
  928. #define LBCR_BMT 0x0000FF00
  929. #define LBCR_BMT_SHIFT 8
  930. /* LCRR - Clock Ratio Register
  931. */
  932. #define LCRR_DBYP 0x80000000
  933. #define LCRR_DBYP_SHIFT 31
  934. #define LCRR_BUFCMDC 0x30000000
  935. #define LCRR_BUFCMDC_SHIFT 28
  936. #define LCRR_BUFCMDC_1 0x10000000
  937. #define LCRR_BUFCMDC_2 0x20000000
  938. #define LCRR_BUFCMDC_3 0x30000000
  939. #define LCRR_BUFCMDC_4 0x00000000
  940. #define LCRR_ECL 0x03000000
  941. #define LCRR_ECL_SHIFT 24
  942. #define LCRR_ECL_4 0x00000000
  943. #define LCRR_ECL_5 0x01000000
  944. #define LCRR_ECL_6 0x02000000
  945. #define LCRR_ECL_7 0x03000000
  946. #define LCRR_EADC 0x00030000
  947. #define LCRR_EADC_SHIFT 16
  948. #define LCRR_EADC_1 0x00010000
  949. #define LCRR_EADC_2 0x00020000
  950. #define LCRR_EADC_3 0x00030000
  951. #define LCRR_EADC_4 0x00000000
  952. #define LCRR_CLKDIV 0x0000000F
  953. #define LCRR_CLKDIV_SHIFT 0
  954. #define LCRR_CLKDIV_2 0x00000002
  955. #define LCRR_CLKDIV_4 0x00000004
  956. #define LCRR_CLKDIV_8 0x00000008
  957. /* DMAMR - DMA Mode Register
  958. */
  959. #define DMA_CHANNEL_START 0x00000001 /* Bit - DMAMRn CS */
  960. #define DMA_CHANNEL_TRANSFER_MODE_DIRECT 0x00000004 /* Bit - DMAMRn CTM */
  961. #define DMA_CHANNEL_SOURCE_ADRESSS_HOLD_EN 0x00001000 /* Bit - DMAMRn SAHE */
  962. #define DMA_CHANNEL_SOURCE_ADDRESS_HOLD_1B 0x00000000 /* 2Bit- DMAMRn SAHTS 1byte */
  963. #define DMA_CHANNEL_SOURCE_ADDRESS_HOLD_2B 0x00004000 /* 2Bit- DMAMRn SAHTS 2bytes */
  964. #define DMA_CHANNEL_SOURCE_ADDRESS_HOLD_4B 0x00008000 /* 2Bit- DMAMRn SAHTS 4bytes */
  965. #define DMA_CHANNEL_SOURCE_ADDRESS_HOLD_8B 0x0000c000 /* 2Bit- DMAMRn SAHTS 8bytes */
  966. #define DMA_CHANNEL_SNOOP 0x00010000 /* Bit - DMAMRn DMSEN */
  967. /* DMASR - DMA Status Register
  968. */
  969. #define DMA_CHANNEL_BUSY 0x00000004 /* Bit - DMASRn CB */
  970. #define DMA_CHANNEL_TRANSFER_ERROR 0x00000080 /* Bit - DMASRn TE */
  971. /* CONFIG_ADDRESS - PCI Config Address Register
  972. */
  973. #define PCI_CONFIG_ADDRESS_EN 0x80000000
  974. #define PCI_CONFIG_ADDRESS_BN_SHIFT 16
  975. #define PCI_CONFIG_ADDRESS_BN_MASK 0x00ff0000
  976. #define PCI_CONFIG_ADDRESS_DN_SHIFT 11
  977. #define PCI_CONFIG_ADDRESS_DN_MASK 0x0000f800
  978. #define PCI_CONFIG_ADDRESS_FN_SHIFT 8
  979. #define PCI_CONFIG_ADDRESS_FN_MASK 0x00000700
  980. #define PCI_CONFIG_ADDRESS_RN_SHIFT 0
  981. #define PCI_CONFIG_ADDRESS_RN_MASK 0x000000fc
  982. /* POTAR - PCI Outbound Translation Address Register
  983. */
  984. #define POTAR_TA_MASK 0x000fffff
  985. /* POBAR - PCI Outbound Base Address Register
  986. */
  987. #define POBAR_BA_MASK 0x000fffff
  988. /* POCMR - PCI Outbound Comparision Mask Register
  989. */
  990. #define POCMR_EN 0x80000000
  991. #define POCMR_IO 0x40000000 /* 0-memory space 1-I/O space */
  992. #define POCMR_SE 0x20000000 /* streaming enable */
  993. #define POCMR_DST 0x10000000 /* 0-PCI1 1-PCI2 */
  994. #define POCMR_CM_MASK 0x000fffff
  995. #define POCMR_CM_4G 0x00000000
  996. #define POCMR_CM_2G 0x00080000
  997. #define POCMR_CM_1G 0x000C0000
  998. #define POCMR_CM_512M 0x000E0000
  999. #define POCMR_CM_256M 0x000F0000
  1000. #define POCMR_CM_128M 0x000F8000
  1001. #define POCMR_CM_64M 0x000FC000
  1002. #define POCMR_CM_32M 0x000FE000
  1003. #define POCMR_CM_16M 0x000FF000
  1004. #define POCMR_CM_8M 0x000FF800
  1005. #define POCMR_CM_4M 0x000FFC00
  1006. #define POCMR_CM_2M 0x000FFE00
  1007. #define POCMR_CM_1M 0x000FFF00
  1008. #define POCMR_CM_512K 0x000FFF80
  1009. #define POCMR_CM_256K 0x000FFFC0
  1010. #define POCMR_CM_128K 0x000FFFE0
  1011. #define POCMR_CM_64K 0x000FFFF0
  1012. #define POCMR_CM_32K 0x000FFFF8
  1013. #define POCMR_CM_16K 0x000FFFFC
  1014. #define POCMR_CM_8K 0x000FFFFE
  1015. #define POCMR_CM_4K 0x000FFFFF
  1016. /* PITAR - PCI Inbound Translation Address Register
  1017. */
  1018. #define PITAR_TA_MASK 0x000fffff
  1019. /* PIBAR - PCI Inbound Base/Extended Address Register
  1020. */
  1021. #define PIBAR_MASK 0xffffffff
  1022. #define PIEBAR_EBA_MASK 0x000fffff
  1023. /* PIWAR - PCI Inbound Windows Attributes Register
  1024. */
  1025. #define PIWAR_EN 0x80000000
  1026. #define PIWAR_PF 0x20000000
  1027. #define PIWAR_RTT_MASK 0x000f0000
  1028. #define PIWAR_RTT_NO_SNOOP 0x00040000
  1029. #define PIWAR_RTT_SNOOP 0x00050000
  1030. #define PIWAR_WTT_MASK 0x0000f000
  1031. #define PIWAR_WTT_NO_SNOOP 0x00004000
  1032. #define PIWAR_WTT_SNOOP 0x00005000
  1033. #define PIWAR_IWS_MASK 0x0000003F
  1034. #define PIWAR_IWS_4K 0x0000000B
  1035. #define PIWAR_IWS_8K 0x0000000C
  1036. #define PIWAR_IWS_16K 0x0000000D
  1037. #define PIWAR_IWS_32K 0x0000000E
  1038. #define PIWAR_IWS_64K 0x0000000F
  1039. #define PIWAR_IWS_128K 0x00000010
  1040. #define PIWAR_IWS_256K 0x00000011
  1041. #define PIWAR_IWS_512K 0x00000012
  1042. #define PIWAR_IWS_1M 0x00000013
  1043. #define PIWAR_IWS_2M 0x00000014
  1044. #define PIWAR_IWS_4M 0x00000015
  1045. #define PIWAR_IWS_8M 0x00000016
  1046. #define PIWAR_IWS_16M 0x00000017
  1047. #define PIWAR_IWS_32M 0x00000018
  1048. #define PIWAR_IWS_64M 0x00000019
  1049. #define PIWAR_IWS_128M 0x0000001A
  1050. #define PIWAR_IWS_256M 0x0000001B
  1051. #define PIWAR_IWS_512M 0x0000001C
  1052. #define PIWAR_IWS_1G 0x0000001D
  1053. #define PIWAR_IWS_2G 0x0000001E
  1054. /* PMCCR1 - PCI Configuration Register 1
  1055. */
  1056. #define PMCCR1_POWER_OFF 0x00000020
  1057. /* FMR - Flash Mode Register
  1058. */
  1059. #define FMR_CWTO 0x0000F000
  1060. #define FMR_CWTO_SHIFT 12
  1061. #define FMR_BOOT 0x00000800
  1062. #define FMR_ECCM 0x00000100
  1063. #define FMR_AL 0x00000030
  1064. #define FMR_AL_SHIFT 4
  1065. #define FMR_OP 0x00000003
  1066. #define FMR_OP_SHIFT 0
  1067. /* FIR - Flash Instruction Register
  1068. */
  1069. #define FIR_OP0 0xF0000000
  1070. #define FIR_OP0_SHIFT 28
  1071. #define FIR_OP1 0x0F000000
  1072. #define FIR_OP1_SHIFT 24
  1073. #define FIR_OP2 0x00F00000
  1074. #define FIR_OP2_SHIFT 20
  1075. #define FIR_OP3 0x000F0000
  1076. #define FIR_OP3_SHIFT 16
  1077. #define FIR_OP4 0x0000F000
  1078. #define FIR_OP4_SHIFT 12
  1079. #define FIR_OP5 0x00000F00
  1080. #define FIR_OP5_SHIFT 8
  1081. #define FIR_OP6 0x000000F0
  1082. #define FIR_OP6_SHIFT 4
  1083. #define FIR_OP7 0x0000000F
  1084. #define FIR_OP7_SHIFT 0
  1085. #define FIR_OP_NOP 0x0 /* No operation and end of sequence */
  1086. #define FIR_OP_CA 0x1 /* Issue current column address */
  1087. #define FIR_OP_PA 0x2 /* Issue current block+page address */
  1088. #define FIR_OP_UA 0x3 /* Issue user defined address */
  1089. #define FIR_OP_CM0 0x4 /* Issue command from FCR[CMD0] */
  1090. #define FIR_OP_CM1 0x5 /* Issue command from FCR[CMD1] */
  1091. #define FIR_OP_CM2 0x6 /* Issue command from FCR[CMD2] */
  1092. #define FIR_OP_CM3 0x7 /* Issue command from FCR[CMD3] */
  1093. #define FIR_OP_WB 0x8 /* Write FBCR bytes from FCM buffer */
  1094. #define FIR_OP_WS 0x9 /* Write 1 or 2 bytes from MDR[AS] */
  1095. #define FIR_OP_RB 0xA /* Read FBCR bytes to FCM buffer */
  1096. #define FIR_OP_RS 0xB /* Read 1 or 2 bytes to MDR[AS] */
  1097. #define FIR_OP_CW0 0xC /* Wait then issue FCR[CMD0] */
  1098. #define FIR_OP_CW1 0xD /* Wait then issue FCR[CMD1] */
  1099. #define FIR_OP_RBW 0xE /* Wait then read FBCR bytes */
  1100. #define FIR_OP_RSW 0xF /* Wait then read 1 or 2 bytes */
  1101. /* FCR - Flash Command Register
  1102. */
  1103. #define FCR_CMD0 0xFF000000
  1104. #define FCR_CMD0_SHIFT 24
  1105. #define FCR_CMD1 0x00FF0000
  1106. #define FCR_CMD1_SHIFT 16
  1107. #define FCR_CMD2 0x0000FF00
  1108. #define FCR_CMD2_SHIFT 8
  1109. #define FCR_CMD3 0x000000FF
  1110. #define FCR_CMD3_SHIFT 0
  1111. /* FBAR - Flash Block Address Register
  1112. */
  1113. #define FBAR_BLK 0x00FFFFFF
  1114. /* FPAR - Flash Page Address Register
  1115. */
  1116. #define FPAR_SP_PI 0x00007C00
  1117. #define FPAR_SP_PI_SHIFT 10
  1118. #define FPAR_SP_MS 0x00000200
  1119. #define FPAR_SP_CI 0x000001FF
  1120. #define FPAR_SP_CI_SHIFT 0
  1121. #define FPAR_LP_PI 0x0003F000
  1122. #define FPAR_LP_PI_SHIFT 12
  1123. #define FPAR_LP_MS 0x00000800
  1124. #define FPAR_LP_CI 0x000007FF
  1125. #define FPAR_LP_CI_SHIFT 0
  1126. /* LTESR - Transfer Error Status Register
  1127. */
  1128. #define LTESR_BM 0x80000000
  1129. #define LTESR_FCT 0x40000000
  1130. #define LTESR_PAR 0x20000000
  1131. #define LTESR_WP 0x04000000
  1132. #define LTESR_ATMW 0x00800000
  1133. #define LTESR_ATMR 0x00400000
  1134. #define LTESR_CS 0x00080000
  1135. #define LTESR_CC 0x00000001
  1136. /* DDR Control Driver Register
  1137. */
  1138. #define DDRCDR_EN 0x40000000
  1139. #define DDRCDR_PZ 0x3C000000
  1140. #define DDRCDR_PZ_MAXZ 0x00000000
  1141. #define DDRCDR_PZ_HIZ 0x20000000
  1142. #define DDRCDR_PZ_NOMZ 0x30000000
  1143. #define DDRCDR_PZ_LOZ 0x38000000
  1144. #define DDRCDR_PZ_MINZ 0x3C000000
  1145. #define DDRCDR_NZ 0x3C000000
  1146. #define DDRCDR_NZ_MAXZ 0x00000000
  1147. #define DDRCDR_NZ_HIZ 0x02000000
  1148. #define DDRCDR_NZ_NOMZ 0x03000000
  1149. #define DDRCDR_NZ_LOZ 0x03800000
  1150. #define DDRCDR_NZ_MINZ 0x03C00000
  1151. #define DDRCDR_ODT 0x00080000
  1152. #define DDRCDR_DDR_CFG 0x00040000
  1153. #define DDRCDR_M_ODR 0x00000002
  1154. #define DDRCDR_Q_DRN 0x00000001
  1155. #ifndef __ASSEMBLY__
  1156. struct pci_region;
  1157. void mpc83xx_pci_init(int num_buses, struct pci_region **reg, int warmboot);
  1158. #endif
  1159. #endif /* __MPC83XX_H__ */