New upstream version 18.02
[deb_dpdk.git] / drivers / net / sfc / base / efx_check.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  *
3  * Copyright (c) 2012-2018 Solarflare Communications Inc.
4  * All rights reserved.
5  */
6
7 #ifndef _SYS_EFX_CHECK_H
8 #define _SYS_EFX_CHECK_H
9
10 #include "efsys.h"
11
12 /*
13  * Check that the efsys.h header in client code has a valid combination of
14  * EFSYS_OPT_xxx options.
15  *
16  * NOTE: Keep checks for obsolete options here to ensure that they are removed
17  * from client code (and do not reappear in merges from other branches).
18  */
19
20 #ifdef EFSYS_OPT_FALCON
21 # error "FALCON is obsolete and is not supported."
22 #endif
23
24 #if EFSYS_OPT_BOOTCFG
25 /* Support NVRAM based boot config */
26 # if !EFSYS_OPT_NVRAM
27 #  error "BOOTCFG requires NVRAM"
28 # endif
29 #endif /* EFSYS_OPT_BOOTCFG */
30
31 #if EFSYS_OPT_CHECK_REG
32 /* Verify chip implements accessed registers */
33 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
34 #  error "CHECK_REG requires SIENA or HUNTINGTON or MEDFORD"
35 # endif
36 #endif /* EFSYS_OPT_CHECK_REG */
37
38 #if EFSYS_OPT_DECODE_INTR_FATAL
39 /* Decode fatal errors */
40 # if !EFSYS_OPT_SIENA
41 #  error "INTR_FATAL requires SIENA"
42 # endif
43 #endif /* EFSYS_OPT_DECODE_INTR_FATAL */
44
45 #if EFSYS_OPT_DIAG
46 /* Support diagnostic hardware tests */
47 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
48 #  error "DIAG requires SIENA or HUNTINGTON or MEDFORD"
49 # endif
50 #endif /* EFSYS_OPT_DIAG */
51
52 #if EFSYS_OPT_EV_PREFETCH
53 /* Support optimized EVQ data access */
54 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
55 #  error "EV_PREFETCH requires SIENA or HUNTINGTON or MEDFORD"
56 # endif
57 #endif /* EFSYS_OPT_EV_PREFETCH */
58
59 #ifdef EFSYS_OPT_FALCON_NIC_CFG_OVERRIDE
60 # error "FALCON_NIC_CFG_OVERRIDE is obsolete and is not supported."
61 #endif
62
63 #if EFSYS_OPT_FILTER
64 /* Support hardware packet filters */
65 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
66 #  error "FILTER requires SIENA or HUNTINGTON or MEDFORD"
67 # endif
68 #endif /* EFSYS_OPT_FILTER */
69
70 #if (EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
71 # if !EFSYS_OPT_FILTER
72 #  error "HUNTINGTON or MEDFORD requires FILTER"
73 # endif
74 #endif /* EFSYS_OPT_HUNTINGTON */
75
76 #if EFSYS_OPT_LOOPBACK
77 /* Support hardware loopback modes */
78 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
79 #  error "LOOPBACK requires SIENA or HUNTINGTON or MEDFORD"
80 # endif
81 #endif /* EFSYS_OPT_LOOPBACK */
82
83 #ifdef EFSYS_OPT_MAC_FALCON_GMAC
84 # error "MAC_FALCON_GMAC is obsolete and is not supported."
85 #endif
86
87 #ifdef EFSYS_OPT_MAC_FALCON_XMAC
88 # error "MAC_FALCON_XMAC is obsolete and is not supported."
89 #endif
90
91 #if EFSYS_OPT_MAC_STATS
92 /* Support MAC statistics */
93 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
94 #  error "MAC_STATS requires SIENA or HUNTINGTON or MEDFORD"
95 # endif
96 #endif /* EFSYS_OPT_MAC_STATS */
97
98 #if EFSYS_OPT_MCDI
99 /* Support management controller messages */
100 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
101 #  error "MCDI requires SIENA or HUNTINGTON or MEDFORD"
102 # endif
103 #endif /* EFSYS_OPT_MCDI */
104
105 #if (EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
106 # if !EFSYS_OPT_MCDI
107 #  error "SIENA or HUNTINGTON or MEDFORD requires MCDI"
108 # endif
109 #endif
110
111 #if EFSYS_OPT_MCDI_LOGGING
112 /* Support MCDI logging */
113 # if !EFSYS_OPT_MCDI
114 #  error "MCDI_LOGGING requires MCDI"
115 # endif
116 #endif /* EFSYS_OPT_MCDI_LOGGING */
117
118 #if EFSYS_OPT_MCDI_PROXY_AUTH
119 /* Support MCDI proxy authorization */
120 # if !EFSYS_OPT_MCDI
121 #  error "MCDI_PROXY_AUTH requires MCDI"
122 # endif
123 #endif /* EFSYS_OPT_MCDI_PROXY_AUTH */
124
125 #ifdef EFSYS_OPT_MON_LM87
126 # error "MON_LM87 is obsolete and is not supported."
127 #endif
128
129 #ifdef EFSYS_OPT_MON_MAX6647
130 # error "MON_MAX6647 is obsolete and is not supported."
131 #endif
132
133 #ifdef EFSYS_OPT_MON_NULL
134 # error "MON_NULL is obsolete and is not supported."
135 #endif
136
137 #ifdef EFSYS_OPT_MON_SIENA
138 #  error "MON_SIENA is obsolete (replaced by MON_MCDI)."
139 #endif
140
141 #ifdef EFSYS_OPT_MON_HUNTINGTON
142 #  error "MON_HUNTINGTON is obsolete (replaced by MON_MCDI)."
143 #endif
144
145 #if EFSYS_OPT_MON_STATS
146 /* Support monitor statistics (voltage/temperature) */
147 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
148 #  error "MON_STATS requires SIENA or HUNTINGTON or MEDFORD"
149 # endif
150 #endif /* EFSYS_OPT_MON_STATS */
151
152 #if EFSYS_OPT_MON_MCDI
153 /* Support Monitor via mcdi */
154 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
155 #  error "MON_MCDI requires SIENA or HUNTINGTON or MEDFORD"
156 # endif
157 #endif /* EFSYS_OPT_MON_MCDI*/
158
159 #if EFSYS_OPT_NAMES
160 /* Support printable names for statistics */
161 # if !(EFSYS_OPT_LOOPBACK || EFSYS_OPT_MAC_STATS || EFSYS_OPT_MCDI || \
162         EFSYS_MON_STATS || EFSYS_OPT_PHY_STATS || EFSYS_OPT_QSTATS)
163 #  error "NAMES requires LOOPBACK or xxxSTATS or MCDI"
164 # endif
165 #endif /* EFSYS_OPT_NAMES */
166
167 #if EFSYS_OPT_NVRAM
168 /* Support non volatile configuration */
169 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
170 #  error "NVRAM requires SIENA or HUNTINGTON or MEDFORD"
171 # endif
172 #endif /* EFSYS_OPT_NVRAM */
173
174 #ifdef EFSYS_OPT_NVRAM_FALCON_BOOTROM
175 # error "NVRAM_FALCON_BOOTROM is obsolete and is not supported."
176 #endif
177
178 #ifdef EFSYS_OPT_NVRAM_SFT9001
179 # error "NVRAM_SFT9001 is obsolete and is not supported."
180 #endif
181
182 #ifdef EFSYS_OPT_NVRAM_SFX7101
183 # error "NVRAM_SFX7101 is obsolete and is not supported."
184 #endif
185
186 #ifdef EFSYS_OPT_PCIE_TUNE
187 # error "PCIE_TUNE is obsolete and is not supported."
188 #endif
189
190 #ifdef EFSYS_OPT_PHY_BIST
191 # error "PHY_BIST is obsolete (replaced by BIST)."
192 #endif
193
194 #if EFSYS_OPT_PHY_FLAGS
195 /* Support PHY flags */
196 # if !EFSYS_OPT_SIENA
197 #  error "PHY_FLAGS requires SIENA"
198 # endif
199 #endif /* EFSYS_OPT_PHY_FLAGS */
200
201 #if EFSYS_OPT_PHY_LED_CONTROL
202 /* Support for PHY LED control */
203 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
204 #  error "PHY_LED_CONTROL requires SIENA or HUNTINGTON or MEDFORD"
205 # endif
206 #endif /* EFSYS_OPT_PHY_LED_CONTROL */
207
208 #ifdef EFSYS_OPT_PHY_NULL
209 # error "PHY_NULL is obsolete and is not supported."
210 #endif
211
212 #ifdef EFSYS_OPT_PHY_PM8358
213 # error "PHY_PM8358 is obsolete and is not supported."
214 #endif
215
216 #ifdef EFSYS_OPT_PHY_PROPS
217 # error "PHY_PROPS is obsolete and is not supported."
218 #endif
219
220 #ifdef EFSYS_OPT_PHY_QT2022C2
221 # error "PHY_QT2022C2 is obsolete and is not supported."
222 #endif
223
224 #ifdef EFSYS_OPT_PHY_QT2025C
225 # error "PHY_QT2025C is obsolete and is not supported."
226 #endif
227
228 #ifdef EFSYS_OPT_PHY_SFT9001
229 # error "PHY_SFT9001 is obsolete and is not supported."
230 #endif
231
232 #ifdef EFSYS_OPT_PHY_SFX7101
233 # error "PHY_SFX7101 is obsolete and is not supported."
234 #endif
235
236 #if EFSYS_OPT_PHY_STATS
237 /* Support PHY statistics */
238 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
239 #  error "PHY_STATS requires SIENA or HUNTINGTON or MEDFORD"
240 # endif
241 #endif /* EFSYS_OPT_PHY_STATS */
242
243 #ifdef EFSYS_OPT_PHY_TXC43128
244 # error "PHY_TXC43128 is obsolete and is not supported."
245 #endif
246
247 #if EFSYS_OPT_QSTATS
248 /* Support EVQ/RXQ/TXQ statistics */
249 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
250 #  error "QSTATS requires SIENA or HUNTINGTON or MEDFORD"
251 # endif
252 #endif /* EFSYS_OPT_QSTATS */
253
254 #ifdef EFSYS_OPT_RX_HDR_SPLIT
255 # error "RX_HDR_SPLIT is obsolete and is not supported"
256 #endif
257
258 #if EFSYS_OPT_RX_SCALE
259 /* Support receive scaling (RSS) */
260 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
261 #  error "RX_SCALE requires SIENA or HUNTINGTON or MEDFORD"
262 # endif
263 #endif /* EFSYS_OPT_RX_SCALE */
264
265 #if EFSYS_OPT_RX_SCATTER
266 /* Support receive scatter DMA */
267 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
268 #  error "RX_SCATTER requires SIENA or HUNTINGTON or MEDFORD"
269 # endif
270 #endif /* EFSYS_OPT_RX_SCATTER */
271
272 #ifdef EFSYS_OPT_STAT_NAME
273 # error "STAT_NAME is obsolete (replaced by NAMES)."
274 #endif
275
276 #if EFSYS_OPT_VPD
277 /* Support PCI Vital Product Data (VPD) */
278 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
279 #  error "VPD requires SIENA or HUNTINGTON or MEDFORD"
280 # endif
281 #endif /* EFSYS_OPT_VPD */
282
283 #ifdef EFSYS_OPT_WOL
284 # error "WOL is obsolete and is not supported"
285 #endif /* EFSYS_OPT_WOL */
286
287 #ifdef EFSYS_OPT_MCAST_FILTER_LIST
288 #  error "MCAST_FILTER_LIST is obsolete and is not supported"
289 #endif
290
291 #if EFSYS_OPT_BIST
292 /* Support BIST */
293 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
294 #  error "BIST requires SIENA or HUNTINGTON or MEDFORD"
295 # endif
296 #endif /* EFSYS_OPT_BIST */
297
298 #if EFSYS_OPT_LICENSING
299 /* Support MCDI licensing API */
300 # if !EFSYS_OPT_MCDI
301 #  error "LICENSING requires MCDI"
302 # endif
303 # if !EFSYS_HAS_UINT64
304 #  error "LICENSING requires UINT64"
305 # endif
306 #endif /* EFSYS_OPT_LICENSING */
307
308 #if EFSYS_OPT_ALLOW_UNCONFIGURED_NIC
309 /* Support adapters with missing static config (for factory use only) */
310 # if !EFSYS_OPT_MEDFORD
311 #  error "ALLOW_UNCONFIGURED_NIC requires MEDFORD"
312 # endif
313 #endif /* EFSYS_OPT_ALLOW_UNCONFIGURED_NIC */
314
315 #if EFSYS_OPT_RX_PACKED_STREAM
316 /* Support packed stream mode */
317 # if !(EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
318 #  error "PACKED_STREAM requires HUNTINGTON or MEDFORD"
319 # endif
320 #endif
321
322 /* Support hardware assistance for tunnels */
323 #if EFSYS_OPT_TUNNEL
324 # if !EFSYS_OPT_MEDFORD
325 #  error "TUNNEL requires MEDFORD"
326 # endif
327 #endif /* EFSYS_OPT_TUNNEL */
328
329 #endif /* _SYS_EFX_CHECK_H */