net/sfc/base: import 5xxx/6xxx 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 #ifdef EFSYS_OPT_MAC_FALCON_GMAC
74 # error "MAC_FALCON_GMAC is obsolete and is not supported."
75 #endif
76
77 #ifdef EFSYS_OPT_MAC_FALCON_XMAC
78 # error "MAC_FALCON_XMAC is obsolete and is not supported."
79 #endif
80
81 #if EFSYS_OPT_MCDI
82 /* Support management controller messages */
83 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
84 #  error "MCDI requires SIENA or HUNTINGTON or MEDFORD"
85 # endif
86 #endif /* EFSYS_OPT_MCDI */
87
88 #if (EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
89 # if !EFSYS_OPT_MCDI
90 #  error "SIENA or HUNTINGTON or MEDFORD requires MCDI"
91 # endif
92 #endif
93
94 #if EFSYS_OPT_MCDI_LOGGING
95 /* Support MCDI logging */
96 # if !EFSYS_OPT_MCDI
97 #  error "MCDI_LOGGING requires MCDI"
98 # endif
99 #endif /* EFSYS_OPT_MCDI_LOGGING */
100
101 #if EFSYS_OPT_MCDI_PROXY_AUTH
102 /* Support MCDI proxy authorization */
103 # if !EFSYS_OPT_MCDI
104 #  error "MCDI_PROXY_AUTH requires MCDI"
105 # endif
106 #endif /* EFSYS_OPT_MCDI_PROXY_AUTH */
107
108 #ifdef EFSYS_OPT_MON_LM87
109 # error "MON_LM87 is obsolete and is not supported."
110 #endif
111
112 #ifdef EFSYS_OPT_MON_MAX6647
113 # error "MON_MAX6647 is obsolete and is not supported."
114 #endif
115
116 #ifdef EFSYS_OPT_MON_NULL
117 # error "MON_NULL is obsolete and is not supported."
118 #endif
119
120 #ifdef EFSYS_OPT_MON_SIENA
121 #  error "MON_SIENA is obsolete (replaced by MON_MCDI)."
122 #endif
123
124 #ifdef EFSYS_OPT_MON_HUNTINGTON
125 #  error "MON_HUNTINGTON is obsolete (replaced by MON_MCDI)."
126 #endif
127
128 #if EFSYS_OPT_NAMES
129 /* Support printable names for statistics */
130 # if !(EFSYS_OPT_LOOPBACK || EFSYS_OPT_MAC_STATS || EFSYS_OPT_MCDI || \
131         EFSYS_MON_STATS || EFSYS_OPT_PHY_STATS || EFSYS_OPT_QSTATS)
132 #  error "NAMES requires LOOPBACK or xxxSTATS or MCDI"
133 # endif
134 #endif /* EFSYS_OPT_NAMES */
135
136 #ifdef EFSYS_OPT_NVRAM_FALCON_BOOTROM
137 # error "NVRAM_FALCON_BOOTROM is obsolete and is not supported."
138 #endif
139
140 #ifdef EFSYS_OPT_NVRAM_SFT9001
141 # error "NVRAM_SFT9001 is obsolete and is not supported."
142 #endif
143
144 #ifdef EFSYS_OPT_NVRAM_SFX7101
145 # error "NVRAM_SFX7101 is obsolete and is not supported."
146 #endif
147
148 #ifdef EFSYS_OPT_PCIE_TUNE
149 # error "PCIE_TUNE is obsolete and is not supported."
150 #endif
151
152 #ifdef EFSYS_OPT_PHY_BIST
153 # error "PHY_BIST is obsolete (replaced by BIST)."
154 #endif
155
156 #ifdef EFSYS_OPT_PHY_NULL
157 # error "PHY_NULL is obsolete and is not supported."
158 #endif
159
160 #ifdef EFSYS_OPT_PHY_PM8358
161 # error "PHY_PM8358 is obsolete and is not supported."
162 #endif
163
164 #ifdef EFSYS_OPT_PHY_PROPS
165 # error "PHY_PROPS is obsolete and is not supported."
166 #endif
167
168 #ifdef EFSYS_OPT_PHY_QT2022C2
169 # error "PHY_QT2022C2 is obsolete and is not supported."
170 #endif
171
172 #ifdef EFSYS_OPT_PHY_QT2025C
173 # error "PHY_QT2025C is obsolete and is not supported."
174 #endif
175
176 #ifdef EFSYS_OPT_PHY_SFT9001
177 # error "PHY_SFT9001 is obsolete and is not supported."
178 #endif
179
180 #ifdef EFSYS_OPT_PHY_SFX7101
181 # error "PHY_SFX7101 is obsolete and is not supported."
182 #endif
183
184 #ifdef EFSYS_OPT_PHY_TXC43128
185 # error "PHY_TXC43128 is obsolete and is not supported."
186 #endif
187
188 #ifdef EFSYS_OPT_RX_HDR_SPLIT
189 # error "RX_HDR_SPLIT is obsolete and is not supported"
190 #endif
191
192 #ifdef EFSYS_OPT_STAT_NAME
193 # error "STAT_NAME is obsolete (replaced by NAMES)."
194 #endif
195
196 #ifdef EFSYS_OPT_WOL
197 # error "WOL is obsolete and is not supported"
198 #endif /* EFSYS_OPT_WOL */
199
200 #ifdef EFSYS_OPT_MCAST_FILTER_LIST
201 #  error "MCAST_FILTER_LIST is obsolete and is not supported"
202 #endif
203
204 #if EFSYS_OPT_ALLOW_UNCONFIGURED_NIC
205 /* Support adapters with missing static config (for factory use only) */
206 #  error "ALLOW_UNCONFIGURED_NIC requires MEDFORD"
207 #endif /* EFSYS_OPT_ALLOW_UNCONFIGURED_NIC */
208
209 #endif /* _SYS_EFX_CHECK_H */