| 1 |
#ifndef __BDK_CSRS_ECAM_H__ |
| 2 |
#define __BDK_CSRS_ECAM_H__ |
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
#define BDK_ECAM_BAR_E_ECAMX_PF_BAR0(a) (0x87e048000000ll + 0x1000000ll * (a)) |
| 62 |
#define BDK_ECAM_BAR_E_ECAMX_PF_BAR0_SIZE 0x100000ull |
| 63 |
#define BDK_ECAM_BAR_E_ECAMX_PF_BAR2(a) (0x848000000000ll + 0x1000000000ll * (a)) |
| 64 |
#define BDK_ECAM_BAR_E_ECAMX_PF_BAR2_SIZE 0x1000000000ull |
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
union bdk_ecam_cfg_addr_s |
| 74 |
{ |
| 75 |
uint64_t u; |
| 76 |
struct bdk_ecam_cfg_addr_s_s |
| 77 |
{ |
| 78 |
#if __BYTE_ORDER == __BIG_ENDIAN |
| 79 |
uint64_t reserved_52_63 : 12; |
| 80 |
uint64_t io : 5; |
| 81 |
uint64_t reserved_46 : 1; |
| 82 |
uint64_t node : 2; |
| 83 |
uint64_t did : 8; |
| 84 |
uint64_t setup : 1; |
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
uint64_t bcst : 1; |
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
|
| 94 |
uint64_t dmn : 6; |
| 95 |
|
| 96 |
|
| 97 |
|
| 98 |
uint64_t bus : 8; |
| 99 |
uint64_t func : 8; |
| 100 |
|
| 101 |
uint64_t addr : 12; |
| 102 |
#else |
| 103 |
uint64_t addr : 12; |
| 104 |
uint64_t func : 8; |
| 105 |
|
| 106 |
uint64_t bus : 8; |
| 107 |
uint64_t dmn : 6; |
| 108 |
|
| 109 |
|
| 110 |
|
| 111 |
uint64_t bcst : 1; |
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
|
| 116 |
uint64_t setup : 1; |
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
uint64_t did : 8; |
| 122 |
uint64_t node : 2; |
| 123 |
uint64_t reserved_46 : 1; |
| 124 |
uint64_t io : 5; |
| 125 |
uint64_t reserved_52_63 : 12; |
| 126 |
#endif |
| 127 |
} s; |
| 128 |
struct bdk_ecam_cfg_addr_s_cn9 |
| 129 |
{ |
| 130 |
#if __BYTE_ORDER == __BIG_ENDIAN |
| 131 |
uint64_t reserved_52_63 : 12; |
| 132 |
uint64_t io : 5; |
| 133 |
uint64_t reserved_46 : 1; |
| 134 |
uint64_t node : 2; |
| 135 |
uint64_t did : 8; |
| 136 |
uint64_t setup : 1; |
| 137 |
|
| 138 |
|
| 139 |
|
| 140 |
|
| 141 |
|
| 142 |
|
| 143 |
uint64_t bcst : 1; |
| 144 |
|
| 145 |
|
| 146 |
|
| 147 |
|
| 148 |
uint64_t dmn : 6; |
| 149 |
|
| 150 |
|
| 151 |
|
| 152 |
uint64_t bus : 8; |
| 153 |
uint64_t func : 8; |
| 154 |
|
| 155 |
uint64_t addr : 12; |
| 156 |
#else |
| 157 |
uint64_t addr : 12; |
| 158 |
uint64_t func : 8; |
| 159 |
|
| 160 |
uint64_t bus : 8; |
| 161 |
uint64_t dmn : 6; |
| 162 |
|
| 163 |
|
| 164 |
|
| 165 |
uint64_t bcst : 1; |
| 166 |
|
| 167 |
|
| 168 |
|
| 169 |
|
| 170 |
uint64_t setup : 1; |
| 171 |
|
| 172 |
|
| 173 |
|
| 174 |
|
| 175 |
|
| 176 |
|
| 177 |
uint64_t did : 8; |
| 178 |
uint64_t node : 2; |
| 179 |
uint64_t reserved_46 : 1; |
| 180 |
uint64_t io : 5; |
| 181 |
uint64_t reserved_52_63 : 12; |
| 182 |
#endif |
| 183 |
} cn9; |
| 184 |
struct bdk_ecam_cfg_addr_s_cn81xx |
| 185 |
{ |
| 186 |
#if __BYTE_ORDER == __BIG_ENDIAN |
| 187 |
uint64_t reserved_48_63 : 16; |
| 188 |
uint64_t io : 1; |
| 189 |
uint64_t reserved_46 : 1; |
| 190 |
uint64_t node : 2; |
| 191 |
uint64_t did : 8; |
| 192 |
uint64_t setup : 1; |
| 193 |
|
| 194 |
|
| 195 |
|
| 196 |
|
| 197 |
uint64_t bcst : 1; |
| 198 |
|
| 199 |
|
| 200 |
|
| 201 |
|
| 202 |
uint64_t reserved_28_33 : 6; |
| 203 |
uint64_t bus : 8; |
| 204 |
uint64_t func : 8; |
| 205 |
|
| 206 |
uint64_t addr : 12; |
| 207 |
#else |
| 208 |
uint64_t addr : 12; |
| 209 |
uint64_t func : 8; |
| 210 |
|
| 211 |
uint64_t bus : 8; |
| 212 |
uint64_t reserved_28_33 : 6; |
| 213 |
uint64_t bcst : 1; |
| 214 |
|
| 215 |
|
| 216 |
|
| 217 |
|
| 218 |
uint64_t setup : 1; |
| 219 |
|
| 220 |
|
| 221 |
|
| 222 |
|
| 223 |
uint64_t did : 8; |
| 224 |
uint64_t node : 2; |
| 225 |
uint64_t reserved_46 : 1; |
| 226 |
uint64_t io : 1; |
| 227 |
uint64_t reserved_48_63 : 16; |
| 228 |
#endif |
| 229 |
} cn81xx; |
| 230 |
struct bdk_ecam_cfg_addr_s_cn88xx |
| 231 |
{ |
| 232 |
#if __BYTE_ORDER == __BIG_ENDIAN |
| 233 |
uint64_t reserved_48_63 : 16; |
| 234 |
uint64_t io : 1; |
| 235 |
uint64_t reserved_46 : 1; |
| 236 |
uint64_t node : 2; |
| 237 |
uint64_t did : 8; |
| 238 |
uint64_t setup : 1; |
| 239 |
|
| 240 |
|
| 241 |
|
| 242 |
|
| 243 |
uint64_t bcst : 1; |
| 244 |
|
| 245 |
|
| 246 |
|
| 247 |
|
| 248 |
uint64_t reserved_28_33 : 6; |
| 249 |
uint64_t bus : 8; |
| 250 |
uint64_t func : 8; |
| 251 |
|
| 252 |
uint64_t addr : 12; |
| 253 |
#else |
| 254 |
uint64_t addr : 12; |
| 255 |
uint64_t func : 8; |
| 256 |
|
| 257 |
uint64_t bus : 8; |
| 258 |
uint64_t reserved_28_33 : 6; |
| 259 |
uint64_t bcst : 1; |
| 260 |
|
| 261 |
|
| 262 |
|
| 263 |
|
| 264 |
uint64_t setup : 1; |
| 265 |
|
| 266 |
|
| 267 |
|
| 268 |
|
| 269 |
uint64_t did : 8; |
| 270 |
uint64_t node : 2; |
| 271 |
uint64_t reserved_46 : 1; |
| 272 |
uint64_t io : 1; |
| 273 |
uint64_t reserved_48_63 : 16; |
| 274 |
#endif |
| 275 |
} cn88xx; |
| 276 |
struct bdk_ecam_cfg_addr_s_cn83xx |
| 277 |
{ |
| 278 |
#if __BYTE_ORDER == __BIG_ENDIAN |
| 279 |
uint64_t reserved_48_63 : 16; |
| 280 |
uint64_t io : 1; |
| 281 |
uint64_t reserved_46 : 1; |
| 282 |
uint64_t node : 2; |
| 283 |
uint64_t did : 8; |
| 284 |
uint64_t setup : 1; |
| 285 |
|
| 286 |
|
| 287 |
|
| 288 |
|
| 289 |
uint64_t bcst : 1; |
| 290 |
|
| 291 |
|
| 292 |
|
| 293 |
|
| 294 |
uint64_t reserved_28_33 : 6; |
| 295 |
uint64_t bus : 8; |
| 296 |
uint64_t func : 8; |
| 297 |
|
| 298 |
uint64_t addr : 12; |
| 299 |
#else |
| 300 |
uint64_t addr : 12; |
| 301 |
uint64_t func : 8; |
| 302 |
|
| 303 |
uint64_t bus : 8; |
| 304 |
uint64_t reserved_28_33 : 6; |
| 305 |
uint64_t bcst : 1; |
| 306 |
|
| 307 |
|
| 308 |
|
| 309 |
|
| 310 |
uint64_t setup : 1; |
| 311 |
|
| 312 |
|
| 313 |
|
| 314 |
|
| 315 |
uint64_t did : 8; |
| 316 |
uint64_t node : 2; |
| 317 |
uint64_t reserved_46 : 1; |
| 318 |
uint64_t io : 1; |
| 319 |
uint64_t reserved_48_63 : 16; |
| 320 |
#endif |
| 321 |
} cn83xx; |
| 322 |
}; |
| 323 |
|
| 324 |
|
| 325 |
|
| 326 |
|
| 327 |
|
| 328 |
|
| 329 |
union bdk_ecamx_busx_nsdis |
| 330 |
{ |
| 331 |
uint64_t u; |
| 332 |
struct bdk_ecamx_busx_nsdis_s |
| 333 |
{ |
| 334 |
#if __BYTE_ORDER == __BIG_ENDIAN |
| 335 |
uint64_t reserved_1_63 : 63; |
| 336 |
uint64_t dis : 1; |
| 337 |
|
| 338 |
|
| 339 |
|
| 340 |
|
| 341 |
#else |
| 342 |
uint64_t dis : 1; |
| 343 |
|
| 344 |
|
| 345 |
|
| 346 |
|
| 347 |
uint64_t reserved_1_63 : 63; |
| 348 |
#endif |
| 349 |
} s; |
| 350 |
|
| 351 |
}; |
| 352 |
typedef union bdk_ecamx_busx_nsdis bdk_ecamx_busx_nsdis_t; |
| 353 |
|
| 354 |
static inline uint64_t BDK_ECAMX_BUSX_NSDIS(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline)); |
| 355 |
static inline uint64_t BDK_ECAMX_BUSX_NSDIS(unsigned long a, unsigned long b) |
| 356 |
{ |
| 357 |
if (CAVIUM_IS_MODEL(CAVIUM_CN81XX) && ((a==0) && (b<=255))) |
| 358 |
return 0x87e048030000ll + 0x1000000ll * ((a) & 0x0) + 8ll * ((b) & 0xff); |
| 359 |
if (CAVIUM_IS_MODEL(CAVIUM_CN83XX) && ((a<=1) && (b<=255))) |
| 360 |
return 0x87e048030000ll + 0x1000000ll * ((a) & 0x1) + 8ll * ((b) & 0xff); |
| 361 |
if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && ((a<=3) && (b<=255))) |
| 362 |
return 0x87e048030000ll + 0x1000000ll * ((a) & 0x3) + 8ll * ((b) & 0xff); |
| 363 |
__bdk_csr_fatal("ECAMX_BUSX_NSDIS", 2, a, b, 0, 0); |
| 364 |
} |
| 365 |
|
| 366 |
#define typedef_BDK_ECAMX_BUSX_NSDIS(a,b) bdk_ecamx_busx_nsdis_t |
| 367 |
#define bustype_BDK_ECAMX_BUSX_NSDIS(a,b) BDK_CSR_TYPE_RSL |
| 368 |
#define basename_BDK_ECAMX_BUSX_NSDIS(a,b) "ECAMX_BUSX_NSDIS" |
| 369 |
#define device_bar_BDK_ECAMX_BUSX_NSDIS(a,b) 0x0 |
| 370 |
#define busnum_BDK_ECAMX_BUSX_NSDIS(a,b) (a) |
| 371 |
#define arguments_BDK_ECAMX_BUSX_NSDIS(a,b) (a),(b),-1,-1 |
| 372 |
|
| 373 |
|
| 374 |
|
| 375 |
|
| 376 |
|
| 377 |
|
| 378 |
union bdk_ecamx_busx_sdis |
| 379 |
{ |
| 380 |
uint64_t u; |
| 381 |
struct bdk_ecamx_busx_sdis_s |
| 382 |
{ |
| 383 |
#if __BYTE_ORDER == __BIG_ENDIAN |
| 384 |
uint64_t reserved_2_63 : 62; |
| 385 |
uint64_t sec : 1; |
| 386 |
|
| 387 |
|
| 388 |
uint64_t dis : 1; |
| 389 |
|
| 390 |
|
| 391 |
#else |
| 392 |
uint64_t dis : 1; |
| 393 |
|
| 394 |
|
| 395 |
uint64_t sec : 1; |
| 396 |
|
| 397 |
|
| 398 |
uint64_t reserved_2_63 : 62; |
| 399 |
#endif |
| 400 |
} s; |
| 401 |
|
| 402 |
}; |
| 403 |
typedef union bdk_ecamx_busx_sdis bdk_ecamx_busx_sdis_t; |
| 404 |
|
| 405 |
static inline uint64_t BDK_ECAMX_BUSX_SDIS(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline)); |
| 406 |
static inline uint64_t BDK_ECAMX_BUSX_SDIS(unsigned long a, unsigned long b) |
| 407 |
{ |
| 408 |
if (CAVIUM_IS_MODEL(CAVIUM_CN81XX) && ((a==0) && (b<=255))) |
| 409 |
return 0x87e048020000ll + 0x1000000ll * ((a) & 0x0) + 8ll * ((b) & 0xff); |
| 410 |
if (CAVIUM_IS_MODEL(CAVIUM_CN83XX) && ((a<=1) && (b<=255))) |
| 411 |
return 0x87e048020000ll + 0x1000000ll * ((a) & 0x1) + 8ll * ((b) & 0xff); |
| 412 |
if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && ((a<=3) && (b<=255))) |
| 413 |
return 0x87e048020000ll + 0x1000000ll * ((a) & 0x3) + 8ll * ((b) & 0xff); |
| 414 |
__bdk_csr_fatal("ECAMX_BUSX_SDIS", 2, a, b, 0, 0); |
| 415 |
} |
| 416 |
|
| 417 |
#define typedef_BDK_ECAMX_BUSX_SDIS(a,b) bdk_ecamx_busx_sdis_t |
| 418 |
#define bustype_BDK_ECAMX_BUSX_SDIS(a,b) BDK_CSR_TYPE_RSL |
| 419 |
#define basename_BDK_ECAMX_BUSX_SDIS(a,b) "ECAMX_BUSX_SDIS" |
| 420 |
#define device_bar_BDK_ECAMX_BUSX_SDIS(a,b) 0x0 |
| 421 |
#define busnum_BDK_ECAMX_BUSX_SDIS(a,b) (a) |
| 422 |
#define arguments_BDK_ECAMX_BUSX_SDIS(a,b) (a),(b),-1,-1 |
| 423 |
|
| 424 |
|
| 425 |
|
| 426 |
|
| 427 |
|
| 428 |
|
| 429 |
union bdk_ecamx_busx_skill |
| 430 |
{ |
| 431 |
uint64_t u; |
| 432 |
struct bdk_ecamx_busx_skill_s |
| 433 |
{ |
| 434 |
#if __BYTE_ORDER == __BIG_ENDIAN |
| 435 |
uint64_t reserved_1_63 : 63; |
| 436 |
uint64_t skill : 1; |
| 437 |
|
| 438 |
|
| 439 |
|
| 440 |
#else |
| 441 |
uint64_t skill : 1; |
| 442 |
|
| 443 |
|
| 444 |
|
| 445 |
uint64_t reserved_1_63 : 63; |
| 446 |
#endif |
| 447 |
} s; |
| 448 |
|
| 449 |
}; |
| 450 |
typedef union bdk_ecamx_busx_skill bdk_ecamx_busx_skill_t; |
| 451 |
|
| 452 |
static inline uint64_t BDK_ECAMX_BUSX_SKILL(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline)); |
| 453 |
static inline uint64_t BDK_ECAMX_BUSX_SKILL(unsigned long a, unsigned long b) |
| 454 |
{ |
| 455 |
if (CAVIUM_IS_MODEL(CAVIUM_CN81XX) && ((a==0) && (b<=255))) |
| 456 |
return 0x87e048080000ll + 0x1000000ll * ((a) & 0x0) + 8ll * ((b) & 0xff); |
| 457 |
if (CAVIUM_IS_MODEL(CAVIUM_CN83XX) && ((a<=1) && (b<=255))) |
| 458 |
return 0x87e048080000ll + 0x1000000ll * ((a) & 0x1) + 8ll * ((b) & 0xff); |
| 459 |
if (CAVIUM_IS_MODEL(CAVIUM_CN88XX_PASS2_X) && ((a<=3) && (b<=255))) |
| 460 |
return 0x87e048080000ll + 0x1000000ll * ((a) & 0x3) + 8ll * ((b) & 0xff); |
| 461 |
__bdk_csr_fatal("ECAMX_BUSX_SKILL", 2, a, b, 0, 0); |
| 462 |
} |
| 463 |
|
| 464 |
#define typedef_BDK_ECAMX_BUSX_SKILL(a,b) bdk_ecamx_busx_skill_t |
| 465 |
#define bustype_BDK_ECAMX_BUSX_SKILL(a,b) BDK_CSR_TYPE_RSL |
| 466 |
#define basename_BDK_ECAMX_BUSX_SKILL(a,b) "ECAMX_BUSX_SKILL" |
| 467 |
#define device_bar_BDK_ECAMX_BUSX_SKILL(a,b) 0x0 |
| 468 |
#define busnum_BDK_ECAMX_BUSX_SKILL(a,b) (a) |
| 469 |
#define arguments_BDK_ECAMX_BUSX_SKILL(a,b) (a),(b),-1,-1 |
| 470 |
|
| 471 |
|
| 472 |
|
| 473 |
|
| 474 |
|
| 475 |
|
| 476 |
|
| 477 |
union bdk_ecamx_const |
| 478 |
{ |
| 479 |
uint64_t u; |
| 480 |
struct bdk_ecamx_const_s |
| 481 |
{ |
| 482 |
#if __BYTE_ORDER == __BIG_ENDIAN |
| 483 |
uint64_t reserved_16_63 : 48; |
| 484 |
uint64_t domains : 8; |
| 485 |
uint64_t ecams : 8; |
| 486 |
#else |
| 487 |
uint64_t ecams : 8; |
| 488 |
uint64_t domains : 8; |
| 489 |
uint64_t reserved_16_63 : 48; |
| 490 |
#endif |
| 491 |
} s; |
| 492 |
struct bdk_ecamx_const_cn8 |
| 493 |
{ |
| 494 |
#if __BYTE_ORDER == __BIG_ENDIAN |
| 495 |
uint64_t reserved_8_63 : 56; |
| 496 |
uint64_t ecams : 8; |
| 497 |
#else |
| 498 |
uint64_t ecams : 8; |
| 499 |
uint64_t reserved_8_63 : 56; |
| 500 |
#endif |
| 501 |
} cn8; |
| 502 |
|
| 503 |
}; |
| 504 |
typedef union bdk_ecamx_const bdk_ecamx_const_t; |
| 505 |
|
| 506 |
static inline uint64_t BDK_ECAMX_CONST(unsigned long a) __attribute__ ((pure, always_inline)); |
| 507 |
static inline uint64_t BDK_ECAMX_CONST(unsigned long a) |
| 508 |
{ |
| 509 |
if (CAVIUM_IS_MODEL(CAVIUM_CN81XX) && (a==0)) |
| 510 |
return 0x87e048000200ll + 0x1000000ll * ((a) & 0x0); |
| 511 |
if (CAVIUM_IS_MODEL(CAVIUM_CN83XX) && (a<=1)) |
| 512 |
return 0x87e048000200ll + 0x1000000ll * ((a) & 0x1); |
| 513 |
if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && (a==0)) |
| 514 |
return 0x87e048000200ll + 0x1000000ll * ((a) & 0x0); |
| 515 |
__bdk_csr_fatal("ECAMX_CONST", 1, a, 0, 0, 0); |
| 516 |
} |
| 517 |
|
| 518 |
#define typedef_BDK_ECAMX_CONST(a) bdk_ecamx_const_t |
| 519 |
#define bustype_BDK_ECAMX_CONST(a) BDK_CSR_TYPE_RSL |
| 520 |
#define basename_BDK_ECAMX_CONST(a) "ECAMX_CONST" |
| 521 |
#define device_bar_BDK_ECAMX_CONST(a) 0x0 |
| 522 |
#define busnum_BDK_ECAMX_CONST(a) (a) |
| 523 |
#define arguments_BDK_ECAMX_CONST(a) (a),-1,-1,-1 |
| 524 |
|
| 525 |
|
| 526 |
|
| 527 |
|
| 528 |
|
| 529 |
|
| 530 |
union bdk_ecamx_devx_nsdis |
| 531 |
{ |
| 532 |
uint64_t u; |
| 533 |
struct bdk_ecamx_devx_nsdis_s |
| 534 |
{ |
| 535 |
#if __BYTE_ORDER == __BIG_ENDIAN |
| 536 |
uint64_t reserved_1_63 : 63; |
| 537 |
uint64_t dis : 1; |
| 538 |
|
| 539 |
|
| 540 |
|
| 541 |
#else |
| 542 |
uint64_t dis : 1; |
| 543 |
|
| 544 |
|
| 545 |
|
| 546 |
uint64_t reserved_1_63 : 63; |
| 547 |
#endif |
| 548 |
} s; |
| 549 |
|
| 550 |
}; |
| 551 |
typedef union bdk_ecamx_devx_nsdis bdk_ecamx_devx_nsdis_t; |
| 552 |
|
| 553 |
static inline uint64_t BDK_ECAMX_DEVX_NSDIS(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline)); |
| 554 |
static inline uint64_t BDK_ECAMX_DEVX_NSDIS(unsigned long a, unsigned long b) |
| 555 |
{ |
| 556 |
if (CAVIUM_IS_MODEL(CAVIUM_CN81XX) && ((a==0) && (b<=31))) |
| 557 |
return 0x87e048070000ll + 0x1000000ll * ((a) & 0x0) + 8ll * ((b) & 0x1f); |
| 558 |
if (CAVIUM_IS_MODEL(CAVIUM_CN83XX) && ((a<=1) && (b<=31))) |
| 559 |
return 0x87e048070000ll + 0x1000000ll * ((a) & 0x1) + 8ll * ((b) & 0x1f); |
| 560 |
if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && ((a<=3) && (b<=31))) |
| 561 |
return 0x87e048070000ll + 0x1000000ll * ((a) & 0x3) + 8ll * ((b) & 0x1f); |
| 562 |
__bdk_csr_fatal("ECAMX_DEVX_NSDIS", 2, a, b, 0, 0); |
| 563 |
} |
| 564 |
|
| 565 |
#define typedef_BDK_ECAMX_DEVX_NSDIS(a,b) bdk_ecamx_devx_nsdis_t |
| 566 |
#define bustype_BDK_ECAMX_DEVX_NSDIS(a,b) BDK_CSR_TYPE_RSL |
| 567 |
#define basename_BDK_ECAMX_DEVX_NSDIS(a,b) "ECAMX_DEVX_NSDIS" |
| 568 |
#define device_bar_BDK_ECAMX_DEVX_NSDIS(a,b) 0x0 |
| 569 |
#define busnum_BDK_ECAMX_DEVX_NSDIS(a,b) (a) |
| 570 |
#define arguments_BDK_ECAMX_DEVX_NSDIS(a,b) (a),(b),-1,-1 |
| 571 |
|
| 572 |
|
| 573 |
|
| 574 |
|
| 575 |
|
| 576 |
|
| 577 |
union bdk_ecamx_devx_sdis |
| 578 |
{ |
| 579 |
uint64_t u; |
| 580 |
struct bdk_ecamx_devx_sdis_s |
| 581 |
{ |
| 582 |
#if __BYTE_ORDER == __BIG_ENDIAN |
| 583 |
uint64_t reserved_2_63 : 62; |
| 584 |
uint64_t sec : 1; |
| 585 |
|
| 586 |
|
| 587 |
uint64_t dis : 1; |
| 588 |
|
| 589 |
|
| 590 |
|
| 591 |
#else |
| 592 |
uint64_t dis : 1; |
| 593 |
|
| 594 |
|
| 595 |
|
| 596 |
uint64_t sec : 1; |
| 597 |
|
| 598 |
|
| 599 |
uint64_t reserved_2_63 : 62; |
| 600 |
#endif |
| 601 |
} s; |
| 602 |
|
| 603 |
}; |
| 604 |
typedef union bdk_ecamx_devx_sdis bdk_ecamx_devx_sdis_t; |
| 605 |
|
| 606 |
static inline uint64_t BDK_ECAMX_DEVX_SDIS(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline)); |
| 607 |
static inline uint64_t BDK_ECAMX_DEVX_SDIS(unsigned long a, unsigned long b) |
| 608 |
{ |
| 609 |
if (CAVIUM_IS_MODEL(CAVIUM_CN81XX) && ((a==0) && (b<=31))) |
| 610 |
return 0x87e048060000ll + 0x1000000ll * ((a) & 0x0) + 8ll * ((b) & 0x1f); |
| 611 |
if (CAVIUM_IS_MODEL(CAVIUM_CN83XX) && ((a<=1) && (b<=31))) |
| 612 |
return 0x87e048060000ll + 0x1000000ll * ((a) & 0x1) + 8ll * ((b) & 0x1f); |
| 613 |
if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && ((a<=3) && (b<=31))) |
| 614 |
return 0x87e048060000ll + 0x1000000ll * ((a) & 0x3) + 8ll * ((b) & 0x1f); |
| 615 |
__bdk_csr_fatal("ECAMX_DEVX_SDIS", 2, a, b, 0, 0); |
| 616 |
} |
| 617 |
|
| 618 |
#define typedef_BDK_ECAMX_DEVX_SDIS(a,b) bdk_ecamx_devx_sdis_t |
| 619 |
#define bustype_BDK_ECAMX_DEVX_SDIS(a,b) BDK_CSR_TYPE_RSL |
| 620 |
#define basename_BDK_ECAMX_DEVX_SDIS(a,b) "ECAMX_DEVX_SDIS" |
| 621 |
#define device_bar_BDK_ECAMX_DEVX_SDIS(a,b) 0x0 |
| 622 |
#define busnum_BDK_ECAMX_DEVX_SDIS(a,b) (a) |
| 623 |
#define arguments_BDK_ECAMX_DEVX_SDIS(a,b) (a),(b),-1,-1 |
| 624 |
|
| 625 |
|
| 626 |
|
| 627 |
|
| 628 |
|
| 629 |
|
| 630 |
union bdk_ecamx_devx_skill |
| 631 |
{ |
| 632 |
uint64_t u; |
| 633 |
struct bdk_ecamx_devx_skill_s |
| 634 |
{ |
| 635 |
#if __BYTE_ORDER == __BIG_ENDIAN |
| 636 |
uint64_t reserved_1_63 : 63; |
| 637 |
uint64_t skill : 1; |
| 638 |
|
| 639 |
|
| 640 |
|
| 641 |
#else |
| 642 |
uint64_t skill : 1; |
| 643 |
|
| 644 |
|
| 645 |
|
| 646 |
uint64_t reserved_1_63 : 63; |
| 647 |
#endif |
| 648 |
} s; |
| 649 |
|
| 650 |
}; |
| 651 |
typedef union bdk_ecamx_devx_skill bdk_ecamx_devx_skill_t; |
| 652 |
|
| 653 |
static inline uint64_t BDK_ECAMX_DEVX_SKILL(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline)); |
| 654 |
static inline uint64_t BDK_ECAMX_DEVX_SKILL(unsigned long a, unsigned long b) |
| 655 |
{ |
| 656 |
if (CAVIUM_IS_MODEL(CAVIUM_CN81XX) && ((a==0) && (b<=31))) |
| 657 |
return 0x87e0480a0000ll + 0x1000000ll * ((a) & 0x0) + 8ll * ((b) & 0x1f); |
| 658 |
if (CAVIUM_IS_MODEL(CAVIUM_CN83XX) && ((a<=1) && (b<=31))) |
| 659 |
return 0x87e0480a0000ll + 0x1000000ll * ((a) & 0x1) + 8ll * ((b) & 0x1f); |
| 660 |
if (CAVIUM_IS_MODEL(CAVIUM_CN88XX_PASS2_X) && ((a<=3) && (b<=31))) |
| 661 |
return 0x87e0480a0000ll + 0x1000000ll * ((a) & 0x3) + 8ll * ((b) & 0x1f); |
| 662 |
__bdk_csr_fatal("ECAMX_DEVX_SKILL", 2, a, b, 0, 0); |
| 663 |
} |
| 664 |
|
| 665 |
#define typedef_BDK_ECAMX_DEVX_SKILL(a,b) bdk_ecamx_devx_skill_t |
| 666 |
#define bustype_BDK_ECAMX_DEVX_SKILL(a,b) BDK_CSR_TYPE_RSL |
| 667 |
#define basename_BDK_ECAMX_DEVX_SKILL(a,b) "ECAMX_DEVX_SKILL" |
| 668 |
#define device_bar_BDK_ECAMX_DEVX_SKILL(a,b) 0x0 |
| 669 |
#define busnum_BDK_ECAMX_DEVX_SKILL(a,b) (a) |
| 670 |
#define arguments_BDK_ECAMX_DEVX_SKILL(a,b) (a),(b),-1,-1 |
| 671 |
|
| 672 |
|
| 673 |
|
| 674 |
|
| 675 |
|
| 676 |
|
| 677 |
|
| 678 |
|
| 679 |
|
| 680 |
|
| 681 |
|
| 682 |
|
| 683 |
|
| 684 |
|
| 685 |
union bdk_ecamx_domx_busx_permit |
| 686 |
{ |
| 687 |
uint64_t u; |
| 688 |
struct bdk_ecamx_domx_busx_permit_s |
| 689 |
{ |
| 690 |
#if __BYTE_ORDER == __BIG_ENDIAN |
| 691 |
uint64_t reserved_8_63 : 56; |
| 692 |
uint64_t kill : 1; |
| 693 |
|
| 694 |
|
| 695 |
uint64_t reserved_4_6 : 3; |
| 696 |
uint64_t xcp1_dis : 1; |
| 697 |
uint64_t xcp0_dis : 1; |
| 698 |
uint64_t nsec_dis : 1; |
| 699 |
|
| 700 |
uint64_t sec_dis : 1; |
| 701 |
#else |
| 702 |
uint64_t sec_dis : 1; |
| 703 |
uint64_t nsec_dis : 1; |
| 704 |
|
| 705 |
uint64_t xcp0_dis : 1; |
| 706 |
uint64_t xcp1_dis : 1; |
| 707 |
uint64_t reserved_4_6 : 3; |
| 708 |
uint64_t kill : 1; |
| 709 |
|
| 710 |
|
| 711 |
uint64_t reserved_8_63 : 56; |
| 712 |
#endif |
| 713 |
} s; |
| 714 |
|
| 715 |
}; |
| 716 |
typedef union bdk_ecamx_domx_busx_permit bdk_ecamx_domx_busx_permit_t; |
| 717 |
|
| 718 |
static inline uint64_t BDK_ECAMX_DOMX_BUSX_PERMIT(unsigned long a, unsigned long b, unsigned long c) __attribute__ ((pure, always_inline)); |
| 719 |
static inline uint64_t BDK_ECAMX_DOMX_BUSX_PERMIT(unsigned long a, unsigned long b, unsigned long c) |
| 720 |
{ |
| 721 |
if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a==0) && ((b==0) || (b==1) || (b==2)) && (c<=255))) |
| 722 |
return 0x87e048020000ll + 0x1000000ll * ((a) & 0x0) + 0x800ll * ((b) & 0x3) + 8ll * ((c) & 0xff); |
| 723 |
__bdk_csr_fatal("ECAMX_DOMX_BUSX_PERMIT", 3, a, b, c, 0); |
| 724 |
} |
| 725 |
|
| 726 |
#define typedef_BDK_ECAMX_DOMX_BUSX_PERMIT(a,b,c) bdk_ecamx_domx_busx_permit_t |
| 727 |
#define bustype_BDK_ECAMX_DOMX_BUSX_PERMIT(a,b,c) BDK_CSR_TYPE_RSL |
| 728 |
#define basename_BDK_ECAMX_DOMX_BUSX_PERMIT(a,b,c) "ECAMX_DOMX_BUSX_PERMIT" |
| 729 |
#define device_bar_BDK_ECAMX_DOMX_BUSX_PERMIT(a,b,c) 0x0 |
| 730 |
#define busnum_BDK_ECAMX_DOMX_BUSX_PERMIT(a,b,c) (a) |
| 731 |
#define arguments_BDK_ECAMX_DOMX_BUSX_PERMIT(a,b,c) (a),(b),(c),-1 |
| 732 |
|
| 733 |
|
| 734 |
|
| 735 |
|
| 736 |
|
| 737 |
|
| 738 |
|
| 739 |
|
| 740 |
|
| 741 |
union bdk_ecamx_domx_const |
| 742 |
{ |
| 743 |
uint64_t u; |
| 744 |
struct bdk_ecamx_domx_const_s |
| 745 |
{ |
| 746 |
#if __BYTE_ORDER == __BIG_ENDIAN |
| 747 |
uint64_t reserved_6_63 : 58; |
| 748 |
uint64_t pres : 1; |
| 749 |
uint64_t permit : 1; |
| 750 |
|
| 751 |
uint64_t smmu : 4; |
| 752 |
#else |
| 753 |
uint64_t smmu : 4; |
| 754 |
uint64_t permit : 1; |
| 755 |
|
| 756 |
uint64_t pres : 1; |
| 757 |
uint64_t reserved_6_63 : 58; |
| 758 |
#endif |
| 759 |
} s; |
| 760 |
|
| 761 |
}; |
| 762 |
typedef union bdk_ecamx_domx_const bdk_ecamx_domx_const_t; |
| 763 |
|
| 764 |
static inline uint64_t BDK_ECAMX_DOMX_CONST(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline)); |
| 765 |
static inline uint64_t BDK_ECAMX_DOMX_CONST(unsigned long a, unsigned long b) |
| 766 |
{ |
| 767 |
if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a==0) && (b<=63))) |
| 768 |
return 0x87e048000400ll + 0x1000000ll * ((a) & 0x0) + 8ll * ((b) & 0x3f); |
| 769 |
__bdk_csr_fatal("ECAMX_DOMX_CONST", 2, a, b, 0, 0); |
| 770 |
} |
| 771 |
|
| 772 |
#define typedef_BDK_ECAMX_DOMX_CONST(a,b) bdk_ecamx_domx_const_t |
| 773 |
#define bustype_BDK_ECAMX_DOMX_CONST(a,b) BDK_CSR_TYPE_RSL |
| 774 |
#define basename_BDK_ECAMX_DOMX_CONST(a,b) "ECAMX_DOMX_CONST" |
| 775 |
#define device_bar_BDK_ECAMX_DOMX_CONST(a,b) 0x0 |
| 776 |
#define busnum_BDK_ECAMX_DOMX_CONST(a,b) (a) |
| 777 |
#define arguments_BDK_ECAMX_DOMX_CONST(a,b) (a),(b),-1,-1 |
| 778 |
|
| 779 |
|
| 780 |
|
| 781 |
|
| 782 |
|
| 783 |
|
| 784 |
|
| 785 |
|
| 786 |
|
| 787 |
|
| 788 |
|
| 789 |
|
| 790 |
|
| 791 |
|
| 792 |
|
| 793 |
union bdk_ecamx_domx_devx_permit |
| 794 |
{ |
| 795 |
uint64_t u; |
| 796 |
struct bdk_ecamx_domx_devx_permit_s |
| 797 |
{ |
| 798 |
#if __BYTE_ORDER == __BIG_ENDIAN |
| 799 |
uint64_t reserved_8_63 : 56; |
| 800 |
uint64_t kill : 1; |
| 801 |
|
| 802 |
|
| 803 |
uint64_t reserved_4_6 : 3; |
| 804 |
uint64_t xcp1_dis : 1; |
| 805 |
uint64_t xcp0_dis : 1; |
| 806 |
uint64_t nsec_dis : 1; |
| 807 |
|
| 808 |
uint64_t sec_dis : 1; |
| 809 |
#else |
| 810 |
uint64_t sec_dis : 1; |
| 811 |
uint64_t nsec_dis : 1; |
| 812 |
|
| 813 |
uint64_t xcp0_dis : 1; |
| 814 |
uint64_t xcp1_dis : 1; |
| 815 |
uint64_t reserved_4_6 : 3; |
| 816 |
uint64_t kill : 1; |
| 817 |
|
| 818 |
|
| 819 |
uint64_t reserved_8_63 : 56; |
| 820 |
#endif |
| 821 |
} s; |
| 822 |
|
| 823 |
}; |
| 824 |
typedef union bdk_ecamx_domx_devx_permit bdk_ecamx_domx_devx_permit_t; |
| 825 |
|
| 826 |
static inline uint64_t BDK_ECAMX_DOMX_DEVX_PERMIT(unsigned long a, unsigned long b, unsigned long c) __attribute__ ((pure, always_inline)); |
| 827 |
static inline uint64_t BDK_ECAMX_DOMX_DEVX_PERMIT(unsigned long a, unsigned long b, unsigned long c) |
| 828 |
{ |
| 829 |
if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a==0) && ((b==0) || (b==1) || (b==2)) && (c<=31))) |
| 830 |
return 0x87e048040000ll + 0x1000000ll * ((a) & 0x0) + 0x800ll * ((b) & 0x3) + 8ll * ((c) & 0x1f); |
| 831 |
__bdk_csr_fatal("ECAMX_DOMX_DEVX_PERMIT", 3, a, b, c, 0); |
| 832 |
} |
| 833 |
|
| 834 |
#define typedef_BDK_ECAMX_DOMX_DEVX_PERMIT(a,b,c) bdk_ecamx_domx_devx_permit_t |
| 835 |
#define bustype_BDK_ECAMX_DOMX_DEVX_PERMIT(a,b,c) BDK_CSR_TYPE_RSL |
| 836 |
#define basename_BDK_ECAMX_DOMX_DEVX_PERMIT(a,b,c) "ECAMX_DOMX_DEVX_PERMIT" |
| 837 |
#define device_bar_BDK_ECAMX_DOMX_DEVX_PERMIT(a,b,c) 0x0 |
| 838 |
#define busnum_BDK_ECAMX_DOMX_DEVX_PERMIT(a,b,c) (a) |
| 839 |
#define arguments_BDK_ECAMX_DOMX_DEVX_PERMIT(a,b,c) (a),(b),(c),-1 |
| 840 |
|
| 841 |
|
| 842 |
|
| 843 |
|
| 844 |
|
| 845 |
|
| 846 |
|
| 847 |
|
| 848 |
|
| 849 |
|
| 850 |
|
| 851 |
|
| 852 |
|
| 853 |
|
| 854 |
|
| 855 |
|
| 856 |
union bdk_ecamx_domx_rslx_permit |
| 857 |
{ |
| 858 |
uint64_t u; |
| 859 |
struct bdk_ecamx_domx_rslx_permit_s |
| 860 |
{ |
| 861 |
#if __BYTE_ORDER == __BIG_ENDIAN |
| 862 |
uint64_t reserved_8_63 : 56; |
| 863 |
uint64_t kill : 1; |
| 864 |
|
| 865 |
|
| 866 |
uint64_t reserved_4_6 : 3; |
| 867 |
uint64_t xcp1_dis : 1; |
| 868 |
uint64_t xcp0_dis : 1; |
| 869 |
uint64_t nsec_dis : 1; |
| 870 |
|
| 871 |
uint64_t sec_dis : 1; |
| 872 |
#else |
| 873 |
uint64_t sec_dis : 1; |
| 874 |
uint64_t nsec_dis : 1; |
| 875 |
|
| 876 |
uint64_t xcp0_dis : 1; |
| 877 |
uint64_t xcp1_dis : 1; |
| 878 |
uint64_t reserved_4_6 : 3; |
| 879 |
uint64_t kill : 1; |
| 880 |
|
| 881 |
|
| 882 |
uint64_t reserved_8_63 : 56; |
| 883 |
#endif |
| 884 |
} s; |
| 885 |
|
| 886 |
}; |
| 887 |
typedef union bdk_ecamx_domx_rslx_permit bdk_ecamx_domx_rslx_permit_t; |
| 888 |
|
| 889 |
static inline uint64_t BDK_ECAMX_DOMX_RSLX_PERMIT(unsigned long a, unsigned long b, unsigned long c) __attribute__ ((pure, always_inline)); |
| 890 |
static inline uint64_t BDK_ECAMX_DOMX_RSLX_PERMIT(unsigned long a, unsigned long b, unsigned long c) |
| 891 |
{ |
| 892 |
if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a==0) && ((b==0) || (b==1) || (b==2)) && (c<=255))) |
| 893 |
return 0x87e048060000ll + 0x1000000ll * ((a) & 0x0) + 0x800ll * ((b) & 0x3) + 8ll * ((c) & 0xff); |
| 894 |
__bdk_csr_fatal("ECAMX_DOMX_RSLX_PERMIT", 3, a, b, c, 0); |
| 895 |
} |
| 896 |
|
| 897 |
#define typedef_BDK_ECAMX_DOMX_RSLX_PERMIT(a,b,c) bdk_ecamx_domx_rslx_permit_t |
| 898 |
#define bustype_BDK_ECAMX_DOMX_RSLX_PERMIT(a,b,c) BDK_CSR_TYPE_RSL |
| 899 |
#define basename_BDK_ECAMX_DOMX_RSLX_PERMIT(a,b,c) "ECAMX_DOMX_RSLX_PERMIT" |
| 900 |
#define device_bar_BDK_ECAMX_DOMX_RSLX_PERMIT(a,b,c) 0x0 |
| 901 |
#define busnum_BDK_ECAMX_DOMX_RSLX_PERMIT(a,b,c) (a) |
| 902 |
#define arguments_BDK_ECAMX_DOMX_RSLX_PERMIT(a,b,c) (a),(b),(c),-1 |
| 903 |
|
| 904 |
|
| 905 |
|
| 906 |
|
| 907 |
|
| 908 |
|
| 909 |
union bdk_ecamx_nop_of |
| 910 |
{ |
| 911 |
uint64_t u; |
| 912 |
struct bdk_ecamx_nop_of_s |
| 913 |
{ |
| 914 |
#if __BYTE_ORDER == __BIG_ENDIAN |
| 915 |
uint64_t ones : 64; |
| 916 |
#else |
| 917 |
uint64_t ones : 64; |
| 918 |
#endif |
| 919 |
} s; |
| 920 |
|
| 921 |
}; |
| 922 |
typedef union bdk_ecamx_nop_of bdk_ecamx_nop_of_t; |
| 923 |
|
| 924 |
static inline uint64_t BDK_ECAMX_NOP_OF(unsigned long a) __attribute__ ((pure, always_inline)); |
| 925 |
static inline uint64_t BDK_ECAMX_NOP_OF(unsigned long a) |
| 926 |
{ |
| 927 |
if (CAVIUM_IS_MODEL(CAVIUM_CN81XX) && (a==0)) |
| 928 |
return 0x87e048000000ll + 0x1000000ll * ((a) & 0x0); |
| 929 |
if (CAVIUM_IS_MODEL(CAVIUM_CN83XX) && (a<=1)) |
| 930 |
return 0x87e048000000ll + 0x1000000ll * ((a) & 0x1); |
| 931 |
if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=3)) |
| 932 |
return 0x87e048000000ll + 0x1000000ll * ((a) & 0x3); |
| 933 |
__bdk_csr_fatal("ECAMX_NOP_OF", 1, a, 0, 0, 0); |
| 934 |
} |
| 935 |
|
| 936 |
#define typedef_BDK_ECAMX_NOP_OF(a) bdk_ecamx_nop_of_t |
| 937 |
#define bustype_BDK_ECAMX_NOP_OF(a) BDK_CSR_TYPE_RSL |
| 938 |
#define basename_BDK_ECAMX_NOP_OF(a) "ECAMX_NOP_OF" |
| 939 |
#define device_bar_BDK_ECAMX_NOP_OF(a) 0x0 |
| 940 |
#define busnum_BDK_ECAMX_NOP_OF(a) (a) |
| 941 |
#define arguments_BDK_ECAMX_NOP_OF(a) (a),-1,-1,-1 |
| 942 |
|
| 943 |
|
| 944 |
|
| 945 |
|
| 946 |
|
| 947 |
|
| 948 |
union bdk_ecamx_nop_onf |
| 949 |
{ |
| 950 |
uint64_t u; |
| 951 |
struct bdk_ecamx_nop_onf_s |
| 952 |
{ |
| 953 |
#if __BYTE_ORDER == __BIG_ENDIAN |
| 954 |
uint64_t ones : 64; |
| 955 |
#else |
| 956 |
uint64_t ones : 64; |
| 957 |
#endif |
| 958 |
} s; |
| 959 |
|
| 960 |
}; |
| 961 |
typedef union bdk_ecamx_nop_onf bdk_ecamx_nop_onf_t; |
| 962 |
|
| 963 |
static inline uint64_t BDK_ECAMX_NOP_ONF(unsigned long a) __attribute__ ((pure, always_inline)); |
| 964 |
static inline uint64_t BDK_ECAMX_NOP_ONF(unsigned long a) |
| 965 |
{ |
| 966 |
if (CAVIUM_IS_MODEL(CAVIUM_CN81XX) && (a==0)) |
| 967 |
return 0x87e048000080ll + 0x1000000ll * ((a) & 0x0); |
| 968 |
if (CAVIUM_IS_MODEL(CAVIUM_CN83XX) && (a<=1)) |
| 969 |
return 0x87e048000080ll + 0x1000000ll * ((a) & 0x1); |
| 970 |
if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=3)) |
| 971 |
return 0x87e048000080ll + 0x1000000ll * ((a) & 0x3); |
| 972 |
__bdk_csr_fatal("ECAMX_NOP_ONF", 1, a, 0, 0, 0); |
| 973 |
} |
| 974 |
|
| 975 |
#define typedef_BDK_ECAMX_NOP_ONF(a) bdk_ecamx_nop_onf_t |
| 976 |
#define bustype_BDK_ECAMX_NOP_ONF(a) BDK_CSR_TYPE_RSL |
| 977 |
#define basename_BDK_ECAMX_NOP_ONF(a) "ECAMX_NOP_ONF" |
| 978 |
#define device_bar_BDK_ECAMX_NOP_ONF(a) 0x0 |
| 979 |
#define busnum_BDK_ECAMX_NOP_ONF(a) (a) |
| 980 |
#define arguments_BDK_ECAMX_NOP_ONF(a) (a),-1,-1,-1 |
| 981 |
|
| 982 |
|
| 983 |
|
| 984 |
|
| 985 |
|
| 986 |
|
| 987 |
union bdk_ecamx_nop_zf |
| 988 |
{ |
| 989 |
uint64_t u; |
| 990 |
struct bdk_ecamx_nop_zf_s |
| 991 |
{ |
| 992 |
#if __BYTE_ORDER == __BIG_ENDIAN |
| 993 |
uint64_t zeros : 64; |
| 994 |
#else |
| 995 |
uint64_t zeros : 64; |
| 996 |
#endif |
| 997 |
} s; |
| 998 |
|
| 999 |
}; |
| 1000 |
typedef union bdk_ecamx_nop_zf bdk_ecamx_nop_zf_t; |
| 1001 |
|
| 1002 |
static inline uint64_t BDK_ECAMX_NOP_ZF(unsigned long a) __attribute__ ((pure, always_inline)); |
| 1003 |
static inline uint64_t BDK_ECAMX_NOP_ZF(unsigned long a) |
| 1004 |
{ |
| 1005 |
if (CAVIUM_IS_MODEL(CAVIUM_CN81XX) && (a==0)) |
| 1006 |
return 0x87e048000100ll + 0x1000000ll * ((a) & 0x0); |
| 1007 |
if (CAVIUM_IS_MODEL(CAVIUM_CN83XX) && (a<=1)) |
| 1008 |
return 0x87e048000100ll + 0x1000000ll * ((a) & 0x1); |
| 1009 |
if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=3)) |
| 1010 |
return 0x87e048000100ll + 0x1000000ll * ((a) & 0x3); |
| 1011 |
__bdk_csr_fatal("ECAMX_NOP_ZF", 1, a, 0, 0, 0); |
| 1012 |
} |
| 1013 |
|
| 1014 |
#define typedef_BDK_ECAMX_NOP_ZF(a) bdk_ecamx_nop_zf_t |
| 1015 |
#define bustype_BDK_ECAMX_NOP_ZF(a) BDK_CSR_TYPE_RSL |
| 1016 |
#define basename_BDK_ECAMX_NOP_ZF(a) "ECAMX_NOP_ZF" |
| 1017 |
#define device_bar_BDK_ECAMX_NOP_ZF(a) 0x0 |
| 1018 |
#define busnum_BDK_ECAMX_NOP_ZF(a) (a) |
| 1019 |
#define arguments_BDK_ECAMX_NOP_ZF(a) (a),-1,-1,-1 |
| 1020 |
|
| 1021 |
|
| 1022 |
|
| 1023 |
|
| 1024 |
|
| 1025 |
|
| 1026 |
union bdk_ecamx_nop_znf |
| 1027 |
{ |
| 1028 |
uint64_t u; |
| 1029 |
struct bdk_ecamx_nop_znf_s |
| 1030 |
{ |
| 1031 |
#if __BYTE_ORDER == __BIG_ENDIAN |
| 1032 |
uint64_t zeros : 64; |
| 1033 |
#else |
| 1034 |
uint64_t zeros : 64; |
| 1035 |
#endif |
| 1036 |
} s; |
| 1037 |
|
| 1038 |
}; |
| 1039 |
typedef union bdk_ecamx_nop_znf bdk_ecamx_nop_znf_t; |
| 1040 |
|
| 1041 |
static inline uint64_t BDK_ECAMX_NOP_ZNF(unsigned long a) __attribute__ ((pure, always_inline)); |
| 1042 |
static inline uint64_t BDK_ECAMX_NOP_ZNF(unsigned long a) |
| 1043 |
{ |
| 1044 |
if (CAVIUM_IS_MODEL(CAVIUM_CN81XX) && (a==0)) |
| 1045 |
return 0x87e048000180ll + 0x1000000ll * ((a) & 0x0); |
| 1046 |
if (CAVIUM_IS_MODEL(CAVIUM_CN83XX) && (a<=1)) |
| 1047 |
return 0x87e048000180ll + 0x1000000ll * ((a) & 0x1); |
| 1048 |
if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=3)) |
| 1049 |
return 0x87e048000180ll + 0x1000000ll * ((a) & 0x3); |
| 1050 |
__bdk_csr_fatal("ECAMX_NOP_ZNF", 1, a, 0, 0, 0); |
| 1051 |
} |
| 1052 |
|
| 1053 |
#define typedef_BDK_ECAMX_NOP_ZNF(a) bdk_ecamx_nop_znf_t |
| 1054 |
#define bustype_BDK_ECAMX_NOP_ZNF(a) BDK_CSR_TYPE_RSL |
| 1055 |
#define basename_BDK_ECAMX_NOP_ZNF(a) "ECAMX_NOP_ZNF" |
| 1056 |
#define device_bar_BDK_ECAMX_NOP_ZNF(a) 0x0 |
| 1057 |
#define busnum_BDK_ECAMX_NOP_ZNF(a) (a) |
| 1058 |
#define arguments_BDK_ECAMX_NOP_ZNF(a) (a),-1,-1,-1 |
| 1059 |
|
| 1060 |
|
| 1061 |
|
| 1062 |
|
| 1063 |
|
| 1064 |
|
| 1065 |
|
| 1066 |
union bdk_ecamx_rslx_nsdis |
| 1067 |
{ |
| 1068 |
uint64_t u; |
| 1069 |
struct bdk_ecamx_rslx_nsdis_s |
| 1070 |
{ |
| 1071 |
#if __BYTE_ORDER == __BIG_ENDIAN |
| 1072 |
uint64_t reserved_1_63 : 63; |
| 1073 |
uint64_t dis : 1; |
| 1074 |
|
| 1075 |
|
| 1076 |
|
| 1077 |
#else |
| 1078 |
uint64_t dis : 1; |
| 1079 |
|
| 1080 |
|
| 1081 |
|
| 1082 |
uint64_t reserved_1_63 : 63; |
| 1083 |
#endif |
| 1084 |
} s; |
| 1085 |
|
| 1086 |
}; |
| 1087 |
typedef union bdk_ecamx_rslx_nsdis bdk_ecamx_rslx_nsdis_t; |
| 1088 |
|
| 1089 |
static inline uint64_t BDK_ECAMX_RSLX_NSDIS(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline)); |
| 1090 |
static inline uint64_t BDK_ECAMX_RSLX_NSDIS(unsigned long a, unsigned long b) |
| 1091 |
{ |
| 1092 |
if (CAVIUM_IS_MODEL(CAVIUM_CN81XX) && ((a==0) && (b<=255))) |
| 1093 |
return 0x87e048050000ll + 0x1000000ll * ((a) & 0x0) + 8ll * ((b) & 0xff); |
| 1094 |
if (CAVIUM_IS_MODEL(CAVIUM_CN83XX) && ((a<=1) && (b<=255))) |
| 1095 |
return 0x87e048050000ll + 0x1000000ll * ((a) & 0x1) + 8ll * ((b) & 0xff); |
| 1096 |
if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && ((a<=3) && (b<=255))) |
| 1097 |
return 0x87e048050000ll + 0x1000000ll * ((a) & 0x3) + 8ll * ((b) & 0xff); |
| 1098 |
__bdk_csr_fatal("ECAMX_RSLX_NSDIS", 2, a, b, 0, 0); |
| 1099 |
} |
| 1100 |
|
| 1101 |
#define typedef_BDK_ECAMX_RSLX_NSDIS(a,b) bdk_ecamx_rslx_nsdis_t |
| 1102 |
#define bustype_BDK_ECAMX_RSLX_NSDIS(a,b) BDK_CSR_TYPE_RSL |
| 1103 |
#define basename_BDK_ECAMX_RSLX_NSDIS(a,b) "ECAMX_RSLX_NSDIS" |
| 1104 |
#define device_bar_BDK_ECAMX_RSLX_NSDIS(a,b) 0x0 |
| 1105 |
#define busnum_BDK_ECAMX_RSLX_NSDIS(a,b) (a) |
| 1106 |
#define arguments_BDK_ECAMX_RSLX_NSDIS(a,b) (a),(b),-1,-1 |
| 1107 |
|
| 1108 |
|
| 1109 |
|
| 1110 |
|
| 1111 |
|
| 1112 |
|
| 1113 |
|
| 1114 |
union bdk_ecamx_rslx_sdis |
| 1115 |
{ |
| 1116 |
uint64_t u; |
| 1117 |
struct bdk_ecamx_rslx_sdis_s |
| 1118 |
{ |
| 1119 |
#if __BYTE_ORDER == __BIG_ENDIAN |
| 1120 |
uint64_t reserved_2_63 : 62; |
| 1121 |
uint64_t sec : 1; |
| 1122 |
|
| 1123 |
|
| 1124 |
uint64_t dis : 1; |
| 1125 |
|
| 1126 |
|
| 1127 |
|
| 1128 |
#else |
| 1129 |
uint64_t dis : 1; |
| 1130 |
|
| 1131 |
|
| 1132 |
|
| 1133 |
uint64_t sec : 1; |
| 1134 |
|
| 1135 |
|
| 1136 |
uint64_t reserved_2_63 : 62; |
| 1137 |
#endif |
| 1138 |
} s; |
| 1139 |
|
| 1140 |
}; |
| 1141 |
typedef union bdk_ecamx_rslx_sdis bdk_ecamx_rslx_sdis_t; |
| 1142 |
|
| 1143 |
static inline uint64_t BDK_ECAMX_RSLX_SDIS(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline)); |
| 1144 |
static inline uint64_t BDK_ECAMX_RSLX_SDIS(unsigned long a, unsigned long b) |
| 1145 |
{ |
| 1146 |
if (CAVIUM_IS_MODEL(CAVIUM_CN81XX) && ((a==0) && (b<=255))) |
| 1147 |
return 0x87e048040000ll + 0x1000000ll * ((a) & 0x0) + 8ll * ((b) & 0xff); |
| 1148 |
if (CAVIUM_IS_MODEL(CAVIUM_CN83XX) && ((a<=1) && (b<=255))) |
| 1149 |
return 0x87e048040000ll + 0x1000000ll * ((a) & 0x1) + 8ll * ((b) & 0xff); |
| 1150 |
if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && ((a<=3) && (b<=255))) |
| 1151 |
return 0x87e048040000ll + 0x1000000ll * ((a) & 0x3) + 8ll * ((b) & 0xff); |
| 1152 |
__bdk_csr_fatal("ECAMX_RSLX_SDIS", 2, a, b, 0, 0); |
| 1153 |
} |
| 1154 |
|
| 1155 |
#define typedef_BDK_ECAMX_RSLX_SDIS(a,b) bdk_ecamx_rslx_sdis_t |
| 1156 |
#define bustype_BDK_ECAMX_RSLX_SDIS(a,b) BDK_CSR_TYPE_RSL |
| 1157 |
#define basename_BDK_ECAMX_RSLX_SDIS(a,b) "ECAMX_RSLX_SDIS" |
| 1158 |
#define device_bar_BDK_ECAMX_RSLX_SDIS(a,b) 0x0 |
| 1159 |
#define busnum_BDK_ECAMX_RSLX_SDIS(a,b) (a) |
| 1160 |
#define arguments_BDK_ECAMX_RSLX_SDIS(a,b) (a),(b),-1,-1 |
| 1161 |
|
| 1162 |
|
| 1163 |
|
| 1164 |
|
| 1165 |
|
| 1166 |
|
| 1167 |
|
| 1168 |
union bdk_ecamx_rslx_skill |
| 1169 |
{ |
| 1170 |
uint64_t u; |
| 1171 |
struct bdk_ecamx_rslx_skill_s |
| 1172 |
{ |
| 1173 |
#if __BYTE_ORDER == __BIG_ENDIAN |
| 1174 |
uint64_t reserved_1_63 : 63; |
| 1175 |
uint64_t skill : 1; |
| 1176 |
|
| 1177 |
|
| 1178 |
|
| 1179 |
#else |
| 1180 |
uint64_t skill : 1; |
| 1181 |
|
| 1182 |
|
| 1183 |
|
| 1184 |
uint64_t reserved_1_63 : 63; |
| 1185 |
#endif |
| 1186 |
} s; |
| 1187 |
|
| 1188 |
}; |
| 1189 |
typedef union bdk_ecamx_rslx_skill bdk_ecamx_rslx_skill_t; |
| 1190 |
|
| 1191 |
static inline uint64_t BDK_ECAMX_RSLX_SKILL(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline)); |
| 1192 |
static inline uint64_t BDK_ECAMX_RSLX_SKILL(unsigned long a, unsigned long b) |
| 1193 |
{ |
| 1194 |
if (CAVIUM_IS_MODEL(CAVIUM_CN81XX) && ((a==0) && (b<=255))) |
| 1195 |
return 0x87e048090000ll + 0x1000000ll * ((a) & 0x0) + 8ll * ((b) & 0xff); |
| 1196 |
if (CAVIUM_IS_MODEL(CAVIUM_CN83XX) && ((a<=1) && (b<=255))) |
| 1197 |
return 0x87e048090000ll + 0x1000000ll * ((a) & 0x1) + 8ll * ((b) & 0xff); |
| 1198 |
if (CAVIUM_IS_MODEL(CAVIUM_CN88XX_PASS2_X) && ((a<=3) && (b<=255))) |
| 1199 |
return 0x87e048090000ll + 0x1000000ll * ((a) & 0x3) + 8ll * ((b) & 0xff); |
| 1200 |
__bdk_csr_fatal("ECAMX_RSLX_SKILL", 2, a, b, 0, 0); |
| 1201 |
} |
| 1202 |
|
| 1203 |
#define typedef_BDK_ECAMX_RSLX_SKILL(a,b) bdk_ecamx_rslx_skill_t |
| 1204 |
#define bustype_BDK_ECAMX_RSLX_SKILL(a,b) BDK_CSR_TYPE_RSL |
| 1205 |
#define basename_BDK_ECAMX_RSLX_SKILL(a,b) "ECAMX_RSLX_SKILL" |
| 1206 |
#define device_bar_BDK_ECAMX_RSLX_SKILL(a,b) 0x0 |
| 1207 |
#define busnum_BDK_ECAMX_RSLX_SKILL(a,b) (a) |
| 1208 |
#define arguments_BDK_ECAMX_RSLX_SKILL(a,b) (a),(b),-1,-1 |
| 1209 |
|
| 1210 |
|
| 1211 |
|
| 1212 |
|
| 1213 |
|
| 1214 |
|
| 1215 |
union bdk_ecamx_scratch |
| 1216 |
{ |
| 1217 |
uint64_t u; |
| 1218 |
struct bdk_ecamx_scratch_s |
| 1219 |
{ |
| 1220 |
#if __BYTE_ORDER == __BIG_ENDIAN |
| 1221 |
uint64_t data : 64; |
| 1222 |
#else |
| 1223 |
uint64_t data : 64; |
| 1224 |
#endif |
| 1225 |
} s; |
| 1226 |
|
| 1227 |
}; |
| 1228 |
typedef union bdk_ecamx_scratch bdk_ecamx_scratch_t; |
| 1229 |
|
| 1230 |
static inline uint64_t BDK_ECAMX_SCRATCH(unsigned long a) __attribute__ ((pure, always_inline)); |
| 1231 |
static inline uint64_t BDK_ECAMX_SCRATCH(unsigned long a) |
| 1232 |
{ |
| 1233 |
if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && (a==0)) |
| 1234 |
return 0x87e048080000ll + 0x1000000ll * ((a) & 0x0); |
| 1235 |
__bdk_csr_fatal("ECAMX_SCRATCH", 1, a, 0, 0, 0); |
| 1236 |
} |
| 1237 |
|
| 1238 |
#define typedef_BDK_ECAMX_SCRATCH(a) bdk_ecamx_scratch_t |
| 1239 |
#define bustype_BDK_ECAMX_SCRATCH(a) BDK_CSR_TYPE_RSL |
| 1240 |
#define basename_BDK_ECAMX_SCRATCH(a) "ECAMX_SCRATCH" |
| 1241 |
#define device_bar_BDK_ECAMX_SCRATCH(a) 0x0 |
| 1242 |
#define busnum_BDK_ECAMX_SCRATCH(a) (a) |
| 1243 |
#define arguments_BDK_ECAMX_SCRATCH(a) (a),-1,-1,-1 |
| 1244 |
|
| 1245 |
#endif |