1
2
3
4
5
6
7
8 #ifndef _QL4XNVRM_H_
9 #define _QL4XNVRM_H_
10
11
12
13
14 #define FM93C56A_SIZE_8 0x100
15 #define FM93C56A_SIZE_16 0x80
16 #define FM93C66A_SIZE_8 0x200
17 #define FM93C66A_SIZE_16 0x100
18 #define FM93C86A_SIZE_16 0x400
19
20 #define FM93C56A_START 0x1
21
22
23 #define FM93C56A_READ 0x2
24 #define FM93C56A_WEN 0x0
25 #define FM93C56A_WRITE 0x1
26 #define FM93C56A_WRITE_ALL 0x0
27 #define FM93C56A_WDS 0x0
28 #define FM93C56A_ERASE 0x3
29 #define FM93C56A_ERASE_ALL 0x0
30
31
32 #define FM93C56A_WEN_EXT 0x3
33 #define FM93C56A_WRITE_ALL_EXT 0x1
34 #define FM93C56A_WDS_EXT 0x0
35 #define FM93C56A_ERASE_ALL_EXT 0x2
36
37
38 #define FM93C56A_NO_ADDR_BITS_16 8
39 #define FM93C56A_NO_ADDR_BITS_8 9
40 #define FM93C86A_NO_ADDR_BITS_16 10
41
42
43 #define FM93C56A_DATA_BITS_16 16
44 #define FM93C56A_DATA_BITS_8 8
45
46
47 #define FM93C56A_READ_DUMMY_BITS 1
48 #define FM93C56A_READY 0
49 #define FM93C56A_BUSY 1
50 #define FM93C56A_CMD_BITS 2
51
52
53 #define AUBURN_EEPROM_DI 0x8
54 #define AUBURN_EEPROM_DI_0 0x0
55 #define AUBURN_EEPROM_DI_1 0x8
56 #define AUBURN_EEPROM_DO 0x4
57 #define AUBURN_EEPROM_DO_0 0x0
58 #define AUBURN_EEPROM_DO_1 0x4
59 #define AUBURN_EEPROM_CS 0x2
60 #define AUBURN_EEPROM_CS_0 0x0
61 #define AUBURN_EEPROM_CS_1 0x2
62 #define AUBURN_EEPROM_CLK_RISE 0x1
63 #define AUBURN_EEPROM_CLK_FALL 0x0
64
65
66
67
68 struct bios_params {
69 uint16_t SpinUpDelay:1;
70 uint16_t BIOSDisable:1;
71 uint16_t MMAPEnable:1;
72 uint16_t BootEnable:1;
73 uint16_t Reserved0:12;
74 uint8_t bootID0:7;
75 uint8_t bootID0Valid:1;
76 uint8_t bootLUN0[8];
77 uint8_t bootID1:7;
78 uint8_t bootID1Valid:1;
79 uint8_t bootLUN1[8];
80 uint16_t MaxLunsPerTarget;
81 uint8_t Reserved1[10];
82 };
83
84 struct eeprom_port_cfg {
85
86
87 u16 etherMtu_mac;
88
89
90 u16 pauseThreshold_mac;
91 u16 resumeThreshold_mac;
92 u16 reserved[13];
93 };
94
95 struct eeprom_function_cfg {
96 u8 reserved[30];
97
98
99 u8 macAddress[6];
100 u8 macAddressSecondary[6];
101 u16 subsysVendorId;
102 u16 subsysDeviceId;
103 };
104
105 struct eeprom_data {
106 union {
107 struct {
108 u8 asic_id[4];
109 u8 version;
110 u8 reserved;
111 u16 board_id;
112 #define EEPROM_BOARDID_ELDORADO 1
113 #define EEPROM_BOARDID_PLACER 2
114
115 #define EEPROM_SERIAL_NUM_SIZE 16
116 u8 serial_number[EEPROM_SERIAL_NUM_SIZE];
117
118
119
120
121
122
123
124
125 u16 ext_hw_conf;
126 u8 mac0[6];
127 u8 mac1[6];
128 u8 mac2[6];
129 u8 mac3[6];
130 u16 etherMtu;
131 u16 macConfig;
132 #define MAC_CONFIG_ENABLE_ANEG 0x0001
133 #define MAC_CONFIG_ENABLE_PAUSE 0x0002
134 u16 phyConfig;
135 #define PHY_CONFIG_PHY_ADDR_MASK 0x1f
136 #define PHY_CONFIG_ENABLE_FW_MANAGEMENT_MASK 0x20
137 u16 reserved_56;
138
139 #define EEPROM_UNUSED_1_SIZE 2
140 u8 unused_1[EEPROM_UNUSED_1_SIZE];
141 u16 bufletSize;
142 u16 bufletCount;
143 u16 bufletPauseThreshold;
144 u16 tcpWindowThreshold50;
145 u16 tcpWindowThreshold25;
146 u16 tcpWindowThreshold0;
147 u16 ipHashTableBaseHi;
148 u16 ipHashTableBaseLo;
149 u16 ipHashTableSize;
150 u16 tcpHashTableBaseHi;
151 u16 tcpHashTableBaseLo;
152 u16 tcpHashTableSize;
153 u16 ncbTableBaseHi;
154 u16 ncbTableBaseLo;
155 u16 ncbTableSize;
156 u16 drbTableBaseHi;
157 u16 drbTableBaseLo;
158 u16 drbTableSize;
159
160 #define EEPROM_UNUSED_2_SIZE 4
161 u8 unused_2[EEPROM_UNUSED_2_SIZE];
162 u16 ipReassemblyTimeout;
163 u16 tcpMaxWindowSizeHi;
164 u16 tcpMaxWindowSizeLo;
165 u32 net_ip_addr0;
166
167 u32 net_ip_addr1;
168 u32 scsi_ip_addr0;
169 u32 scsi_ip_addr1;
170 #define EEPROM_UNUSED_3_SIZE 128
171
172 u8 unused_3[EEPROM_UNUSED_3_SIZE];
173 u16 subsysVendorId_f0;
174 u16 subsysDeviceId_f0;
175
176
177 #define FM93C56A_SIGNATURE 0x9356
178 #define FM93C66A_SIGNATURE 0x9366
179 u16 signature;
180
181 #define EEPROM_UNUSED_4_SIZE 250
182 u8 unused_4[EEPROM_UNUSED_4_SIZE];
183 u16 subsysVendorId_f1;
184 u16 subsysDeviceId_f1;
185 u16 checksum;
186 } __attribute__ ((packed)) isp4010;
187 struct {
188 u8 asicId[4];
189 u8 version;
190 u8 reserved_5;
191 u16 boardId;
192 u8 boardIdStr[16];
193 u8 serialNumber[16];
194
195
196 u16 ext_hw_conf;
197
198
199 struct eeprom_port_cfg macCfg_port0;
200
201
202 struct eeprom_port_cfg macCfg_port1;
203
204
205 u16 bufletSize;
206 u16 bufletCount;
207 u16 tcpWindowThreshold50;
208 u16 tcpWindowThreshold25;
209 u16 tcpWindowThreshold0;
210 u16 ipHashTableBaseHi;
211 u16 ipHashTableBaseLo;
212 u16 ipHashTableSize;
213 u16 tcpHashTableBaseHi;
214 u16 tcpHashTableBaseLo;
215 u16 tcpHashTableSize;
216 u16 ncbTableBaseHi;
217 u16 ncbTableBaseLo;
218 u16 ncbTableSize;
219 u16 drbTableBaseHi;
220 u16 drbTableBaseLo;
221 u16 drbTableSize;
222 u16 reserved_142[4];
223
224
225 u16 ipReassemblyTimeout;
226 u16 tcpMaxWindowSize;
227 u16 ipSecurity;
228 u8 reserved_156[294];
229 u16 qDebug[8];
230 struct eeprom_function_cfg funcCfg_fn0;
231 u16 reserved_510;
232
233
234 u8 oemSpace[432];
235 struct bios_params sBIOSParams_fn1;
236 struct eeprom_function_cfg funcCfg_fn1;
237 u16 reserved_1022;
238
239
240 u8 reserved_1024[464];
241 struct eeprom_function_cfg funcCfg_fn2;
242 u16 reserved_1534;
243
244
245 u8 reserved_1536[432];
246 struct bios_params sBIOSParams_fn3;
247 struct eeprom_function_cfg funcCfg_fn3;
248 u16 checksum;
249 } __attribute__ ((packed)) isp4022;
250 };
251 };
252
253
254 #endif