ppc4xx_pci.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506
  1. /*
  2. * PCI / PCI-X / PCI-Express support for 4xx parts
  3. *
  4. * Copyright 2007 Ben. Herrenschmidt <benh@kernel.crashing.org>, IBM Corp.
  5. *
  6. * Bits and pieces extracted from arch/ppc support by
  7. *
  8. * Matt Porter <mporter@kernel.crashing.org>
  9. *
  10. * Copyright 2002-2005 MontaVista Software Inc.
  11. */
  12. #ifndef __PPC4XX_PCI_H__
  13. #define __PPC4XX_PCI_H__
  14. /*
  15. * 4xx PCI-X bridge register definitions
  16. */
  17. #define PCIX0_VENDID 0x000
  18. #define PCIX0_DEVID 0x002
  19. #define PCIX0_COMMAND 0x004
  20. #define PCIX0_STATUS 0x006
  21. #define PCIX0_REVID 0x008
  22. #define PCIX0_CLS 0x009
  23. #define PCIX0_CACHELS 0x00c
  24. #define PCIX0_LATTIM 0x00d
  25. #define PCIX0_HDTYPE 0x00e
  26. #define PCIX0_BIST 0x00f
  27. #define PCIX0_BAR0L 0x010
  28. #define PCIX0_BAR0H 0x014
  29. #define PCIX0_BAR1 0x018
  30. #define PCIX0_BAR2L 0x01c
  31. #define PCIX0_BAR2H 0x020
  32. #define PCIX0_BAR3 0x024
  33. #define PCIX0_CISPTR 0x028
  34. #define PCIX0_SBSYSVID 0x02c
  35. #define PCIX0_SBSYSID 0x02e
  36. #define PCIX0_EROMBA 0x030
  37. #define PCIX0_CAP 0x034
  38. #define PCIX0_RES0 0x035
  39. #define PCIX0_RES1 0x036
  40. #define PCIX0_RES2 0x038
  41. #define PCIX0_INTLN 0x03c
  42. #define PCIX0_INTPN 0x03d
  43. #define PCIX0_MINGNT 0x03e
  44. #define PCIX0_MAXLTNCY 0x03f
  45. #define PCIX0_BRDGOPT1 0x040
  46. #define PCIX0_BRDGOPT2 0x044
  47. #define PCIX0_ERREN 0x050
  48. #define PCIX0_ERRSTS 0x054
  49. #define PCIX0_PLBBESR 0x058
  50. #define PCIX0_PLBBEARL 0x05c
  51. #define PCIX0_PLBBEARH 0x060
  52. #define PCIX0_POM0LAL 0x068
  53. #define PCIX0_POM0LAH 0x06c
  54. #define PCIX0_POM0SA 0x070
  55. #define PCIX0_POM0PCIAL 0x074
  56. #define PCIX0_POM0PCIAH 0x078
  57. #define PCIX0_POM1LAL 0x07c
  58. #define PCIX0_POM1LAH 0x080
  59. #define PCIX0_POM1SA 0x084
  60. #define PCIX0_POM1PCIAL 0x088
  61. #define PCIX0_POM1PCIAH 0x08c
  62. #define PCIX0_POM2SA 0x090
  63. #define PCIX0_PIM0SAL 0x098
  64. #define PCIX0_PIM0SA PCIX0_PIM0SAL
  65. #define PCIX0_PIM0LAL 0x09c
  66. #define PCIX0_PIM0LAH 0x0a0
  67. #define PCIX0_PIM1SA 0x0a4
  68. #define PCIX0_PIM1LAL 0x0a8
  69. #define PCIX0_PIM1LAH 0x0ac
  70. #define PCIX0_PIM2SAL 0x0b0
  71. #define PCIX0_PIM2SA PCIX0_PIM2SAL
  72. #define PCIX0_PIM2LAL 0x0b4
  73. #define PCIX0_PIM2LAH 0x0b8
  74. #define PCIX0_OMCAPID 0x0c0
  75. #define PCIX0_OMNIPTR 0x0c1
  76. #define PCIX0_OMMC 0x0c2
  77. #define PCIX0_OMMA 0x0c4
  78. #define PCIX0_OMMUA 0x0c8
  79. #define PCIX0_OMMDATA 0x0cc
  80. #define PCIX0_OMMEOI 0x0ce
  81. #define PCIX0_PMCAPID 0x0d0
  82. #define PCIX0_PMNIPTR 0x0d1
  83. #define PCIX0_PMC 0x0d2
  84. #define PCIX0_PMCSR 0x0d4
  85. #define PCIX0_PMCSRBSE 0x0d6
  86. #define PCIX0_PMDATA 0x0d7
  87. #define PCIX0_PMSCRR 0x0d8
  88. #define PCIX0_CAPID 0x0dc
  89. #define PCIX0_NIPTR 0x0dd
  90. #define PCIX0_CMD 0x0de
  91. #define PCIX0_STS 0x0e0
  92. #define PCIX0_IDR 0x0e4
  93. #define PCIX0_CID 0x0e8
  94. #define PCIX0_RID 0x0ec
  95. #define PCIX0_PIM0SAH 0x0f8
  96. #define PCIX0_PIM2SAH 0x0fc
  97. #define PCIX0_MSGIL 0x100
  98. #define PCIX0_MSGIH 0x104
  99. #define PCIX0_MSGOL 0x108
  100. #define PCIX0_MSGOH 0x10c
  101. #define PCIX0_IM 0x1f8
  102. /*
  103. * 4xx PCI bridge register definitions
  104. */
  105. #define PCIL0_PMM0LA 0x00
  106. #define PCIL0_PMM0MA 0x04
  107. #define PCIL0_PMM0PCILA 0x08
  108. #define PCIL0_PMM0PCIHA 0x0c
  109. #define PCIL0_PMM1LA 0x10
  110. #define PCIL0_PMM1MA 0x14
  111. #define PCIL0_PMM1PCILA 0x18
  112. #define PCIL0_PMM1PCIHA 0x1c
  113. #define PCIL0_PMM2LA 0x20
  114. #define PCIL0_PMM2MA 0x24
  115. #define PCIL0_PMM2PCILA 0x28
  116. #define PCIL0_PMM2PCIHA 0x2c
  117. #define PCIL0_PTM1MS 0x30
  118. #define PCIL0_PTM1LA 0x34
  119. #define PCIL0_PTM2MS 0x38
  120. #define PCIL0_PTM2LA 0x3c
  121. /*
  122. * 4xx PCIe bridge register definitions
  123. */
  124. /* DCR offsets */
  125. #define DCRO_PEGPL_CFGBAH 0x00
  126. #define DCRO_PEGPL_CFGBAL 0x01
  127. #define DCRO_PEGPL_CFGMSK 0x02
  128. #define DCRO_PEGPL_MSGBAH 0x03
  129. #define DCRO_PEGPL_MSGBAL 0x04
  130. #define DCRO_PEGPL_MSGMSK 0x05
  131. #define DCRO_PEGPL_OMR1BAH 0x06
  132. #define DCRO_PEGPL_OMR1BAL 0x07
  133. #define DCRO_PEGPL_OMR1MSKH 0x08
  134. #define DCRO_PEGPL_OMR1MSKL 0x09
  135. #define DCRO_PEGPL_OMR2BAH 0x0a
  136. #define DCRO_PEGPL_OMR2BAL 0x0b
  137. #define DCRO_PEGPL_OMR2MSKH 0x0c
  138. #define DCRO_PEGPL_OMR2MSKL 0x0d
  139. #define DCRO_PEGPL_OMR3BAH 0x0e
  140. #define DCRO_PEGPL_OMR3BAL 0x0f
  141. #define DCRO_PEGPL_OMR3MSKH 0x10
  142. #define DCRO_PEGPL_OMR3MSKL 0x11
  143. #define DCRO_PEGPL_REGBAH 0x12
  144. #define DCRO_PEGPL_REGBAL 0x13
  145. #define DCRO_PEGPL_REGMSK 0x14
  146. #define DCRO_PEGPL_SPECIAL 0x15
  147. #define DCRO_PEGPL_CFG 0x16
  148. #define DCRO_PEGPL_ESR 0x17
  149. #define DCRO_PEGPL_EARH 0x18
  150. #define DCRO_PEGPL_EARL 0x19
  151. #define DCRO_PEGPL_EATR 0x1a
  152. /* DMER mask */
  153. #define GPL_DMER_MASK_DISA 0x02000000
  154. /*
  155. * System DCRs (SDRs)
  156. */
  157. #define PESDR0_PLLLCT1 0x03a0
  158. #define PESDR0_PLLLCT2 0x03a1
  159. #define PESDR0_PLLLCT3 0x03a2
  160. /*
  161. * 440SPe additional DCRs
  162. */
  163. #define PESDR0_440SPE_UTLSET1 0x0300
  164. #define PESDR0_440SPE_UTLSET2 0x0301
  165. #define PESDR0_440SPE_DLPSET 0x0302
  166. #define PESDR0_440SPE_LOOP 0x0303
  167. #define PESDR0_440SPE_RCSSET 0x0304
  168. #define PESDR0_440SPE_RCSSTS 0x0305
  169. #define PESDR0_440SPE_HSSL0SET1 0x0306
  170. #define PESDR0_440SPE_HSSL0SET2 0x0307
  171. #define PESDR0_440SPE_HSSL0STS 0x0308
  172. #define PESDR0_440SPE_HSSL1SET1 0x0309
  173. #define PESDR0_440SPE_HSSL1SET2 0x030a
  174. #define PESDR0_440SPE_HSSL1STS 0x030b
  175. #define PESDR0_440SPE_HSSL2SET1 0x030c
  176. #define PESDR0_440SPE_HSSL2SET2 0x030d
  177. #define PESDR0_440SPE_HSSL2STS 0x030e
  178. #define PESDR0_440SPE_HSSL3SET1 0x030f
  179. #define PESDR0_440SPE_HSSL3SET2 0x0310
  180. #define PESDR0_440SPE_HSSL3STS 0x0311
  181. #define PESDR0_440SPE_HSSL4SET1 0x0312
  182. #define PESDR0_440SPE_HSSL4SET2 0x0313
  183. #define PESDR0_440SPE_HSSL4STS 0x0314
  184. #define PESDR0_440SPE_HSSL5SET1 0x0315
  185. #define PESDR0_440SPE_HSSL5SET2 0x0316
  186. #define PESDR0_440SPE_HSSL5STS 0x0317
  187. #define PESDR0_440SPE_HSSL6SET1 0x0318
  188. #define PESDR0_440SPE_HSSL6SET2 0x0319
  189. #define PESDR0_440SPE_HSSL6STS 0x031a
  190. #define PESDR0_440SPE_HSSL7SET1 0x031b
  191. #define PESDR0_440SPE_HSSL7SET2 0x031c
  192. #define PESDR0_440SPE_HSSL7STS 0x031d
  193. #define PESDR0_440SPE_HSSCTLSET 0x031e
  194. #define PESDR0_440SPE_LANE_ABCD 0x031f
  195. #define PESDR0_440SPE_LANE_EFGH 0x0320
  196. #define PESDR1_440SPE_UTLSET1 0x0340
  197. #define PESDR1_440SPE_UTLSET2 0x0341
  198. #define PESDR1_440SPE_DLPSET 0x0342
  199. #define PESDR1_440SPE_LOOP 0x0343
  200. #define PESDR1_440SPE_RCSSET 0x0344
  201. #define PESDR1_440SPE_RCSSTS 0x0345
  202. #define PESDR1_440SPE_HSSL0SET1 0x0346
  203. #define PESDR1_440SPE_HSSL0SET2 0x0347
  204. #define PESDR1_440SPE_HSSL0STS 0x0348
  205. #define PESDR1_440SPE_HSSL1SET1 0x0349
  206. #define PESDR1_440SPE_HSSL1SET2 0x034a
  207. #define PESDR1_440SPE_HSSL1STS 0x034b
  208. #define PESDR1_440SPE_HSSL2SET1 0x034c
  209. #define PESDR1_440SPE_HSSL2SET2 0x034d
  210. #define PESDR1_440SPE_HSSL2STS 0x034e
  211. #define PESDR1_440SPE_HSSL3SET1 0x034f
  212. #define PESDR1_440SPE_HSSL3SET2 0x0350
  213. #define PESDR1_440SPE_HSSL3STS 0x0351
  214. #define PESDR1_440SPE_HSSCTLSET 0x0352
  215. #define PESDR1_440SPE_LANE_ABCD 0x0353
  216. #define PESDR2_440SPE_UTLSET1 0x0370
  217. #define PESDR2_440SPE_UTLSET2 0x0371
  218. #define PESDR2_440SPE_DLPSET 0x0372
  219. #define PESDR2_440SPE_LOOP 0x0373
  220. #define PESDR2_440SPE_RCSSET 0x0374
  221. #define PESDR2_440SPE_RCSSTS 0x0375
  222. #define PESDR2_440SPE_HSSL0SET1 0x0376
  223. #define PESDR2_440SPE_HSSL0SET2 0x0377
  224. #define PESDR2_440SPE_HSSL0STS 0x0378
  225. #define PESDR2_440SPE_HSSL1SET1 0x0379
  226. #define PESDR2_440SPE_HSSL1SET2 0x037a
  227. #define PESDR2_440SPE_HSSL1STS 0x037b
  228. #define PESDR2_440SPE_HSSL2SET1 0x037c
  229. #define PESDR2_440SPE_HSSL2SET2 0x037d
  230. #define PESDR2_440SPE_HSSL2STS 0x037e
  231. #define PESDR2_440SPE_HSSL3SET1 0x037f
  232. #define PESDR2_440SPE_HSSL3SET2 0x0380
  233. #define PESDR2_440SPE_HSSL3STS 0x0381
  234. #define PESDR2_440SPE_HSSCTLSET 0x0382
  235. #define PESDR2_440SPE_LANE_ABCD 0x0383
  236. /*
  237. * 405EX additional DCRs
  238. */
  239. #define PESDR0_405EX_UTLSET1 0x0400
  240. #define PESDR0_405EX_UTLSET2 0x0401
  241. #define PESDR0_405EX_DLPSET 0x0402
  242. #define PESDR0_405EX_LOOP 0x0403
  243. #define PESDR0_405EX_RCSSET 0x0404
  244. #define PESDR0_405EX_RCSSTS 0x0405
  245. #define PESDR0_405EX_PHYSET1 0x0406
  246. #define PESDR0_405EX_PHYSET2 0x0407
  247. #define PESDR0_405EX_BIST 0x0408
  248. #define PESDR0_405EX_LPB 0x040B
  249. #define PESDR0_405EX_PHYSTA 0x040C
  250. #define PESDR1_405EX_UTLSET1 0x0440
  251. #define PESDR1_405EX_UTLSET2 0x0441
  252. #define PESDR1_405EX_DLPSET 0x0442
  253. #define PESDR1_405EX_LOOP 0x0443
  254. #define PESDR1_405EX_RCSSET 0x0444
  255. #define PESDR1_405EX_RCSSTS 0x0445
  256. #define PESDR1_405EX_PHYSET1 0x0446
  257. #define PESDR1_405EX_PHYSET2 0x0447
  258. #define PESDR1_405EX_BIST 0x0448
  259. #define PESDR1_405EX_LPB 0x044B
  260. #define PESDR1_405EX_PHYSTA 0x044C
  261. /*
  262. * 460EX additional DCRs
  263. */
  264. #define PESDR0_460EX_L0BIST 0x0308
  265. #define PESDR0_460EX_L0BISTSTS 0x0309
  266. #define PESDR0_460EX_L0CDRCTL 0x030A
  267. #define PESDR0_460EX_L0DRV 0x030B
  268. #define PESDR0_460EX_L0REC 0x030C
  269. #define PESDR0_460EX_L0LPB 0x030D
  270. #define PESDR0_460EX_L0CLK 0x030E
  271. #define PESDR0_460EX_PHY_CTL_RST 0x030F
  272. #define PESDR0_460EX_RSTSTA 0x0310
  273. #define PESDR0_460EX_OBS 0x0311
  274. #define PESDR0_460EX_L0ERRC 0x0320
  275. #define PESDR1_460EX_L0BIST 0x0348
  276. #define PESDR1_460EX_L1BIST 0x0349
  277. #define PESDR1_460EX_L2BIST 0x034A
  278. #define PESDR1_460EX_L3BIST 0x034B
  279. #define PESDR1_460EX_L0BISTSTS 0x034C
  280. #define PESDR1_460EX_L1BISTSTS 0x034D
  281. #define PESDR1_460EX_L2BISTSTS 0x034E
  282. #define PESDR1_460EX_L3BISTSTS 0x034F
  283. #define PESDR1_460EX_L0CDRCTL 0x0350
  284. #define PESDR1_460EX_L1CDRCTL 0x0351
  285. #define PESDR1_460EX_L2CDRCTL 0x0352
  286. #define PESDR1_460EX_L3CDRCTL 0x0353
  287. #define PESDR1_460EX_L0DRV 0x0354
  288. #define PESDR1_460EX_L1DRV 0x0355
  289. #define PESDR1_460EX_L2DRV 0x0356
  290. #define PESDR1_460EX_L3DRV 0x0357
  291. #define PESDR1_460EX_L0REC 0x0358
  292. #define PESDR1_460EX_L1REC 0x0359
  293. #define PESDR1_460EX_L2REC 0x035A
  294. #define PESDR1_460EX_L3REC 0x035B
  295. #define PESDR1_460EX_L0LPB 0x035C
  296. #define PESDR1_460EX_L1LPB 0x035D
  297. #define PESDR1_460EX_L2LPB 0x035E
  298. #define PESDR1_460EX_L3LPB 0x035F
  299. #define PESDR1_460EX_L0CLK 0x0360
  300. #define PESDR1_460EX_L1CLK 0x0361
  301. #define PESDR1_460EX_L2CLK 0x0362
  302. #define PESDR1_460EX_L3CLK 0x0363
  303. #define PESDR1_460EX_PHY_CTL_RST 0x0364
  304. #define PESDR1_460EX_RSTSTA 0x0365
  305. #define PESDR1_460EX_OBS 0x0366
  306. #define PESDR1_460EX_L0ERRC 0x0368
  307. #define PESDR1_460EX_L1ERRC 0x0369
  308. #define PESDR1_460EX_L2ERRC 0x036A
  309. #define PESDR1_460EX_L3ERRC 0x036B
  310. #define PESDR0_460EX_IHS1 0x036C
  311. #define PESDR0_460EX_IHS2 0x036D
  312. /*
  313. * 460SX additional DCRs
  314. */
  315. #define PESDRn_460SX_RCEI 0x02
  316. #define PESDR0_460SX_HSSL0DAMP 0x320
  317. #define PESDR0_460SX_HSSL1DAMP 0x321
  318. #define PESDR0_460SX_HSSL2DAMP 0x322
  319. #define PESDR0_460SX_HSSL3DAMP 0x323
  320. #define PESDR0_460SX_HSSL4DAMP 0x324
  321. #define PESDR0_460SX_HSSL5DAMP 0x325
  322. #define PESDR0_460SX_HSSL6DAMP 0x326
  323. #define PESDR0_460SX_HSSL7DAMP 0x327
  324. #define PESDR1_460SX_HSSL0DAMP 0x354
  325. #define PESDR1_460SX_HSSL1DAMP 0x355
  326. #define PESDR1_460SX_HSSL2DAMP 0x356
  327. #define PESDR1_460SX_HSSL3DAMP 0x357
  328. #define PESDR2_460SX_HSSL0DAMP 0x384
  329. #define PESDR2_460SX_HSSL1DAMP 0x385
  330. #define PESDR2_460SX_HSSL2DAMP 0x386
  331. #define PESDR2_460SX_HSSL3DAMP 0x387
  332. #define PESDR0_460SX_HSSL0COEFA 0x328
  333. #define PESDR0_460SX_HSSL1COEFA 0x329
  334. #define PESDR0_460SX_HSSL2COEFA 0x32A
  335. #define PESDR0_460SX_HSSL3COEFA 0x32B
  336. #define PESDR0_460SX_HSSL4COEFA 0x32C
  337. #define PESDR0_460SX_HSSL5COEFA 0x32D
  338. #define PESDR0_460SX_HSSL6COEFA 0x32E
  339. #define PESDR0_460SX_HSSL7COEFA 0x32F
  340. #define PESDR1_460SX_HSSL0COEFA 0x358
  341. #define PESDR1_460SX_HSSL1COEFA 0x359
  342. #define PESDR1_460SX_HSSL2COEFA 0x35A
  343. #define PESDR1_460SX_HSSL3COEFA 0x35B
  344. #define PESDR2_460SX_HSSL0COEFA 0x388
  345. #define PESDR2_460SX_HSSL1COEFA 0x389
  346. #define PESDR2_460SX_HSSL2COEFA 0x38A
  347. #define PESDR2_460SX_HSSL3COEFA 0x38B
  348. #define PESDR0_460SX_HSSL1CALDRV 0x339
  349. #define PESDR1_460SX_HSSL1CALDRV 0x361
  350. #define PESDR2_460SX_HSSL1CALDRV 0x391
  351. #define PESDR0_460SX_HSSSLEW 0x338
  352. #define PESDR1_460SX_HSSSLEW 0x360
  353. #define PESDR2_460SX_HSSSLEW 0x390
  354. #define PESDR0_460SX_HSSCTLSET 0x31E
  355. #define PESDR1_460SX_HSSCTLSET 0x352
  356. #define PESDR2_460SX_HSSCTLSET 0x382
  357. #define PESDR0_460SX_RCSSET 0x304
  358. #define PESDR1_460SX_RCSSET 0x344
  359. #define PESDR2_460SX_RCSSET 0x374
  360. /*
  361. * Of the above, some are common offsets from the base
  362. */
  363. #define PESDRn_UTLSET1 0x00
  364. #define PESDRn_UTLSET2 0x01
  365. #define PESDRn_DLPSET 0x02
  366. #define PESDRn_LOOP 0x03
  367. #define PESDRn_RCSSET 0x04
  368. #define PESDRn_RCSSTS 0x05
  369. /* 440spe only */
  370. #define PESDRn_440SPE_HSSL0SET1 0x06
  371. #define PESDRn_440SPE_HSSL0SET2 0x07
  372. #define PESDRn_440SPE_HSSL0STS 0x08
  373. #define PESDRn_440SPE_HSSL1SET1 0x09
  374. #define PESDRn_440SPE_HSSL1SET2 0x0a
  375. #define PESDRn_440SPE_HSSL1STS 0x0b
  376. #define PESDRn_440SPE_HSSL2SET1 0x0c
  377. #define PESDRn_440SPE_HSSL2SET2 0x0d
  378. #define PESDRn_440SPE_HSSL2STS 0x0e
  379. #define PESDRn_440SPE_HSSL3SET1 0x0f
  380. #define PESDRn_440SPE_HSSL3SET2 0x10
  381. #define PESDRn_440SPE_HSSL3STS 0x11
  382. /* 440spe port 0 only */
  383. #define PESDRn_440SPE_HSSL4SET1 0x12
  384. #define PESDRn_440SPE_HSSL4SET2 0x13
  385. #define PESDRn_440SPE_HSSL4STS 0x14
  386. #define PESDRn_440SPE_HSSL5SET1 0x15
  387. #define PESDRn_440SPE_HSSL5SET2 0x16
  388. #define PESDRn_440SPE_HSSL5STS 0x17
  389. #define PESDRn_440SPE_HSSL6SET1 0x18
  390. #define PESDRn_440SPE_HSSL6SET2 0x19
  391. #define PESDRn_440SPE_HSSL6STS 0x1a
  392. #define PESDRn_440SPE_HSSL7SET1 0x1b
  393. #define PESDRn_440SPE_HSSL7SET2 0x1c
  394. #define PESDRn_440SPE_HSSL7STS 0x1d
  395. /* 405ex only */
  396. #define PESDRn_405EX_PHYSET1 0x06
  397. #define PESDRn_405EX_PHYSET2 0x07
  398. #define PESDRn_405EX_PHYSTA 0x0c
  399. /*
  400. * UTL register offsets
  401. */
  402. #define PEUTL_PBCTL 0x00
  403. #define PEUTL_PBBSZ 0x20
  404. #define PEUTL_OPDBSZ 0x68
  405. #define PEUTL_IPHBSZ 0x70
  406. #define PEUTL_IPDBSZ 0x78
  407. #define PEUTL_OUTTR 0x90
  408. #define PEUTL_INTR 0x98
  409. #define PEUTL_PCTL 0xa0
  410. #define PEUTL_RCSTA 0xB0
  411. #define PEUTL_RCIRQEN 0xb8
  412. /*
  413. * Config space register offsets
  414. */
  415. #define PECFG_ECRTCTL 0x074
  416. #define PECFG_BAR0LMPA 0x210
  417. #define PECFG_BAR0HMPA 0x214
  418. #define PECFG_BAR1MPA 0x218
  419. #define PECFG_BAR2LMPA 0x220
  420. #define PECFG_BAR2HMPA 0x224
  421. #define PECFG_PIMEN 0x33c
  422. #define PECFG_PIM0LAL 0x340
  423. #define PECFG_PIM0LAH 0x344
  424. #define PECFG_PIM1LAL 0x348
  425. #define PECFG_PIM1LAH 0x34c
  426. #define PECFG_PIM01SAL 0x350
  427. #define PECFG_PIM01SAH 0x354
  428. #define PECFG_POM0LAL 0x380
  429. #define PECFG_POM0LAH 0x384
  430. #define PECFG_POM1LAL 0x388
  431. #define PECFG_POM1LAH 0x38c
  432. #define PECFG_POM2LAL 0x390
  433. #define PECFG_POM2LAH 0x394
  434. /* 460sx only */
  435. #define PECFG_460SX_DLLSTA 0x3f8
  436. /* 460sx Bit Mappings */
  437. #define PECFG_460SX_DLLSTA_LINKUP 0x00000010
  438. #define DCRO_PEGPL_460SX_OMR1MSKL_UOT 0x00000004
  439. /* PEGPL Bit Mappings */
  440. #define DCRO_PEGPL_OMRxMSKL_VAL 0x00000001
  441. #define DCRO_PEGPL_OMR1MSKL_UOT 0x00000002
  442. #define DCRO_PEGPL_OMR3MSKL_IO 0x00000002
  443. /* 476FPE */
  444. #define PCCFG_LCPA 0x270
  445. #define PECFG_TLDLP 0x3F8
  446. #define PECFG_TLDLP_LNKUP 0x00000008
  447. #define PECFG_TLDLP_PRESENT 0x00000010
  448. #define DCRO_PEGPL_476FPE_OMR1MSKL_UOT 0x00000004
  449. /* SDR Bit Mappings */
  450. #define PESDRx_RCSSET_HLDPLB 0x10000000
  451. #define PESDRx_RCSSET_RSTGU 0x01000000
  452. #define PESDRx_RCSSET_RDY 0x00100000
  453. #define PESDRx_RCSSET_RSTDL 0x00010000
  454. #define PESDRx_RCSSET_RSTPYN 0x00001000
  455. enum
  456. {
  457. PTYPE_ENDPOINT = 0x0,
  458. PTYPE_LEGACY_ENDPOINT = 0x1,
  459. PTYPE_ROOT_PORT = 0x4,
  460. LNKW_X1 = 0x1,
  461. LNKW_X4 = 0x4,
  462. LNKW_X8 = 0x8
  463. };
  464. #endif /* __PPC4XX_PCI_H__ */