m8260_pci.h 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. /*
  2. * include/asm-ppc/m8260_pci.h
  3. *
  4. * Definitions for the MPC8250/MPC8265/MPC8266 integrated PCI host bridge.
  5. *
  6. * This program is free software; you can redistribute it and/or modify it
  7. * under the terms of the GNU General Public License as published by the
  8. * Free Software Foundation; either version 2 of the License, or (at your
  9. * option) any later version.
  10. */
  11. #ifdef __KERNEL__
  12. #ifndef __M8260_PCI_H
  13. #define __M8260_PCI_H
  14. #include <linux/pci_ids.h>
  15. /*
  16. * Define the vendor/device ID for the MPC8265.
  17. */
  18. #define PCI_DEVICE_ID_MPC8265 ((0x18C0 << 16) | PCI_VENDOR_ID_MOTOROLA)
  19. #define PCI_DEVICE_ID_MPC8272 ((0x18C1 << 16) | PCI_VENDOR_ID_MOTOROLA)
  20. #define M8265_PCIBR0 0x101ac
  21. #define M8265_PCIBR1 0x101b0
  22. #define M8265_PCIMSK0 0x101c4
  23. #define M8265_PCIMSK1 0x101c8
  24. /* Bit definitions for PCIBR registers */
  25. #define PCIBR_ENABLE 0x00000001
  26. /* Bit definitions for PCIMSK registers */
  27. #define PCIMSK_32KiB 0xFFFF8000 /* Size of window, smallest */
  28. #define PCIMSK_64KiB 0xFFFF0000
  29. #define PCIMSK_128KiB 0xFFFE0000
  30. #define PCIMSK_256KiB 0xFFFC0000
  31. #define PCIMSK_512KiB 0xFFF80000
  32. #define PCIMSK_1MiB 0xFFF00000
  33. #define PCIMSK_2MiB 0xFFE00000
  34. #define PCIMSK_4MiB 0xFFC00000
  35. #define PCIMSK_8MiB 0xFF800000
  36. #define PCIMSK_16MiB 0xFF000000
  37. #define PCIMSK_32MiB 0xFE000000
  38. #define PCIMSK_64MiB 0xFC000000
  39. #define PCIMSK_128MiB 0xF8000000
  40. #define PCIMSK_256MiB 0xF0000000
  41. #define PCIMSK_512MiB 0xE0000000
  42. #define PCIMSK_1GiB 0xC0000000 /* Size of window, largest */
  43. #define M826X_SCCR_PCI_MODE_EN 0x100
  44. /*
  45. * Outbound ATU registers (3 sets). These registers control how 60x bus (local)
  46. * addresses are translated to PCI addresses when the MPC826x is a PCI bus
  47. * master (initiator).
  48. */
  49. #define POTAR_REG0 0x10800 /* PCI Outbound Translation Addr registers */
  50. #define POTAR_REG1 0x10818
  51. #define POTAR_REG2 0x10830
  52. #define POBAR_REG0 0x10808 /* PCI Outbound Base Addr registers */
  53. #define POBAR_REG1 0x10820
  54. #define POBAR_REG2 0x10838
  55. #define POCMR_REG0 0x10810 /* PCI Outbound Comparison Mask registers */
  56. #define POCMR_REG1 0x10828
  57. #define POCMR_REG2 0x10840
  58. /* Bit definitions for POMCR registers */
  59. #define POCMR_MASK_4KiB 0x000FFFFF
  60. #define POCMR_MASK_8KiB 0x000FFFFE
  61. #define POCMR_MASK_16KiB 0x000FFFFC
  62. #define POCMR_MASK_32KiB 0x000FFFF8
  63. #define POCMR_MASK_64KiB 0x000FFFF0
  64. #define POCMR_MASK_128KiB 0x000FFFE0
  65. #define POCMR_MASK_256KiB 0x000FFFC0
  66. #define POCMR_MASK_512KiB 0x000FFF80
  67. #define POCMR_MASK_1MiB 0x000FFF00
  68. #define POCMR_MASK_2MiB 0x000FFE00
  69. #define POCMR_MASK_4MiB 0x000FFC00
  70. #define POCMR_MASK_8MiB 0x000FF800
  71. #define POCMR_MASK_16MiB 0x000FF000
  72. #define POCMR_MASK_32MiB 0x000FE000
  73. #define POCMR_MASK_64MiB 0x000FC000
  74. #define POCMR_MASK_128MiB 0x000F8000
  75. #define POCMR_MASK_256MiB 0x000F0000
  76. #define POCMR_MASK_512MiB 0x000E0000
  77. #define POCMR_MASK_1GiB 0x000C0000
  78. #define POCMR_ENABLE 0x80000000
  79. #define POCMR_PCI_IO 0x40000000
  80. #define POCMR_PREFETCH_EN 0x20000000
  81. /* Soft PCI reset */
  82. #define PCI_GCR_REG 0x10880
  83. /* Bit definitions for PCI_GCR registers */
  84. #define PCIGCR_PCI_BUS_EN 0x1
  85. #define PCI_EMR_REG 0x10888
  86. /*
  87. * Inbound ATU registers (2 sets). These registers control how PCI addresses
  88. * are translated to 60x bus (local) addresses when the MPC826x is a PCI bus target.
  89. */
  90. #define PITAR_REG1 0x108D0
  91. #define PIBAR_REG1 0x108D8
  92. #define PICMR_REG1 0x108E0
  93. #define PITAR_REG0 0x108E8
  94. #define PIBAR_REG0 0x108F0
  95. #define PICMR_REG0 0x108F8
  96. /* Bit definitions for PCI Inbound Comparison Mask registers */
  97. #define PICMR_MASK_4KiB 0x000FFFFF
  98. #define PICMR_MASK_8KiB 0x000FFFFE
  99. #define PICMR_MASK_16KiB 0x000FFFFC
  100. #define PICMR_MASK_32KiB 0x000FFFF8
  101. #define PICMR_MASK_64KiB 0x000FFFF0
  102. #define PICMR_MASK_128KiB 0x000FFFE0
  103. #define PICMR_MASK_256KiB 0x000FFFC0
  104. #define PICMR_MASK_512KiB 0x000FFF80
  105. #define PICMR_MASK_1MiB 0x000FFF00
  106. #define PICMR_MASK_2MiB 0x000FFE00
  107. #define PICMR_MASK_4MiB 0x000FFC00
  108. #define PICMR_MASK_8MiB 0x000FF800
  109. #define PICMR_MASK_16MiB 0x000FF000
  110. #define PICMR_MASK_32MiB 0x000FE000
  111. #define PICMR_MASK_64MiB 0x000FC000
  112. #define PICMR_MASK_128MiB 0x000F8000
  113. #define PICMR_MASK_256MiB 0x000F0000
  114. #define PICMR_MASK_512MiB 0x000E0000
  115. #define PICMR_MASK_1GiB 0x000C0000
  116. #define PICMR_ENABLE 0x80000000
  117. #define PICMR_NO_SNOOP_EN 0x40000000
  118. #define PICMR_PREFETCH_EN 0x20000000
  119. /* PCI error Registers */
  120. #define PCI_ERROR_STATUS_REG 0x10884
  121. #define PCI_ERROR_MASK_REG 0x10888
  122. #define PCI_ERROR_CONTROL_REG 0x1088C
  123. #define PCI_ERROR_ADRS_CAPTURE_REG 0x10890
  124. #define PCI_ERROR_DATA_CAPTURE_REG 0x10898
  125. #define PCI_ERROR_CTRL_CAPTURE_REG 0x108A0
  126. /* PCI error Register bit defines */
  127. #define PCI_ERROR_PCI_ADDR_PAR 0x00000001
  128. #define PCI_ERROR_PCI_DATA_PAR_WR 0x00000002
  129. #define PCI_ERROR_PCI_DATA_PAR_RD 0x00000004
  130. #define PCI_ERROR_PCI_NO_RSP 0x00000008
  131. #define PCI_ERROR_PCI_TAR_ABT 0x00000010
  132. #define PCI_ERROR_PCI_SERR 0x00000020
  133. #define PCI_ERROR_PCI_PERR_RD 0x00000040
  134. #define PCI_ERROR_PCI_PERR_WR 0x00000080
  135. #define PCI_ERROR_I2O_OFQO 0x00000100
  136. #define PCI_ERROR_I2O_IPQO 0x00000200
  137. #define PCI_ERROR_IRA 0x00000400
  138. #define PCI_ERROR_NMI 0x00000800
  139. #define PCI_ERROR_I2O_DBMC 0x00001000
  140. /*
  141. * Register pair used to generate configuration cycles on the PCI bus
  142. * and access the MPC826x's own PCI configuration registers.
  143. */
  144. #define PCI_CFG_ADDR_REG 0x10900
  145. #define PCI_CFG_DATA_REG 0x10904
  146. /* Bus parking decides where the bus control sits when idle */
  147. /* If modifying memory controllers for PCI park on the core */
  148. #define PPC_ACR_BUS_PARK_CORE 0x6
  149. #define PPC_ACR_BUS_PARK_PCI 0x3
  150. #endif /* __M8260_PCI_H */
  151. #endif /* __KERNEL__ */