forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f9004dbfff8a3fbbd7e2a88c8a4327c7f2f8e5b2
kernel/drivers/scsi/qla2xxx/qla_tmpl.h
....@@ -1,8 +1,7 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * QLogic Fibre Channel HBA Driver
34 * Copyright (c) 2003-2014 QLogic Corporation
4
- *
5
- * See LICENSE.qla2xxx for copyright and licensing details.
65 */
76
87 #ifndef __QLA_DMP27_H__
....@@ -11,23 +10,23 @@
1110 #define IOBASE_ADDR offsetof(struct device_reg_24xx, iobase_addr)
1211
1312 struct __packed qla27xx_fwdt_template {
14
- uint32_t template_type;
15
- uint32_t entry_offset;
13
+ __le32 template_type;
14
+ __le32 entry_offset;
1615 __le32 template_size;
17
- uint32_t reserved_1;
16
+ uint32_t count; /* borrow field for running/residual count */
1817
19
- uint32_t entry_count;
18
+ __le32 entry_count;
2019 uint32_t template_version;
21
- uint32_t capture_timestamp;
20
+ __le32 capture_timestamp;
2221 uint32_t template_checksum;
2322
2423 uint32_t reserved_2;
25
- uint32_t driver_info[3];
24
+ __le32 driver_info[3];
2625
2726 uint32_t saved_state[16];
2827
2928 uint32_t reserved_3[8];
30
- uint32_t firmware_version[5];
29
+ __le32 firmware_version[5];
3130 };
3231
3332 #define TEMPLATE_TYPE_FWDUMP 99
....@@ -54,6 +53,9 @@
5453 #define ENTRY_TYPE_PCICFG 273
5554 #define ENTRY_TYPE_GET_SHADOW 274
5655 #define ENTRY_TYPE_WRITE_BUF 275
56
+#define ENTRY_TYPE_CONDITIONAL 276
57
+#define ENTRY_TYPE_RDPEPREG 277
58
+#define ENTRY_TYPE_WRPEPREG 278
5759
5860 #define CAPTURE_FLAG_PHYS_ONLY BIT_0
5961 #define CAPTURE_FLAG_PHYS_VIRT BIT_1
....@@ -62,8 +64,8 @@
6264
6365 struct __packed qla27xx_fwdt_entry {
6466 struct __packed {
65
- uint32_t entry_type;
66
- uint32_t entry_size;
67
+ __le32 type;
68
+ __le32 size;
6769 uint32_t reserved_1;
6870
6971 uint8_t capture_flags;
....@@ -78,36 +80,36 @@
7880 } t255;
7981
8082 struct __packed {
81
- uint32_t base_addr;
83
+ __le32 base_addr;
8284 uint8_t reg_width;
83
- uint16_t reg_count;
85
+ __le16 reg_count;
8486 uint8_t pci_offset;
8587 } t256;
8688
8789 struct __packed {
88
- uint32_t base_addr;
89
- uint32_t write_data;
90
+ __le32 base_addr;
91
+ __le32 write_data;
9092 uint8_t pci_offset;
9193 uint8_t reserved[3];
9294 } t257;
9395
9496 struct __packed {
95
- uint32_t base_addr;
97
+ __le32 base_addr;
9698 uint8_t reg_width;
97
- uint16_t reg_count;
99
+ __le16 reg_count;
98100 uint8_t pci_offset;
99101 uint8_t banksel_offset;
100102 uint8_t reserved[3];
101
- uint32_t bank;
103
+ __le32 bank;
102104 } t258;
103105
104106 struct __packed {
105
- uint32_t base_addr;
106
- uint32_t write_data;
107
+ __le32 base_addr;
108
+ __le32 write_data;
107109 uint8_t reserved[2];
108110 uint8_t pci_offset;
109111 uint8_t banksel_offset;
110
- uint32_t bank;
112
+ __le32 bank;
111113 } t259;
112114
113115 struct __packed {
....@@ -118,14 +120,14 @@
118120 struct __packed {
119121 uint8_t pci_offset;
120122 uint8_t reserved[3];
121
- uint32_t write_data;
123
+ __le32 write_data;
122124 } t261;
123125
124126 struct __packed {
125127 uint8_t ram_area;
126128 uint8_t reserved[3];
127
- uint32_t start_addr;
128
- uint32_t end_addr;
129
+ __le32 start_addr;
130
+ __le32 end_addr;
129131 } t262;
130132
131133 struct __packed {
....@@ -155,7 +157,7 @@
155157 struct __packed {
156158 uint8_t pci_offset;
157159 uint8_t reserved[3];
158
- uint32_t data;
160
+ __le32 data;
159161 } t267;
160162
161163 struct __packed {
....@@ -170,23 +172,23 @@
170172 } t269;
171173
172174 struct __packed {
173
- uint32_t addr;
174
- uint32_t count;
175
+ __le32 addr;
176
+ __le32 count;
175177 } t270;
176178
177179 struct __packed {
178
- uint32_t addr;
179
- uint32_t data;
180
+ __le32 addr;
181
+ __le32 data;
180182 } t271;
181183
182184 struct __packed {
183
- uint32_t addr;
184
- uint32_t count;
185
+ __le32 addr;
186
+ __le32 count;
185187 } t272;
186188
187189 struct __packed {
188
- uint32_t addr;
189
- uint32_t count;
190
+ __le32 addr;
191
+ __le32 count;
190192 } t273;
191193
192194 struct __packed {
....@@ -196,9 +198,27 @@
196198 } t274;
197199
198200 struct __packed {
199
- uint32_t length;
201
+ __le32 length;
200202 uint8_t buffer[];
201203 } t275;
204
+
205
+ struct __packed {
206
+ __le32 cond1;
207
+ __le32 cond2;
208
+ } t276;
209
+
210
+ struct __packed {
211
+ __le32 cmd_addr;
212
+ __le32 wr_cmd_data;
213
+ __le32 data_addr;
214
+ } t277;
215
+
216
+ struct __packed {
217
+ __le32 cmd_addr;
218
+ __le32 wr_cmd_data;
219
+ __le32 data_addr;
220
+ __le32 wr_data;
221
+ } t278;
202222 };
203223 };
204224
....@@ -206,6 +226,7 @@
206226 #define T262_RAM_AREA_EXTERNAL_RAM 2
207227 #define T262_RAM_AREA_SHARED_RAM 3
208228 #define T262_RAM_AREA_DDR_RAM 4
229
+#define T262_RAM_AREA_MISC 5
209230
210231 #define T263_QUEUE_TYPE_REQ 1
211232 #define T263_QUEUE_TYPE_RSP 2