qla_tmpl.h 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. /*
  2. * QLogic Fibre Channel HBA Driver
  3. * Copyright (c) 2003-2014 QLogic Corporation
  4. *
  5. * See LICENSE.qla2xxx for copyright and licensing details.
  6. */
  7. #ifndef __QLA_DMP27_H__
  8. #define __QLA_DMP27_H__
  9. #define IOBASE_ADDR offsetof(struct device_reg_24xx, iobase_addr)
  10. struct __packed qla27xx_fwdt_template {
  11. uint32_t template_type;
  12. uint32_t entry_offset;
  13. uint32_t template_size;
  14. uint32_t reserved_1;
  15. uint32_t entry_count;
  16. uint32_t template_version;
  17. uint32_t capture_timestamp;
  18. uint32_t template_checksum;
  19. uint32_t reserved_2;
  20. uint32_t driver_info[3];
  21. uint32_t saved_state[16];
  22. uint32_t reserved_3[8];
  23. uint32_t firmware_version[5];
  24. };
  25. #define TEMPLATE_TYPE_FWDUMP 99
  26. #define ENTRY_TYPE_NOP 0
  27. #define ENTRY_TYPE_TMP_END 255
  28. #define ENTRY_TYPE_RD_IOB_T1 256
  29. #define ENTRY_TYPE_WR_IOB_T1 257
  30. #define ENTRY_TYPE_RD_IOB_T2 258
  31. #define ENTRY_TYPE_WR_IOB_T2 259
  32. #define ENTRY_TYPE_RD_PCI 260
  33. #define ENTRY_TYPE_WR_PCI 261
  34. #define ENTRY_TYPE_RD_RAM 262
  35. #define ENTRY_TYPE_GET_QUEUE 263
  36. #define ENTRY_TYPE_GET_FCE 264
  37. #define ENTRY_TYPE_PSE_RISC 265
  38. #define ENTRY_TYPE_RST_RISC 266
  39. #define ENTRY_TYPE_DIS_INTR 267
  40. #define ENTRY_TYPE_GET_HBUF 268
  41. #define ENTRY_TYPE_SCRATCH 269
  42. #define ENTRY_TYPE_RDREMREG 270
  43. #define ENTRY_TYPE_WRREMREG 271
  44. #define ENTRY_TYPE_RDREMRAM 272
  45. #define ENTRY_TYPE_PCICFG 273
  46. #define ENTRY_TYPE_GET_SHADOW 274
  47. #define ENTRY_TYPE_WRITE_BUF 275
  48. #define CAPTURE_FLAG_PHYS_ONLY BIT_0
  49. #define CAPTURE_FLAG_PHYS_VIRT BIT_1
  50. #define DRIVER_FLAG_SKIP_ENTRY BIT_7
  51. struct __packed qla27xx_fwdt_entry {
  52. struct __packed {
  53. uint32_t entry_type;
  54. uint32_t entry_size;
  55. uint32_t reserved_1;
  56. uint8_t capture_flags;
  57. uint8_t reserved_2[2];
  58. uint8_t driver_flags;
  59. } hdr;
  60. union __packed {
  61. struct __packed {
  62. } t0;
  63. struct __packed {
  64. } t255;
  65. struct __packed {
  66. uint32_t base_addr;
  67. uint8_t reg_width;
  68. uint16_t reg_count;
  69. uint8_t pci_offset;
  70. } t256;
  71. struct __packed {
  72. uint32_t base_addr;
  73. uint32_t write_data;
  74. uint8_t pci_offset;
  75. uint8_t reserved[3];
  76. } t257;
  77. struct __packed {
  78. uint32_t base_addr;
  79. uint8_t reg_width;
  80. uint16_t reg_count;
  81. uint8_t pci_offset;
  82. uint8_t banksel_offset;
  83. uint8_t reserved[3];
  84. uint32_t bank;
  85. } t258;
  86. struct __packed {
  87. uint32_t base_addr;
  88. uint32_t write_data;
  89. uint8_t reserved[2];
  90. uint8_t pci_offset;
  91. uint8_t banksel_offset;
  92. uint32_t bank;
  93. } t259;
  94. struct __packed {
  95. uint8_t pci_offset;
  96. uint8_t reserved[3];
  97. } t260;
  98. struct __packed {
  99. uint8_t pci_offset;
  100. uint8_t reserved[3];
  101. uint32_t write_data;
  102. } t261;
  103. struct __packed {
  104. uint8_t ram_area;
  105. uint8_t reserved[3];
  106. uint32_t start_addr;
  107. uint32_t end_addr;
  108. } t262;
  109. struct __packed {
  110. uint32_t num_queues;
  111. uint8_t queue_type;
  112. uint8_t reserved[3];
  113. } t263;
  114. struct __packed {
  115. uint32_t fce_trace_size;
  116. uint64_t write_pointer;
  117. uint64_t base_pointer;
  118. uint32_t fce_enable_mb0;
  119. uint32_t fce_enable_mb2;
  120. uint32_t fce_enable_mb3;
  121. uint32_t fce_enable_mb4;
  122. uint32_t fce_enable_mb5;
  123. uint32_t fce_enable_mb6;
  124. } t264;
  125. struct __packed {
  126. } t265;
  127. struct __packed {
  128. } t266;
  129. struct __packed {
  130. uint8_t pci_offset;
  131. uint8_t reserved[3];
  132. uint32_t data;
  133. } t267;
  134. struct __packed {
  135. uint8_t buf_type;
  136. uint8_t reserved[3];
  137. uint32_t buf_size;
  138. uint64_t start_addr;
  139. } t268;
  140. struct __packed {
  141. uint32_t scratch_size;
  142. } t269;
  143. struct __packed {
  144. uint32_t addr;
  145. uint32_t count;
  146. } t270;
  147. struct __packed {
  148. uint32_t addr;
  149. uint32_t data;
  150. } t271;
  151. struct __packed {
  152. uint32_t addr;
  153. uint32_t count;
  154. } t272;
  155. struct __packed {
  156. uint32_t addr;
  157. uint32_t count;
  158. } t273;
  159. struct __packed {
  160. uint32_t num_queues;
  161. uint8_t queue_type;
  162. uint8_t reserved[3];
  163. } t274;
  164. struct __packed {
  165. uint32_t length;
  166. uint8_t buffer[];
  167. } t275;
  168. };
  169. };
  170. #define T262_RAM_AREA_CRITICAL_RAM 1
  171. #define T262_RAM_AREA_EXTERNAL_RAM 2
  172. #define T262_RAM_AREA_SHARED_RAM 3
  173. #define T262_RAM_AREA_DDR_RAM 4
  174. #define T263_QUEUE_TYPE_REQ 1
  175. #define T263_QUEUE_TYPE_RSP 2
  176. #define T263_QUEUE_TYPE_ATIO 3
  177. #define T268_BUF_TYPE_EXTD_TRACE 1
  178. #define T268_BUF_TYPE_EXCH_BUFOFF 2
  179. #define T268_BUF_TYPE_EXTD_LOGIN 3
  180. #define T268_BUF_TYPE_REQ_MIRROR 4
  181. #define T268_BUF_TYPE_RSP_MIRROR 5
  182. #define T274_QUEUE_TYPE_REQ_SHAD 1
  183. #define T274_QUEUE_TYPE_RSP_SHAD 2
  184. #define T274_QUEUE_TYPE_ATIO_SHAD 3
  185. #endif