ppc440spe_pcie.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. /*
  2. * Copyright (c) 2005 Cisco Systems. All rights reserved.
  3. * Roland Dreier <rolandd@cisco.com>
  4. *
  5. * This program is free software; you can redistribute it and/or modify it
  6. * under the terms of the GNU General Public License as published by the
  7. * Free Software Foundation; either version 2 of the License, or (at your
  8. * option) any later version.
  9. */
  10. #ifndef __PPC_SYSLIB_PPC440SPE_PCIE_H
  11. #define __PPC_SYSLIB_PPC440SPE_PCIE_H
  12. #define DCRN_SDR0_CFGADDR 0x00e
  13. #define DCRN_SDR0_CFGDATA 0x00f
  14. #define DCRN_PCIE0_BASE 0x100
  15. #define DCRN_PCIE1_BASE 0x120
  16. #define DCRN_PCIE2_BASE 0x140
  17. #define PCIE0 DCRN_PCIE0_BASE
  18. #define PCIE1 DCRN_PCIE1_BASE
  19. #define PCIE2 DCRN_PCIE2_BASE
  20. #define DCRN_PEGPL_CFGBAH(base) (base + 0x00)
  21. #define DCRN_PEGPL_CFGBAL(base) (base + 0x01)
  22. #define DCRN_PEGPL_CFGMSK(base) (base + 0x02)
  23. #define DCRN_PEGPL_MSGBAH(base) (base + 0x03)
  24. #define DCRN_PEGPL_MSGBAL(base) (base + 0x04)
  25. #define DCRN_PEGPL_MSGMSK(base) (base + 0x05)
  26. #define DCRN_PEGPL_OMR1BAH(base) (base + 0x06)
  27. #define DCRN_PEGPL_OMR1BAL(base) (base + 0x07)
  28. #define DCRN_PEGPL_OMR1MSKH(base) (base + 0x08)
  29. #define DCRN_PEGPL_OMR1MSKL(base) (base + 0x09)
  30. #define DCRN_PEGPL_REGBAH(base) (base + 0x12)
  31. #define DCRN_PEGPL_REGBAL(base) (base + 0x13)
  32. #define DCRN_PEGPL_REGMSK(base) (base + 0x14)
  33. #define DCRN_PEGPL_SPECIAL(base) (base + 0x15)
  34. /*
  35. * System DCRs (SDRs)
  36. */
  37. #define PESDR0_PLLLCT1 0x03a0
  38. #define PESDR0_PLLLCT2 0x03a1
  39. #define PESDR0_PLLLCT3 0x03a2
  40. #define PESDR0_UTLSET1 0x0300
  41. #define PESDR0_UTLSET2 0x0301
  42. #define PESDR0_DLPSET 0x0302
  43. #define PESDR0_LOOP 0x0303
  44. #define PESDR0_RCSSET 0x0304
  45. #define PESDR0_RCSSTS 0x0305
  46. #define PESDR0_HSSL0SET1 0x0306
  47. #define PESDR0_HSSL0SET2 0x0307
  48. #define PESDR0_HSSL0STS 0x0308
  49. #define PESDR0_HSSL1SET1 0x0309
  50. #define PESDR0_HSSL1SET2 0x030a
  51. #define PESDR0_HSSL1STS 0x030b
  52. #define PESDR0_HSSL2SET1 0x030c
  53. #define PESDR0_HSSL2SET2 0x030d
  54. #define PESDR0_HSSL2STS 0x030e
  55. #define PESDR0_HSSL3SET1 0x030f
  56. #define PESDR0_HSSL3SET2 0x0310
  57. #define PESDR0_HSSL3STS 0x0311
  58. #define PESDR0_HSSL4SET1 0x0312
  59. #define PESDR0_HSSL4SET2 0x0313
  60. #define PESDR0_HSSL4STS 0x0314
  61. #define PESDR0_HSSL5SET1 0x0315
  62. #define PESDR0_HSSL5SET2 0x0316
  63. #define PESDR0_HSSL5STS 0x0317
  64. #define PESDR0_HSSL6SET1 0x0318
  65. #define PESDR0_HSSL6SET2 0x0319
  66. #define PESDR0_HSSL6STS 0x031a
  67. #define PESDR0_HSSL7SET1 0x031b
  68. #define PESDR0_HSSL7SET2 0x031c
  69. #define PESDR0_HSSL7STS 0x031d
  70. #define PESDR0_HSSCTLSET 0x031e
  71. #define PESDR0_LANE_ABCD 0x031f
  72. #define PESDR0_LANE_EFGH 0x0320
  73. #define PESDR1_UTLSET1 0x0340
  74. #define PESDR1_UTLSET2 0x0341
  75. #define PESDR1_DLPSET 0x0342
  76. #define PESDR1_LOOP 0x0343
  77. #define PESDR1_RCSSET 0x0344
  78. #define PESDR1_RCSSTS 0x0345
  79. #define PESDR1_HSSL0SET1 0x0346
  80. #define PESDR1_HSSL0SET2 0x0347
  81. #define PESDR1_HSSL0STS 0x0348
  82. #define PESDR1_HSSL1SET1 0x0349
  83. #define PESDR1_HSSL1SET2 0x034a
  84. #define PESDR1_HSSL1STS 0x034b
  85. #define PESDR1_HSSL2SET1 0x034c
  86. #define PESDR1_HSSL2SET2 0x034d
  87. #define PESDR1_HSSL2STS 0x034e
  88. #define PESDR1_HSSL3SET1 0x034f
  89. #define PESDR1_HSSL3SET2 0x0350
  90. #define PESDR1_HSSL3STS 0x0351
  91. #define PESDR1_HSSCTLSET 0x0352
  92. #define PESDR1_LANE_ABCD 0x0353
  93. #define PESDR2_UTLSET1 0x0370
  94. #define PESDR2_UTLSET2 0x0371
  95. #define PESDR2_DLPSET 0x0372
  96. #define PESDR2_LOOP 0x0373
  97. #define PESDR2_RCSSET 0x0374
  98. #define PESDR2_RCSSTS 0x0375
  99. #define PESDR2_HSSL0SET1 0x0376
  100. #define PESDR2_HSSL0SET2 0x0377
  101. #define PESDR2_HSSL0STS 0x0378
  102. #define PESDR2_HSSL1SET1 0x0379
  103. #define PESDR2_HSSL1SET2 0x037a
  104. #define PESDR2_HSSL1STS 0x037b
  105. #define PESDR2_HSSL2SET1 0x037c
  106. #define PESDR2_HSSL2SET2 0x037d
  107. #define PESDR2_HSSL2STS 0x037e
  108. #define PESDR2_HSSL3SET1 0x037f
  109. #define PESDR2_HSSL3SET2 0x0380
  110. #define PESDR2_HSSL3STS 0x0381
  111. #define PESDR2_HSSCTLSET 0x0382
  112. #define PESDR2_LANE_ABCD 0x0383
  113. /*
  114. * UTL register offsets
  115. */
  116. #define PEUTL_PBBSZ 0x20
  117. #define PEUTL_OPDBSZ 0x68
  118. #define PEUTL_IPHBSZ 0x70
  119. #define PEUTL_IPDBSZ 0x78
  120. #define PEUTL_OUTTR 0x90
  121. #define PEUTL_INTR 0x98
  122. #define PEUTL_PCTL 0xa0
  123. #define PEUTL_RCIRQEN 0xb8
  124. /*
  125. * Config space register offsets
  126. */
  127. #define PECFG_BAR0LMPA 0x210
  128. #define PECFG_BAR0HMPA 0x214
  129. #define PECFG_PIMEN 0x33c
  130. #define PECFG_PIM0LAL 0x340
  131. #define PECFG_PIM0LAH 0x344
  132. #define PECFG_POM0LAL 0x380
  133. #define PECFG_POM0LAH 0x384
  134. int ppc440spe_init_pcie(void);
  135. int ppc440spe_init_pcie_rootport(int port);
  136. void ppc440spe_setup_pcie(struct pci_controller *hose, int port);
  137. #endif /* __PPC_SYSLIB_PPC440SPE_PCIE_H */