tiocp.h 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. /*
  2. * This file is subject to the terms and conditions of the GNU General Public
  3. * License. See the file "COPYING" in the main directory of this archive
  4. * for more details.
  5. *
  6. * Copyright (C) 2003-2005 Silicon Graphics, Inc. All rights reserved.
  7. */
  8. #ifndef _ASM_IA64_SN_PCI_TIOCP_H
  9. #define _ASM_IA64_SN_PCI_TIOCP_H
  10. #define TIOCP_HOST_INTR_ADDR 0x003FFFFFFFFFFFFFUL
  11. #define TIOCP_PCI64_CMDTYPE_MEM (0x1ull << 60)
  12. #define TIOCP_PCI64_CMDTYPE_MSI (0x3ull << 60)
  13. /*****************************************************************************
  14. *********************** TIOCP MMR structure mapping ***************************
  15. *****************************************************************************/
  16. struct tiocp{
  17. /* 0x000000-0x00FFFF -- Local Registers */
  18. /* 0x000000-0x000057 -- (Legacy Widget Space) Configuration */
  19. u64 cp_id; /* 0x000000 */
  20. u64 cp_stat; /* 0x000008 */
  21. u64 cp_err_upper; /* 0x000010 */
  22. u64 cp_err_lower; /* 0x000018 */
  23. #define cp_err cp_err_lower
  24. u64 cp_control; /* 0x000020 */
  25. u64 cp_req_timeout; /* 0x000028 */
  26. u64 cp_intr_upper; /* 0x000030 */
  27. u64 cp_intr_lower; /* 0x000038 */
  28. #define cp_intr cp_intr_lower
  29. u64 cp_err_cmdword; /* 0x000040 */
  30. u64 _pad_000048; /* 0x000048 */
  31. u64 cp_tflush; /* 0x000050 */
  32. /* 0x000058-0x00007F -- Bridge-specific Configuration */
  33. u64 cp_aux_err; /* 0x000058 */
  34. u64 cp_resp_upper; /* 0x000060 */
  35. u64 cp_resp_lower; /* 0x000068 */
  36. #define cp_resp cp_resp_lower
  37. u64 cp_tst_pin_ctrl; /* 0x000070 */
  38. u64 cp_addr_lkerr; /* 0x000078 */
  39. /* 0x000080-0x00008F -- PMU & MAP */
  40. u64 cp_dir_map; /* 0x000080 */
  41. u64 _pad_000088; /* 0x000088 */
  42. /* 0x000090-0x00009F -- SSRAM */
  43. u64 cp_map_fault; /* 0x000090 */
  44. u64 _pad_000098; /* 0x000098 */
  45. /* 0x0000A0-0x0000AF -- Arbitration */
  46. u64 cp_arb; /* 0x0000A0 */
  47. u64 _pad_0000A8; /* 0x0000A8 */
  48. /* 0x0000B0-0x0000BF -- Number In A Can or ATE Parity Error */
  49. u64 cp_ate_parity_err; /* 0x0000B0 */
  50. u64 _pad_0000B8; /* 0x0000B8 */
  51. /* 0x0000C0-0x0000FF -- PCI/GIO */
  52. u64 cp_bus_timeout; /* 0x0000C0 */
  53. u64 cp_pci_cfg; /* 0x0000C8 */
  54. u64 cp_pci_err_upper; /* 0x0000D0 */
  55. u64 cp_pci_err_lower; /* 0x0000D8 */
  56. #define cp_pci_err cp_pci_err_lower
  57. u64 _pad_0000E0[4]; /* 0x0000{E0..F8} */
  58. /* 0x000100-0x0001FF -- Interrupt */
  59. u64 cp_int_status; /* 0x000100 */
  60. u64 cp_int_enable; /* 0x000108 */
  61. u64 cp_int_rst_stat; /* 0x000110 */
  62. u64 cp_int_mode; /* 0x000118 */
  63. u64 cp_int_device; /* 0x000120 */
  64. u64 cp_int_host_err; /* 0x000128 */
  65. u64 cp_int_addr[8]; /* 0x0001{30,,,68} */
  66. u64 cp_err_int_view; /* 0x000170 */
  67. u64 cp_mult_int; /* 0x000178 */
  68. u64 cp_force_always[8]; /* 0x0001{80,,,B8} */
  69. u64 cp_force_pin[8]; /* 0x0001{C0,,,F8} */
  70. /* 0x000200-0x000298 -- Device */
  71. u64 cp_device[4]; /* 0x0002{00,,,18} */
  72. u64 _pad_000220[4]; /* 0x0002{20,,,38} */
  73. u64 cp_wr_req_buf[4]; /* 0x0002{40,,,58} */
  74. u64 _pad_000260[4]; /* 0x0002{60,,,78} */
  75. u64 cp_rrb_map[2]; /* 0x0002{80,,,88} */
  76. #define cp_even_resp cp_rrb_map[0] /* 0x000280 */
  77. #define cp_odd_resp cp_rrb_map[1] /* 0x000288 */
  78. u64 cp_resp_status; /* 0x000290 */
  79. u64 cp_resp_clear; /* 0x000298 */
  80. u64 _pad_0002A0[12]; /* 0x0002{A0..F8} */
  81. /* 0x000300-0x0003F8 -- Buffer Address Match Registers */
  82. struct {
  83. u64 upper; /* 0x0003{00,,,F0} */
  84. u64 lower; /* 0x0003{08,,,F8} */
  85. } cp_buf_addr_match[16];
  86. /* 0x000400-0x0005FF -- Performance Monitor Registers (even only) */
  87. struct {
  88. u64 flush_w_touch; /* 0x000{400,,,5C0} */
  89. u64 flush_wo_touch; /* 0x000{408,,,5C8} */
  90. u64 inflight; /* 0x000{410,,,5D0} */
  91. u64 prefetch; /* 0x000{418,,,5D8} */
  92. u64 total_pci_retry; /* 0x000{420,,,5E0} */
  93. u64 max_pci_retry; /* 0x000{428,,,5E8} */
  94. u64 max_latency; /* 0x000{430,,,5F0} */
  95. u64 clear_all; /* 0x000{438,,,5F8} */
  96. } cp_buf_count[8];
  97. /* 0x000600-0x0009FF -- PCI/X registers */
  98. u64 cp_pcix_bus_err_addr; /* 0x000600 */
  99. u64 cp_pcix_bus_err_attr; /* 0x000608 */
  100. u64 cp_pcix_bus_err_data; /* 0x000610 */
  101. u64 cp_pcix_pio_split_addr; /* 0x000618 */
  102. u64 cp_pcix_pio_split_attr; /* 0x000620 */
  103. u64 cp_pcix_dma_req_err_attr; /* 0x000628 */
  104. u64 cp_pcix_dma_req_err_addr; /* 0x000630 */
  105. u64 cp_pcix_timeout; /* 0x000638 */
  106. u64 _pad_000640[24]; /* 0x000{640,,,6F8} */
  107. /* 0x000700-0x000737 -- Debug Registers */
  108. u64 cp_ct_debug_ctl; /* 0x000700 */
  109. u64 cp_br_debug_ctl; /* 0x000708 */
  110. u64 cp_mux3_debug_ctl; /* 0x000710 */
  111. u64 cp_mux4_debug_ctl; /* 0x000718 */
  112. u64 cp_mux5_debug_ctl; /* 0x000720 */
  113. u64 cp_mux6_debug_ctl; /* 0x000728 */
  114. u64 cp_mux7_debug_ctl; /* 0x000730 */
  115. u64 _pad_000738[89]; /* 0x000{738,,,9F8} */
  116. /* 0x000A00-0x000BFF -- PCI/X Read&Write Buffer */
  117. struct {
  118. u64 cp_buf_addr; /* 0x000{A00,,,AF0} */
  119. u64 cp_buf_attr; /* 0X000{A08,,,AF8} */
  120. } cp_pcix_read_buf_64[16];
  121. struct {
  122. u64 cp_buf_addr; /* 0x000{B00,,,BE0} */
  123. u64 cp_buf_attr; /* 0x000{B08,,,BE8} */
  124. u64 cp_buf_valid; /* 0x000{B10,,,BF0} */
  125. u64 __pad1; /* 0x000{B18,,,BF8} */
  126. } cp_pcix_write_buf_64[8];
  127. /* End of Local Registers -- Start of Address Map space */
  128. char _pad_000c00[0x010000 - 0x000c00];
  129. /* 0x010000-0x011FF8 -- Internal ATE RAM (Auto Parity Generation) */
  130. u64 cp_int_ate_ram[1024]; /* 0x010000-0x011FF8 */
  131. char _pad_012000[0x14000 - 0x012000];
  132. /* 0x014000-0x015FF8 -- Internal ATE RAM (Manual Parity Generation) */
  133. u64 cp_int_ate_ram_mp[1024]; /* 0x014000-0x015FF8 */
  134. char _pad_016000[0x18000 - 0x016000];
  135. /* 0x18000-0x197F8 -- TIOCP Write Request Ram */
  136. u64 cp_wr_req_lower[256]; /* 0x18000 - 0x187F8 */
  137. u64 cp_wr_req_upper[256]; /* 0x18800 - 0x18FF8 */
  138. u64 cp_wr_req_parity[256]; /* 0x19000 - 0x197F8 */
  139. char _pad_019800[0x1C000 - 0x019800];
  140. /* 0x1C000-0x1EFF8 -- TIOCP Read Response Ram */
  141. u64 cp_rd_resp_lower[512]; /* 0x1C000 - 0x1CFF8 */
  142. u64 cp_rd_resp_upper[512]; /* 0x1D000 - 0x1DFF8 */
  143. u64 cp_rd_resp_parity[512]; /* 0x1E000 - 0x1EFF8 */
  144. char _pad_01F000[0x20000 - 0x01F000];
  145. /* 0x020000-0x021FFF -- Host Device (CP) Configuration Space (not used) */
  146. char _pad_020000[0x021000 - 0x20000];
  147. /* 0x021000-0x027FFF -- PCI Device Configuration Spaces */
  148. union {
  149. u8 c[0x1000 / 1]; /* 0x02{0000,,,7FFF} */
  150. u16 s[0x1000 / 2]; /* 0x02{0000,,,7FFF} */
  151. u32 l[0x1000 / 4]; /* 0x02{0000,,,7FFF} */
  152. u64 d[0x1000 / 8]; /* 0x02{0000,,,7FFF} */
  153. union {
  154. u8 c[0x100 / 1];
  155. u16 s[0x100 / 2];
  156. u32 l[0x100 / 4];
  157. u64 d[0x100 / 8];
  158. } f[8];
  159. } cp_type0_cfg_dev[7]; /* 0x02{1000,,,7FFF} */
  160. /* 0x028000-0x028FFF -- PCI Type 1 Configuration Space */
  161. union {
  162. u8 c[0x1000 / 1]; /* 0x028000-0x029000 */
  163. u16 s[0x1000 / 2]; /* 0x028000-0x029000 */
  164. u32 l[0x1000 / 4]; /* 0x028000-0x029000 */
  165. u64 d[0x1000 / 8]; /* 0x028000-0x029000 */
  166. union {
  167. u8 c[0x100 / 1];
  168. u16 s[0x100 / 2];
  169. u32 l[0x100 / 4];
  170. u64 d[0x100 / 8];
  171. } f[8];
  172. } cp_type1_cfg; /* 0x028000-0x029000 */
  173. char _pad_029000[0x030000-0x029000];
  174. /* 0x030000-0x030007 -- PCI Interrupt Acknowledge Cycle */
  175. union {
  176. u8 c[8 / 1];
  177. u16 s[8 / 2];
  178. u32 l[8 / 4];
  179. u64 d[8 / 8];
  180. } cp_pci_iack; /* 0x030000-0x030007 */
  181. char _pad_030007[0x040000-0x030008];
  182. /* 0x040000-0x040007 -- PCIX Special Cycle */
  183. union {
  184. u8 c[8 / 1];
  185. u16 s[8 / 2];
  186. u32 l[8 / 4];
  187. u64 d[8 / 8];
  188. } cp_pcix_cycle; /* 0x040000-0x040007 */
  189. char _pad_040007[0x200000-0x040008];
  190. /* 0x200000-0x7FFFFF -- PCI/GIO Device Spaces */
  191. union {
  192. u8 c[0x100000 / 1];
  193. u16 s[0x100000 / 2];
  194. u32 l[0x100000 / 4];
  195. u64 d[0x100000 / 8];
  196. } cp_devio_raw[6]; /* 0x200000-0x7FFFFF */
  197. #define cp_devio(n) cp_devio_raw[((n)<2)?(n*2):(n+2)]
  198. char _pad_800000[0xA00000-0x800000];
  199. /* 0xA00000-0xBFFFFF -- PCI/GIO Device Spaces w/flush */
  200. union {
  201. u8 c[0x100000 / 1];
  202. u16 s[0x100000 / 2];
  203. u32 l[0x100000 / 4];
  204. u64 d[0x100000 / 8];
  205. } cp_devio_raw_flush[6]; /* 0xA00000-0xBFFFFF */
  206. #define cp_devio_flush(n) cp_devio_raw_flush[((n)<2)?(n*2):(n+2)]
  207. };
  208. #endif /* _ASM_IA64_SN_PCI_TIOCP_H */