net/sfc/base: import SFN7xxx family support
[dpdk.git] / drivers / net / sfc / base / efx_check.h
1 /*
2  * Copyright (c) 2012-2016 Solarflare Communications Inc.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  *
8  * 1. Redistributions of source code must retain the above copyright notice,
9  *    this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright notice,
11  *    this list of conditions and the following disclaimer in the documentation
12  *    and/or other materials provided with the distribution.
13  *
14  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
16  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
18  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
21  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
22  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
23  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
24  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25  *
26  * The views and conclusions contained in the software and documentation are
27  * those of the authors and should not be interpreted as representing official
28  * policies, either expressed or implied, of the FreeBSD Project.
29  */
30
31 #ifndef _SYS_EFX_CHECK_H
32 #define _SYS_EFX_CHECK_H
33
34 #include "efsys.h"
35
36 /*
37  * Check that the efsys.h header in client code has a valid combination of
38  * EFSYS_OPT_xxx options.
39  *
40  * NOTE: Keep checks for obsolete options here to ensure that they are removed
41  * from client code (and do not reappear in merges from other branches).
42  */
43
44 #ifdef EFSYS_OPT_FALCON
45 # error "FALCON is obsolete and is not supported."
46 #endif
47
48 #if EFSYS_OPT_CHECK_REG
49 /* Verify chip implements accessed registers */
50 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
51 #  error "CHECK_REG requires SIENA or HUNTINGTON or MEDFORD"
52 # endif
53 #endif /* EFSYS_OPT_CHECK_REG */
54
55 #if EFSYS_OPT_DECODE_INTR_FATAL
56 /* Decode fatal errors */
57 # if !EFSYS_OPT_SIENA
58 #  error "INTR_FATAL requires SIENA"
59 # endif
60 #endif /* EFSYS_OPT_DECODE_INTR_FATAL */
61
62 #ifdef EFSYS_OPT_FALCON_NIC_CFG_OVERRIDE
63 # error "FALCON_NIC_CFG_OVERRIDE is obsolete and is not supported."
64 #endif
65
66 #if EFSYS_OPT_FILTER
67 /* Support hardware packet filters */
68 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
69 #  error "FILTER requires SIENA or HUNTINGTON or MEDFORD"
70 # endif
71 #endif /* EFSYS_OPT_FILTER */
72
73 #if (EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
74 # if !EFSYS_OPT_FILTER
75 #  error "HUNTINGTON or MEDFORD requires FILTER"
76 # endif
77 #endif /* EFSYS_OPT_HUNTINGTON */
78
79 #ifdef EFSYS_OPT_MAC_FALCON_GMAC
80 # error "MAC_FALCON_GMAC is obsolete and is not supported."
81 #endif
82
83 #ifdef EFSYS_OPT_MAC_FALCON_XMAC
84 # error "MAC_FALCON_XMAC is obsolete and is not supported."
85 #endif
86
87 #if EFSYS_OPT_MCDI
88 /* Support management controller messages */
89 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
90 #  error "MCDI requires SIENA or HUNTINGTON or MEDFORD"
91 # endif
92 #endif /* EFSYS_OPT_MCDI */
93
94 #if (EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
95 # if !EFSYS_OPT_MCDI
96 #  error "SIENA or HUNTINGTON or MEDFORD requires MCDI"
97 # endif
98 #endif
99
100 #if EFSYS_OPT_MCDI_LOGGING
101 /* Support MCDI logging */
102 # if !EFSYS_OPT_MCDI
103 #  error "MCDI_LOGGING requires MCDI"
104 # endif
105 #endif /* EFSYS_OPT_MCDI_LOGGING */
106
107 #if EFSYS_OPT_MCDI_PROXY_AUTH
108 /* Support MCDI proxy authorization */
109 # if !EFSYS_OPT_MCDI
110 #  error "MCDI_PROXY_AUTH requires MCDI"
111 # endif
112 #endif /* EFSYS_OPT_MCDI_PROXY_AUTH */
113
114 #ifdef EFSYS_OPT_MON_LM87
115 # error "MON_LM87 is obsolete and is not supported."
116 #endif
117
118 #ifdef EFSYS_OPT_MON_MAX6647
119 # error "MON_MAX6647 is obsolete and is not supported."
120 #endif
121
122 #ifdef EFSYS_OPT_MON_NULL
123 # error "MON_NULL is obsolete and is not supported."
124 #endif
125
126 #ifdef EFSYS_OPT_MON_SIENA
127 #  error "MON_SIENA is obsolete (replaced by MON_MCDI)."
128 #endif
129
130 #ifdef EFSYS_OPT_MON_HUNTINGTON
131 #  error "MON_HUNTINGTON is obsolete (replaced by MON_MCDI)."
132 #endif
133
134 #if EFSYS_OPT_NAMES
135 /* Support printable names for statistics */
136 # if !(EFSYS_OPT_LOOPBACK || EFSYS_OPT_MAC_STATS || EFSYS_OPT_MCDI || \
137         EFSYS_MON_STATS || EFSYS_OPT_PHY_STATS || EFSYS_OPT_QSTATS)
138 #  error "NAMES requires LOOPBACK or xxxSTATS or MCDI"
139 # endif
140 #endif /* EFSYS_OPT_NAMES */
141
142 #ifdef EFSYS_OPT_NVRAM_FALCON_BOOTROM
143 # error "NVRAM_FALCON_BOOTROM is obsolete and is not supported."
144 #endif
145
146 #ifdef EFSYS_OPT_NVRAM_SFT9001
147 # error "NVRAM_SFT9001 is obsolete and is not supported."
148 #endif
149
150 #ifdef EFSYS_OPT_NVRAM_SFX7101
151 # error "NVRAM_SFX7101 is obsolete and is not supported."
152 #endif
153
154 #ifdef EFSYS_OPT_PCIE_TUNE
155 # error "PCIE_TUNE is obsolete and is not supported."
156 #endif
157
158 #ifdef EFSYS_OPT_PHY_BIST
159 # error "PHY_BIST is obsolete (replaced by BIST)."
160 #endif
161
162 #ifdef EFSYS_OPT_PHY_NULL
163 # error "PHY_NULL is obsolete and is not supported."
164 #endif
165
166 #ifdef EFSYS_OPT_PHY_PM8358
167 # error "PHY_PM8358 is obsolete and is not supported."
168 #endif
169
170 #ifdef EFSYS_OPT_PHY_PROPS
171 # error "PHY_PROPS is obsolete and is not supported."
172 #endif
173
174 #ifdef EFSYS_OPT_PHY_QT2022C2
175 # error "PHY_QT2022C2 is obsolete and is not supported."
176 #endif
177
178 #ifdef EFSYS_OPT_PHY_QT2025C
179 # error "PHY_QT2025C is obsolete and is not supported."
180 #endif
181
182 #ifdef EFSYS_OPT_PHY_SFT9001
183 # error "PHY_SFT9001 is obsolete and is not supported."
184 #endif
185
186 #ifdef EFSYS_OPT_PHY_SFX7101
187 # error "PHY_SFX7101 is obsolete and is not supported."
188 #endif
189
190 #ifdef EFSYS_OPT_PHY_TXC43128
191 # error "PHY_TXC43128 is obsolete and is not supported."
192 #endif
193
194 #ifdef EFSYS_OPT_RX_HDR_SPLIT
195 # error "RX_HDR_SPLIT is obsolete and is not supported"
196 #endif
197
198 #ifdef EFSYS_OPT_STAT_NAME
199 # error "STAT_NAME is obsolete (replaced by NAMES)."
200 #endif
201
202 #ifdef EFSYS_OPT_WOL
203 # error "WOL is obsolete and is not supported"
204 #endif /* EFSYS_OPT_WOL */
205
206 #ifdef EFSYS_OPT_MCAST_FILTER_LIST
207 #  error "MCAST_FILTER_LIST is obsolete and is not supported"
208 #endif
209
210 #if EFSYS_OPT_ALLOW_UNCONFIGURED_NIC
211 /* Support adapters with missing static config (for factory use only) */
212 #  error "ALLOW_UNCONFIGURED_NIC requires MEDFORD"
213 #endif /* EFSYS_OPT_ALLOW_UNCONFIGURED_NIC */
214
215 #endif /* _SYS_EFX_CHECK_H */