1 /************************************************************************** 2 3 Copyright (c) 2007, Chelsio Inc. 4 All rights reserved. 5 6 Redistribution and use in source and binary forms, with or without 7 modification, are permitted provided that the following conditions are met: 8 9 1. Redistributions of source code must retain the above copyright notice, 10 this list of conditions and the following disclaimer. 11 12 2. Neither the name of the Chelsio Corporation nor the names of its 13 contributors may be used to endorse or promote products derived from 14 this software without specific prior written permission. 15 16 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 20 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 POSSIBILITY OF SUCH DAMAGE. 27 28 ***************************************************************************/ 29 /* 30 * This file is automatically generated --- any changes will be lost. 31 */ 32 33 #ifndef _SGE_DEFS_H 34 #define _SGE_DEFS_H 35 36 #define S_EC_CREDITS 0 37 #define M_EC_CREDITS 0x7FFF 38 #define V_EC_CREDITS(x) ((x) << S_EC_CREDITS) 39 #define G_EC_CREDITS(x) (((x) >> S_EC_CREDITS) & M_EC_CREDITS) 40 41 #define S_EC_GTS 15 42 #define V_EC_GTS(x) ((x) << S_EC_GTS) 43 #define F_EC_GTS V_EC_GTS(1U) 44 45 #define S_EC_INDEX 16 46 #define M_EC_INDEX 0xFFFF 47 #define V_EC_INDEX(x) ((x) << S_EC_INDEX) 48 #define G_EC_INDEX(x) (((x) >> S_EC_INDEX) & M_EC_INDEX) 49 50 #define S_EC_SIZE 0 51 #define M_EC_SIZE 0xFFFF 52 #define V_EC_SIZE(x) ((x) << S_EC_SIZE) 53 #define G_EC_SIZE(x) (((x) >> S_EC_SIZE) & M_EC_SIZE) 54 55 #define S_EC_BASE_LO 16 56 #define M_EC_BASE_LO 0xFFFF 57 #define V_EC_BASE_LO(x) ((x) << S_EC_BASE_LO) 58 #define G_EC_BASE_LO(x) (((x) >> S_EC_BASE_LO) & M_EC_BASE_LO) 59 60 #define S_EC_BASE_HI 0 61 #define M_EC_BASE_HI 0xF 62 #define V_EC_BASE_HI(x) ((x) << S_EC_BASE_HI) 63 #define G_EC_BASE_HI(x) (((x) >> S_EC_BASE_HI) & M_EC_BASE_HI) 64 65 #define S_EC_RESPQ 4 66 #define M_EC_RESPQ 0x7 67 #define V_EC_RESPQ(x) ((x) << S_EC_RESPQ) 68 #define G_EC_RESPQ(x) (((x) >> S_EC_RESPQ) & M_EC_RESPQ) 69 70 #define S_EC_TYPE 7 71 #define M_EC_TYPE 0x7 72 #define V_EC_TYPE(x) ((x) << S_EC_TYPE) 73 #define G_EC_TYPE(x) (((x) >> S_EC_TYPE) & M_EC_TYPE) 74 75 #define S_EC_GEN 10 76 #define V_EC_GEN(x) ((x) << S_EC_GEN) 77 #define F_EC_GEN V_EC_GEN(1U) 78 79 #define S_EC_UP_TOKEN 11 80 #define M_EC_UP_TOKEN 0xFFFFF 81 #define V_EC_UP_TOKEN(x) ((x) << S_EC_UP_TOKEN) 82 #define G_EC_UP_TOKEN(x) (((x) >> S_EC_UP_TOKEN) & M_EC_UP_TOKEN) 83 84 #define S_EC_VALID 31 85 #define V_EC_VALID(x) ((x) << S_EC_VALID) 86 #define F_EC_VALID V_EC_VALID(1U) 87 88 #define S_RQ_MSI_VEC 20 89 #define M_RQ_MSI_VEC 0x3F 90 #define V_RQ_MSI_VEC(x) ((x) << S_RQ_MSI_VEC) 91 #define G_RQ_MSI_VEC(x) (((x) >> S_RQ_MSI_VEC) & M_RQ_MSI_VEC) 92 93 #define S_RQ_INTR_EN 26 94 #define V_RQ_INTR_EN(x) ((x) << S_RQ_INTR_EN) 95 #define F_RQ_INTR_EN V_RQ_INTR_EN(1U) 96 97 #define S_RQ_GEN 28 98 #define V_RQ_GEN(x) ((x) << S_RQ_GEN) 99 #define F_RQ_GEN V_RQ_GEN(1U) 100 101 #define S_CQ_INDEX 0 102 #define M_CQ_INDEX 0xFFFF 103 #define V_CQ_INDEX(x) ((x) << S_CQ_INDEX) 104 #define G_CQ_INDEX(x) (((x) >> S_CQ_INDEX) & M_CQ_INDEX) 105 106 #define S_CQ_SIZE 16 107 #define M_CQ_SIZE 0xFFFF 108 #define V_CQ_SIZE(x) ((x) << S_CQ_SIZE) 109 #define G_CQ_SIZE(x) (((x) >> S_CQ_SIZE) & M_CQ_SIZE) 110 111 #define S_CQ_BASE_HI 0 112 #define M_CQ_BASE_HI 0xFFFFF 113 #define V_CQ_BASE_HI(x) ((x) << S_CQ_BASE_HI) 114 #define G_CQ_BASE_HI(x) (((x) >> S_CQ_BASE_HI) & M_CQ_BASE_HI) 115 116 #define S_CQ_RSPQ 20 117 #define M_CQ_RSPQ 0x3F 118 #define V_CQ_RSPQ(x) ((x) << S_CQ_RSPQ) 119 #define G_CQ_RSPQ(x) (((x) >> S_CQ_RSPQ) & M_CQ_RSPQ) 120 121 #define S_CQ_ASYNC_NOTIF 26 122 #define V_CQ_ASYNC_NOTIF(x) ((x) << S_CQ_ASYNC_NOTIF) 123 #define F_CQ_ASYNC_NOTIF V_CQ_ASYNC_NOTIF(1U) 124 125 #define S_CQ_ARMED 27 126 #define V_CQ_ARMED(x) ((x) << S_CQ_ARMED) 127 #define F_CQ_ARMED V_CQ_ARMED(1U) 128 129 #define S_CQ_ASYNC_NOTIF_SOL 28 130 #define V_CQ_ASYNC_NOTIF_SOL(x) ((x) << S_CQ_ASYNC_NOTIF_SOL) 131 #define F_CQ_ASYNC_NOTIF_SOL V_CQ_ASYNC_NOTIF_SOL(1U) 132 133 #define S_CQ_GEN 29 134 #define V_CQ_GEN(x) ((x) << S_CQ_GEN) 135 #define F_CQ_GEN V_CQ_GEN(1U) 136 137 #define S_CQ_ERR 30 138 #define V_CQ_ERR(x) ((x) << S_CQ_ERR) 139 #define F_CQ_ERR V_CQ_ERR(1U) 140 141 #define S_CQ_OVERFLOW_MODE 31 142 #define V_CQ_OVERFLOW_MODE(x) ((x) << S_CQ_OVERFLOW_MODE) 143 #define F_CQ_OVERFLOW_MODE V_CQ_OVERFLOW_MODE(1U) 144 145 #define S_CQ_CREDITS 0 146 #define M_CQ_CREDITS 0xFFFF 147 #define V_CQ_CREDITS(x) ((x) << S_CQ_CREDITS) 148 #define G_CQ_CREDITS(x) (((x) >> S_CQ_CREDITS) & M_CQ_CREDITS) 149 150 #define S_CQ_CREDIT_THRES 16 151 #define M_CQ_CREDIT_THRES 0x1FFF 152 #define V_CQ_CREDIT_THRES(x) ((x) << S_CQ_CREDIT_THRES) 153 #define G_CQ_CREDIT_THRES(x) (((x) >> S_CQ_CREDIT_THRES) & M_CQ_CREDIT_THRES) 154 155 #define S_FL_BASE_HI 0 156 #define M_FL_BASE_HI 0xFFFFF 157 #define V_FL_BASE_HI(x) ((x) << S_FL_BASE_HI) 158 #define G_FL_BASE_HI(x) (((x) >> S_FL_BASE_HI) & M_FL_BASE_HI) 159 160 #define S_FL_INDEX_LO 20 161 #define M_FL_INDEX_LO 0xFFF 162 #define V_FL_INDEX_LO(x) ((x) << S_FL_INDEX_LO) 163 #define G_FL_INDEX_LO(x) (((x) >> S_FL_INDEX_LO) & M_FL_INDEX_LO) 164 165 #define S_FL_INDEX_HI 0 166 #define M_FL_INDEX_HI 0xF 167 #define V_FL_INDEX_HI(x) ((x) << S_FL_INDEX_HI) 168 #define G_FL_INDEX_HI(x) (((x) >> S_FL_INDEX_HI) & M_FL_INDEX_HI) 169 170 #define S_FL_SIZE 4 171 #define M_FL_SIZE 0xFFFF 172 #define V_FL_SIZE(x) ((x) << S_FL_SIZE) 173 #define G_FL_SIZE(x) (((x) >> S_FL_SIZE) & M_FL_SIZE) 174 175 #define S_FL_GEN 20 176 #define V_FL_GEN(x) ((x) << S_FL_GEN) 177 #define F_FL_GEN V_FL_GEN(1U) 178 179 #define S_FL_ENTRY_SIZE_LO 21 180 #define M_FL_ENTRY_SIZE_LO 0x7FF 181 #define V_FL_ENTRY_SIZE_LO(x) ((x) << S_FL_ENTRY_SIZE_LO) 182 #define G_FL_ENTRY_SIZE_LO(x) (((x) >> S_FL_ENTRY_SIZE_LO) & M_FL_ENTRY_SIZE_LO) 183 184 #define S_FL_ENTRY_SIZE_HI 0 185 #define M_FL_ENTRY_SIZE_HI 0x1FFFFF 186 #define V_FL_ENTRY_SIZE_HI(x) ((x) << S_FL_ENTRY_SIZE_HI) 187 #define G_FL_ENTRY_SIZE_HI(x) (((x) >> S_FL_ENTRY_SIZE_HI) & M_FL_ENTRY_SIZE_HI) 188 189 #define S_FL_CONG_THRES 21 190 #define M_FL_CONG_THRES 0x3FF 191 #define V_FL_CONG_THRES(x) ((x) << S_FL_CONG_THRES) 192 #define G_FL_CONG_THRES(x) (((x) >> S_FL_CONG_THRES) & M_FL_CONG_THRES) 193 194 #define S_FL_GTS 31 195 #define V_FL_GTS(x) ((x) << S_FL_GTS) 196 #define F_FL_GTS V_FL_GTS(1U) 197 198 #define S_FLD_GEN1 31 199 #define V_FLD_GEN1(x) ((x) << S_FLD_GEN1) 200 #define F_FLD_GEN1 V_FLD_GEN1(1U) 201 202 #define S_FLD_GEN2 0 203 #define V_FLD_GEN2(x) ((x) << S_FLD_GEN2) 204 #define F_FLD_GEN2 V_FLD_GEN2(1U) 205 206 #define S_RSPD_TXQ1_CR 0 207 #define M_RSPD_TXQ1_CR 0x7F 208 #define V_RSPD_TXQ1_CR(x) ((x) << S_RSPD_TXQ1_CR) 209 #define G_RSPD_TXQ1_CR(x) (((x) >> S_RSPD_TXQ1_CR) & M_RSPD_TXQ1_CR) 210 211 #define S_RSPD_TXQ1_GTS 7 212 #define V_RSPD_TXQ1_GTS(x) ((x) << S_RSPD_TXQ1_GTS) 213 #define F_RSPD_TXQ1_GTS V_RSPD_TXQ1_GTS(1U) 214 215 #define S_RSPD_TXQ2_CR 8 216 #define M_RSPD_TXQ2_CR 0x7F 217 #define V_RSPD_TXQ2_CR(x) ((x) << S_RSPD_TXQ2_CR) 218 #define G_RSPD_TXQ2_CR(x) (((x) >> S_RSPD_TXQ2_CR) & M_RSPD_TXQ2_CR) 219 220 #define S_RSPD_TXQ2_GTS 15 221 #define V_RSPD_TXQ2_GTS(x) ((x) << S_RSPD_TXQ2_GTS) 222 #define F_RSPD_TXQ2_GTS V_RSPD_TXQ2_GTS(1U) 223 224 #define S_RSPD_TXQ0_CR 16 225 #define M_RSPD_TXQ0_CR 0x7F 226 #define V_RSPD_TXQ0_CR(x) ((x) << S_RSPD_TXQ0_CR) 227 #define G_RSPD_TXQ0_CR(x) (((x) >> S_RSPD_TXQ0_CR) & M_RSPD_TXQ0_CR) 228 229 #define S_RSPD_TXQ0_GTS 23 230 #define V_RSPD_TXQ0_GTS(x) ((x) << S_RSPD_TXQ0_GTS) 231 #define F_RSPD_TXQ0_GTS V_RSPD_TXQ0_GTS(1U) 232 233 #define S_RSPD_EOP 24 234 #define V_RSPD_EOP(x) ((x) << S_RSPD_EOP) 235 #define F_RSPD_EOP V_RSPD_EOP(1U) 236 #define G_RSPD_EOP(x) ((x) & F_RSPD_EOP) 237 238 #define S_RSPD_SOP 25 239 #define V_RSPD_SOP(x) ((x) << S_RSPD_SOP) 240 #define F_RSPD_SOP V_RSPD_SOP(1U) 241 #define G_RSPD_SOP(x) ((x) & F_RSPD_SOP) 242 243 #define G_RSPD_SOP_EOP(x) ((G_RSPD_SOP(x) | G_RSPD_EOP(x)) >> S_RSPD_EOP) 244 245 #define S_RSPD_ASYNC_NOTIF 26 246 #define V_RSPD_ASYNC_NOTIF(x) ((x) << S_RSPD_ASYNC_NOTIF) 247 #define F_RSPD_ASYNC_NOTIF V_RSPD_ASYNC_NOTIF(1U) 248 249 #define S_RSPD_FL0_GTS 27 250 #define V_RSPD_FL0_GTS(x) ((x) << S_RSPD_FL0_GTS) 251 #define F_RSPD_FL0_GTS V_RSPD_FL0_GTS(1U) 252 253 #define S_RSPD_FL1_GTS 28 254 #define V_RSPD_FL1_GTS(x) ((x) << S_RSPD_FL1_GTS) 255 #define F_RSPD_FL1_GTS V_RSPD_FL1_GTS(1U) 256 257 #define S_RSPD_IMM_DATA_VALID 29 258 #define V_RSPD_IMM_DATA_VALID(x) ((x) << S_RSPD_IMM_DATA_VALID) 259 #define F_RSPD_IMM_DATA_VALID V_RSPD_IMM_DATA_VALID(1U) 260 261 #define S_RSPD_OFFLOAD 30 262 #define V_RSPD_OFFLOAD(x) ((x) << S_RSPD_OFFLOAD) 263 #define F_RSPD_OFFLOAD V_RSPD_OFFLOAD(1U) 264 265 #define S_RSPD_GEN1 31 266 #define V_RSPD_GEN1(x) ((x) << S_RSPD_GEN1) 267 #define F_RSPD_GEN1 V_RSPD_GEN1(1U) 268 269 #define S_RSPD_LEN 0 270 #define M_RSPD_LEN 0x7FFFFFFF 271 #define V_RSPD_LEN(x) ((x) << S_RSPD_LEN) 272 #define G_RSPD_LEN(x) (((x) >> S_RSPD_LEN) & M_RSPD_LEN) 273 274 #define S_RSPD_FLQ 31 275 #define V_RSPD_FLQ(x) ((x) << S_RSPD_FLQ) 276 #define F_RSPD_FLQ V_RSPD_FLQ(1U) 277 278 #define S_RSPD_GEN2 0 279 #define V_RSPD_GEN2(x) ((x) << S_RSPD_GEN2) 280 #define F_RSPD_GEN2 V_RSPD_GEN2(1U) 281 282 #define S_RSPD_INR_VEC 1 283 #define M_RSPD_INR_VEC 0x7F 284 #define V_RSPD_INR_VEC(x) ((x) << S_RSPD_INR_VEC) 285 #define G_RSPD_INR_VEC(x) (((x) >> S_RSPD_INR_VEC) & M_RSPD_INR_VEC) 286 287 #endif /* _SGE_DEFS_H */ 288