mpc8349_pci.h 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. #ifndef _PPC_KERNEL_MPC8349_PCI_H
  2. #define _PPC_KERNEL_MPC8349_PCI_H
  3. #define M8265_PCIBR0 0x101ac
  4. #define M8265_PCIBR1 0x101b0
  5. #define M8265_PCIMSK0 0x101c4
  6. #define M8265_PCIMSK1 0x101c8
  7. /* Bit definitions for PCIBR registers */
  8. #define PCIBR_ENABLE 0x00000001
  9. /* Bit definitions for PCIMSK registers */
  10. #define PCIMSK_32KB 0xFFFF8000 /* Size of window, smallest */
  11. #define PCIMSK_64KB 0xFFFF0000
  12. #define PCIMSK_128KB 0xFFFE0000
  13. #define PCIMSK_256KB 0xFFFC0000
  14. #define PCIMSK_512KB 0xFFF80000
  15. #define PCIMSK_1MB 0xFFF00000
  16. #define PCIMSK_2MB 0xFFE00000
  17. #define PCIMSK_4MB 0xFFC00000
  18. #define PCIMSK_8MB 0xFF800000
  19. #define PCIMSK_16MB 0xFF000000
  20. #define PCIMSK_32MB 0xFE000000
  21. #define PCIMSK_64MB 0xFC000000
  22. #define PCIMSK_128MB 0xF8000000
  23. #define PCIMSK_256MB 0xF0000000
  24. #define PCIMSK_512MB 0xE0000000
  25. #define PCIMSK_1GB 0xC0000000 /* Size of window, largest */
  26. #define M826X_SCCR_PCI_MODE_EN 0x100
  27. /*
  28. * Outbound ATU registers (3 sets). These registers control how 60x bus
  29. * (local) addresses are translated to PCI addresses when the MPC826x is
  30. * a PCI bus master (initiator).
  31. */
  32. #define POTAR_REG0 0x10800 /* PCI Outbound Translation Addr registers */
  33. #define POTAR_REG1 0x10818
  34. #define POTAR_REG2 0x10830
  35. #define POBAR_REG0 0x10808 /* PCI Outbound Base Addr registers */
  36. #define POBAR_REG1 0x10820
  37. #define POBAR_REG2 0x10838
  38. #define POCMR_REG0 0x10810 /* PCI Outbound Comparison Mask registers */
  39. #define POCMR_REG1 0x10828
  40. #define POCMR_REG2 0x10840
  41. /* Bit definitions for POMCR registers */
  42. #define POCMR_MASK_4KB 0x000FFFFF
  43. #define POCMR_MASK_8KB 0x000FFFFE
  44. #define POCMR_MASK_16KB 0x000FFFFC
  45. #define POCMR_MASK_32KB 0x000FFFF8
  46. #define POCMR_MASK_64KB 0x000FFFF0
  47. #define POCMR_MASK_128KB 0x000FFFE0
  48. #define POCMR_MASK_256KB 0x000FFFC0
  49. #define POCMR_MASK_512KB 0x000FFF80
  50. #define POCMR_MASK_1MB 0x000FFF00
  51. #define POCMR_MASK_2MB 0x000FFE00
  52. #define POCMR_MASK_4MB 0x000FFC00
  53. #define POCMR_MASK_8MB 0x000FF800
  54. #define POCMR_MASK_16MB 0x000FF000
  55. #define POCMR_MASK_32MB 0x000FE000
  56. #define POCMR_MASK_64MB 0x000FC000
  57. #define POCMR_MASK_128MB 0x000F8000
  58. #define POCMR_MASK_256MB 0x000F0000
  59. #define POCMR_MASK_512MB 0x000E0000
  60. #define POCMR_MASK_1GB 0x000C0000
  61. #define POCMR_ENABLE 0x80000000
  62. #define POCMR_PCI_IO 0x40000000
  63. #define POCMR_PREFETCH_EN 0x20000000
  64. #define POCMR_PCI2 0x10000000
  65. /* Soft PCI reset */
  66. #define PCI_GCR_REG 0x10880
  67. /* Bit definitions for PCI_GCR registers */
  68. #define PCIGCR_PCI_BUS_EN 0x1
  69. /*
  70. * Inbound ATU registers (2 sets). These registers control how PCI
  71. * addresses are translated to 60x bus (local) addresses when the
  72. * MPC826x is a PCI bus target.
  73. */
  74. #define PITAR_REG1 0x108D0
  75. #define PIBAR_REG1 0x108D8
  76. #define PICMR_REG1 0x108E0
  77. #define PITAR_REG0 0x108E8
  78. #define PIBAR_REG0 0x108F0
  79. #define PICMR_REG0 0x108F8
  80. /* Bit definitions for PCI Inbound Comparison Mask registers */
  81. #define PICMR_MASK_4KB 0x000FFFFF
  82. #define PICMR_MASK_8KB 0x000FFFFE
  83. #define PICMR_MASK_16KB 0x000FFFFC
  84. #define PICMR_MASK_32KB 0x000FFFF8
  85. #define PICMR_MASK_64KB 0x000FFFF0
  86. #define PICMR_MASK_128KB 0x000FFFE0
  87. #define PICMR_MASK_256KB 0x000FFFC0
  88. #define PICMR_MASK_512KB 0x000FFF80
  89. #define PICMR_MASK_1MB 0x000FFF00
  90. #define PICMR_MASK_2MB 0x000FFE00
  91. #define PICMR_MASK_4MB 0x000FFC00
  92. #define PICMR_MASK_8MB 0x000FF800
  93. #define PICMR_MASK_16MB 0x000FF000
  94. #define PICMR_MASK_32MB 0x000FE000
  95. #define PICMR_MASK_64MB 0x000FC000
  96. #define PICMR_MASK_128MB 0x000F8000
  97. #define PICMR_MASK_256MB 0x000F0000
  98. #define PICMR_MASK_512MB 0x000E0000
  99. #define PICMR_MASK_1GB 0x000C0000
  100. #define PICMR_ENABLE 0x80000000
  101. #define PICMR_NO_SNOOP_EN 0x40000000
  102. #define PICMR_PREFETCH_EN 0x20000000
  103. /* PCI error Registers */
  104. #define PCI_ERROR_STATUS_REG 0x10884
  105. #define PCI_ERROR_MASK_REG 0x10888
  106. #define PCI_ERROR_CONTROL_REG 0x1088C
  107. #define PCI_ERROR_ADRS_CAPTURE_REG 0x10890
  108. #define PCI_ERROR_DATA_CAPTURE_REG 0x10898
  109. #define PCI_ERROR_CTRL_CAPTURE_REG 0x108A0
  110. /* PCI error Register bit defines */
  111. #define PCI_ERROR_PCI_ADDR_PAR 0x00000001
  112. #define PCI_ERROR_PCI_DATA_PAR_WR 0x00000002
  113. #define PCI_ERROR_PCI_DATA_PAR_RD 0x00000004
  114. #define PCI_ERROR_PCI_NO_RSP 0x00000008
  115. #define PCI_ERROR_PCI_TAR_ABT 0x00000010
  116. #define PCI_ERROR_PCI_SERR 0x00000020
  117. #define PCI_ERROR_PCI_PERR_RD 0x00000040
  118. #define PCI_ERROR_PCI_PERR_WR 0x00000080
  119. #define PCI_ERROR_I2O_OFQO 0x00000100
  120. #define PCI_ERROR_I2O_IPQO 0x00000200
  121. #define PCI_ERROR_IRA 0x00000400
  122. #define PCI_ERROR_NMI 0x00000800
  123. #define PCI_ERROR_I2O_DBMC 0x00001000
  124. /*
  125. * Register pair used to generate configuration cycles on the PCI bus
  126. * and access the MPC826x's own PCI configuration registers.
  127. */
  128. #define PCI_CFG_ADDR_REG 0x10900
  129. #define PCI_CFG_DATA_REG 0x10904
  130. /* Bus parking decides where the bus control sits when idle */
  131. /* If modifying memory controllers for PCI park on the core */
  132. #define PPC_ACR_BUS_PARK_CORE 0x6
  133. #define PPC_ACR_BUS_PARK_PCI 0x3
  134. #endif /* _PPC_KERNEL_M8260_PCI_H */