13859Sml29623 /* 23859Sml29623 * CDDL HEADER START 33859Sml29623 * 43859Sml29623 * The contents of this file are subject to the terms of the 53859Sml29623 * Common Development and Distribution License (the "License"). 63859Sml29623 * You may not use this file except in compliance with the License. 73859Sml29623 * 83859Sml29623 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 93859Sml29623 * or http://www.opensolaris.org/os/licensing. 103859Sml29623 * See the License for the specific language governing permissions 113859Sml29623 * and limitations under the License. 123859Sml29623 * 133859Sml29623 * When distributing Covered Code, include this CDDL HEADER in each 143859Sml29623 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 153859Sml29623 * If applicable, add the following below this CDDL HEADER, with the 163859Sml29623 * fields enclosed by brackets "[]" replaced with your own identifying 173859Sml29623 * information: Portions Copyright [yyyy] [name of copyright owner] 183859Sml29623 * 193859Sml29623 * CDDL HEADER END 203859Sml29623 */ 213859Sml29623 /* 22*6495Sspeer * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 233859Sml29623 * Use is subject to license terms. 243859Sml29623 */ 253859Sml29623 263859Sml29623 #ifndef _SYS_NXGE_NXGE_HW_H 273859Sml29623 #define _SYS_NXGE_NXGE_HW_H 283859Sml29623 293859Sml29623 #pragma ident "%Z%%M% %I% %E% SMI" 303859Sml29623 313859Sml29623 #ifdef __cplusplus 323859Sml29623 extern "C" { 333859Sml29623 #endif 343859Sml29623 353859Sml29623 #if !defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN) && \ 363859Sml29623 !defined(__BIG_ENDIAN) && !defined(__LITTLE_ENDIAN) 373859Sml29623 #error Host endianness not defined 383859Sml29623 #endif 393859Sml29623 403859Sml29623 #if !defined(_BIT_FIELDS_HTOL) && !defined(_BIT_FIELDS_LTOH) && \ 413859Sml29623 !defined(__BIT_FIELDS_HTOL) && !defined(__BIT_FIELDS_LTOH) 423859Sml29623 #error Bit ordering not defined 433859Sml29623 #endif 443859Sml29623 453859Sml29623 #include <nxge_fflp_hw.h> 463859Sml29623 #include <nxge_ipp_hw.h> 473859Sml29623 #include <nxge_mac_hw.h> 483859Sml29623 #include <nxge_rxdma_hw.h> 493859Sml29623 #include <nxge_txc_hw.h> 503859Sml29623 #include <nxge_txdma_hw.h> 513859Sml29623 #include <nxge_zcp_hw.h> 523859Sml29623 #include <nxge_espc_hw.h> 533859Sml29623 #include <nxge_n2_esr_hw.h> 543859Sml29623 #include <nxge_sr_hw.h> 553859Sml29623 #include <nxge_phy_hw.h> 563859Sml29623 573859Sml29623 58*6495Sspeer /* 59*6495Sspeer * The Neptune chip has 16 Receive DMA channels, but no more than 60*6495Sspeer * 24 Transmit DMA channels. 61*6495Sspeer */ 62*6495Sspeer typedef uint32_t dc_map_t; 63*6495Sspeer 64*6495Sspeer /* 65*6495Sspeer * The logical group map is a Crossbow addition. 66*6495Sspeer */ 67*6495Sspeer typedef uint32_t lg_map_t; 68*6495Sspeer 693859Sml29623 /* Modes of NXGE core */ 703859Sml29623 typedef enum nxge_mode_e { 713859Sml29623 NXGE_MODE_NE = 1, 723859Sml29623 NXGE_MODE_N2 = 2 733859Sml29623 } nxge_mode_t; 743859Sml29623 753859Sml29623 /* 763859Sml29623 * Function control Register 773859Sml29623 * (bit 31 is reset to 0. Read back 0 then free to use it. 783859Sml29623 * (once done with it, bit 0:15 can be used to store SW status) 793859Sml29623 */ 803859Sml29623 #define DEV_FUNC_SR_REG (PIO + 0x10000) 813859Sml29623 #define DEV_FUNC_SR_SR_SHIFT 0 823859Sml29623 #define DEV_FUNC_SR_SR_MASK 0x000000000000FFFFULL 833859Sml29623 #define DEV_FUNC_SR_FUNCID_SHIFT 16 843859Sml29623 #define DEV_FUNC_SR_FUNCID_MASK 0x0000000000030000ULL 853859Sml29623 #define DEV_FUNC_SR_TAS_SHIFT 31 863859Sml29623 #define DEV_FUNC_SR_TAS_MASK 0x0000000080000000ULL 873859Sml29623 883859Sml29623 typedef union _dev_func_sr_t { 893859Sml29623 uint64_t value; 903859Sml29623 struct { 913859Sml29623 #if defined(_BIG_ENDIAN) 923859Sml29623 uint32_t hdw; 933859Sml29623 #endif 943859Sml29623 struct { 953859Sml29623 #if defined(_BIT_FIELDS_HTOL) 963859Sml29623 uint32_t tas:1; 973859Sml29623 uint32_t res2:13; 983859Sml29623 uint32_t funcid:2; 993859Sml29623 uint32_t sr:16; 1003859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 1013859Sml29623 uint32_t sr:16; 1023859Sml29623 uint32_t funcid:2; 1033859Sml29623 uint32_t res2:13; 1043859Sml29623 uint32_t tas:1; 1053859Sml29623 #endif 1063859Sml29623 } ldw; 1073859Sml29623 #if !defined(_BIG_ENDIAN) 1083859Sml29623 uint32_t hdw; 1093859Sml29623 #endif 1103859Sml29623 } bits; 1113859Sml29623 } dev_func_sr_t, *p_dev_func_sr_t; 1123859Sml29623 1133859Sml29623 1143859Sml29623 /* 1153859Sml29623 * Multi Parition Control Register (partitiion manager) 1163859Sml29623 */ 1173859Sml29623 #define MULTI_PART_CTL_REG (FZC_PIO + 0x00000) 1183859Sml29623 #define MULTI_PART_CTL_MPC 0x0000000000000001ULL 1193859Sml29623 1203859Sml29623 typedef union _multi_part_ctl_t { 1213859Sml29623 uint64_t value; 1223859Sml29623 struct { 1233859Sml29623 #if defined(_BIG_ENDIAN) 1243859Sml29623 uint32_t hdw; 1253859Sml29623 #endif 1263859Sml29623 struct { 1273859Sml29623 #if defined(_BIT_FIELDS_HTOL) 1283859Sml29623 uint32_t res1:31; 1293859Sml29623 uint32_t mpc:1; 1303859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 1313859Sml29623 uint32_t mpc:1; 1323859Sml29623 uint32_t res1:31; 1333859Sml29623 #endif 1343859Sml29623 } ldw; 1353859Sml29623 #if !defined(_BIG_ENDIAN) 1363859Sml29623 uint32_t hdw; 1373859Sml29623 #endif 1383859Sml29623 } bits; 1393859Sml29623 } multi_part_ctl_t, *p_multi_part_ctl_t; 1403859Sml29623 1413859Sml29623 /* 1423859Sml29623 * Virtual DMA CSR Address (partition manager) 1433859Sml29623 */ 1443859Sml29623 #define VADDR_REG (PIO_VADDR + 0x00000) 1453859Sml29623 1463859Sml29623 /* 1473859Sml29623 * DMA Channel Binding Register (partition manager) 1483859Sml29623 */ 1493859Sml29623 #define DMA_BIND_REG (FZC_PIO + 0x10000) 1503859Sml29623 #define DMA_BIND_RX_SHIFT 0 1513859Sml29623 #define DMA_BIND_RX_MASK 0x000000000000001FULL 1523859Sml29623 #define DMA_BIND_RX_BIND_SHIFT 5 1533859Sml29623 #define DMA_BIND_RX_BIND_SET 0x0000000000000020ULL 1543859Sml29623 #define DMA_BIND_RX_BIND_MASK 0x0000000000000020ULL 1553859Sml29623 #define DMA_BIND_TX_SHIFT 8 1563859Sml29623 #define DMA_BIND_TX_MASK 0x0000000000001f00ULL 1573859Sml29623 #define DMA_BIND_TX_BIND_SHIFT 13 1583859Sml29623 #define DMA_BIND_TX_BIND_SET 0x0000000000002000ULL 1593859Sml29623 #define DMA_BIND_TX_BIND_MASK 0x0000000000002000ULL 1603859Sml29623 1613859Sml29623 typedef union _dma_bind_t { 1623859Sml29623 uint64_t value; 1633859Sml29623 struct { 1643859Sml29623 #if defined(_BIG_ENDIAN) 1653859Sml29623 uint32_t hdw; 1663859Sml29623 #endif 1673859Sml29623 struct { 1683859Sml29623 #if defined(_BIT_FIELDS_HTOL) 1693859Sml29623 uint32_t res1_1:16; 1703859Sml29623 uint32_t tx_bind:1; 1713859Sml29623 uint32_t tx:5; 1723859Sml29623 uint32_t res2:2; 1733859Sml29623 uint32_t rx_bind:1; 1743859Sml29623 uint32_t rx:5; 1753859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 1763859Sml29623 uint32_t rx:5; 1773859Sml29623 uint32_t rx_bind:1; 1783859Sml29623 uint32_t res2:2; 1793859Sml29623 uint32_t tx:5; 1803859Sml29623 uint32_t tx_bind:1; 1813859Sml29623 uint32_t res1_1:16; 1823859Sml29623 #endif 1833859Sml29623 } ldw; 1843859Sml29623 #if !defined(_BIG_ENDIAN) 1853859Sml29623 uint32_t hdw; 1863859Sml29623 #endif 1873859Sml29623 } bits; 1883859Sml29623 } dma_bind_t, *p_dma_bind_t; 1893859Sml29623 1903859Sml29623 /* 1913859Sml29623 * System interrupts: 1923859Sml29623 * Logical device and group definitions. 1933859Sml29623 */ 1943859Sml29623 #define NXGE_INT_MAX_LDS 69 1953859Sml29623 #define NXGE_INT_MAX_LDGS 64 1963859Sml29623 #define NXGE_LDGRP_PER_NIU_PORT (NXGE_INT_MAX_LDGS/2) 1973859Sml29623 #define NXGE_LDGRP_PER_NEP_PORT (NXGE_INT_MAX_LDGS/4) 1983859Sml29623 #define NXGE_LDGRP_PER_2PORTS (NXGE_INT_MAX_LDGS/2) 1993859Sml29623 #define NXGE_LDGRP_PER_4PORTS (NXGE_INT_MAX_LDGS/4) 2003859Sml29623 2013859Sml29623 #define NXGE_RDMA_LD_START 0 2023859Sml29623 #define NXGE_TDMA_LD_START 32 2033859Sml29623 #define NXGE_MIF_LD 63 2043859Sml29623 #define NXGE_MAC_LD_START 64 2053859Sml29623 #define NXGE_MAC_LD_PORT0 64 2063859Sml29623 #define NXGE_MAC_LD_PORT1 65 2073859Sml29623 #define NXGE_MAC_LD_PORT2 66 2083859Sml29623 #define NXGE_MAC_LD_PORT3 67 2093859Sml29623 #define NXGE_SYS_ERROR_LD 68 2103859Sml29623 2113859Sml29623 /* 2123859Sml29623 * Logical Device Group Number 2133859Sml29623 */ 2143859Sml29623 #define LDG_NUM_REG (FZC_PIO + 0x20000) 2153859Sml29623 #define LDG_NUM_NUM_SHIFT 0 2163859Sml29623 #define LDG_NUM_NUM_MASK 0x000000000000001FULL 2173859Sml29623 2183859Sml29623 typedef union _ldg_num_t { 2193859Sml29623 uint64_t value; 2203859Sml29623 struct { 2213859Sml29623 #if defined(_BIG_ENDIAN) 2223859Sml29623 uint32_t hdw; 2233859Sml29623 #endif 2243859Sml29623 struct { 2253859Sml29623 #if defined(_BIT_FIELDS_HTOL) 2263859Sml29623 uint32_t res1_1:26; 2273859Sml29623 uint32_t num:6; 2283859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 2293859Sml29623 uint32_t num:6; 2303859Sml29623 uint32_t res1_1:26; 2313859Sml29623 #endif 2323859Sml29623 } ldw; 2333859Sml29623 #if !defined(_BIG_ENDIAN) 2343859Sml29623 uint32_t hdw; 2353859Sml29623 #endif 2363859Sml29623 } bits; 2373859Sml29623 } ldg_num_t, *p_ldg_num_t; 2383859Sml29623 2393859Sml29623 /* 2403859Sml29623 * Logical Device State Vector 2413859Sml29623 */ 2423859Sml29623 #define LDSV0_REG (PIO_LDSV + 0x00000) 2433859Sml29623 #define LDSV0_LDF_SHIFT 0 2443859Sml29623 #define LDSV0_LDF_MASK 0x00000000000003FFULL 2453859Sml29623 #define LDG_NUM_NUM_MASK 0x000000000000001FULL 2463859Sml29623 #define LDSV_MASK_ALL 0x0000000000000001ULL 2473859Sml29623 2483859Sml29623 /* 2493859Sml29623 * Logical Device State Vector 1 2503859Sml29623 */ 2513859Sml29623 #define LDSV1_REG (PIO_LDSV + 0x00008) 2523859Sml29623 2533859Sml29623 /* 2543859Sml29623 * Logical Device State Vector 2 2553859Sml29623 */ 2563859Sml29623 #define LDSV2_REG (PIO_LDSV + 0x00010) 2573859Sml29623 2583859Sml29623 /* For Logical Device State Vector 0 and 1 */ 2593859Sml29623 typedef union _ldsv_t { 2603859Sml29623 uint64_t value; 2613859Sml29623 struct { 2623859Sml29623 #if defined(_BIG_ENDIAN) 2633859Sml29623 uint32_t hdw; 2643859Sml29623 #endif 2653859Sml29623 uint32_t ldw; 2663859Sml29623 #if !defined(_BIG_ENDIAN) 2673859Sml29623 uint32_t hdw; 2683859Sml29623 #endif 2693859Sml29623 } bits; 2703859Sml29623 } ldsv_t, *p_ldsv_t; 2713859Sml29623 2723859Sml29623 #define LDSV2_LDF0_SHIFT 0 2733859Sml29623 #define LDSV2_LDF0_MASK 0x000000000000001FULL 2743859Sml29623 #define LDSV2_LDF1_SHIFT 5 2753859Sml29623 #define LDSV2_LDF1_MASK 0x00000000000001E0ULL 2763859Sml29623 2773859Sml29623 typedef union _ldsv2_t { 2783859Sml29623 uint64_t value; 2793859Sml29623 struct { 2803859Sml29623 #if defined(_BIG_ENDIAN) 2813859Sml29623 uint32_t hdw; 2823859Sml29623 #endif 2833859Sml29623 struct { 2843859Sml29623 #if defined(_BIT_FIELDS_HTOL) 2853859Sml29623 uint32_t res1_1:22; 2863859Sml29623 uint32_t ldf1:5; 2873859Sml29623 uint32_t ldf0:5; 2883859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 2893859Sml29623 uint32_t ldf0:5; 2903859Sml29623 uint32_t ldf1:5; 2913859Sml29623 uint32_t res1_1:22; 2923859Sml29623 #endif 2933859Sml29623 } ldw; 2943859Sml29623 #if !defined(_BIG_ENDIAN) 2953859Sml29623 uint32_t hdw; 2963859Sml29623 #endif 2973859Sml29623 } bits; 2983859Sml29623 } ldsv2_t, *p_ldsv2_t; 2993859Sml29623 3003859Sml29623 /* 3013859Sml29623 * Logical Device Interrupt Mask 0 3023859Sml29623 */ 3033859Sml29623 #define LD_IM0_REG (PIO_IMASK0 + 0x00000) 3043859Sml29623 #define LD_IM0_SHIFT 0 3053859Sml29623 #define LD_IM0_MASK 0x0000000000000003ULL 3063859Sml29623 #define LD_IM_MASK 0x0000000000000003ULL 3073859Sml29623 3083859Sml29623 /* 3093859Sml29623 * Logical Device Interrupt Mask 1 3103859Sml29623 */ 3113859Sml29623 #define LD_IM1_REG (PIO_IMASK1 + 0x00000) 3123859Sml29623 #define LD_IM1_SHIFT 0 3133859Sml29623 #define LD_IM1_MASK 0x0000000000000003ULL 3143859Sml29623 3153859Sml29623 /* For Lofical Device Interrupt Mask 0 and 1 */ 3163859Sml29623 typedef union _ld_im_t { 3173859Sml29623 uint64_t value; 3183859Sml29623 struct { 3193859Sml29623 #if defined(_BIG_ENDIAN) 3203859Sml29623 uint32_t hdw; 3213859Sml29623 #endif 3223859Sml29623 struct { 3233859Sml29623 3243859Sml29623 #if defined(_BIT_FIELDS_HTOL) 3253859Sml29623 uint32_t res1_1:30; 3263859Sml29623 uint32_t ldf_mask:2; 3273859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 3283859Sml29623 uint32_t ldf_mask:2; 3293859Sml29623 uint32_t res1_1:30; 3303859Sml29623 #endif 3313859Sml29623 } ldw; 3323859Sml29623 #if !defined(_BIG_ENDIAN) 3333859Sml29623 uint32_t hdw; 3343859Sml29623 #endif 3353859Sml29623 } bits; 3363859Sml29623 } ld_im_t, *p_ld_im_t; 3373859Sml29623 3383859Sml29623 /* 3393859Sml29623 * Logical Device Group Interrupt Management 3403859Sml29623 */ 3413859Sml29623 #define LDGIMGN_REG (PIO_LDSV + 0x00018) 3423859Sml29623 #define LDGIMGN_TIMER_SHIFT 0 3433859Sml29623 #define LDGIMGM_TIMER_MASK 0x000000000000003FULL 3443859Sml29623 #define LDGIMGN_ARM_SHIFT 31 3453859Sml29623 #define LDGIMGM_ARM 0x0000000080000000ULL 3463859Sml29623 #define LDGIMGM_ARM_MASK 0x0000000080000000ULL 3473859Sml29623 3483859Sml29623 typedef union _ldgimgm_t { 3493859Sml29623 uint64_t value; 3503859Sml29623 struct { 3513859Sml29623 #if defined(_BIG_ENDIAN) 3523859Sml29623 uint32_t hdw; 3533859Sml29623 #endif 3543859Sml29623 struct { 3553859Sml29623 #if defined(_BIT_FIELDS_HTOL) 3563859Sml29623 uint32_t arm:1; 3573859Sml29623 uint32_t res2:25; 3583859Sml29623 uint32_t timer:6; 3593859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 3603859Sml29623 uint32_t timer:6; 3613859Sml29623 uint32_t res2:25; 3623859Sml29623 uint32_t arm:1; 3633859Sml29623 #endif 3643859Sml29623 } ldw; 3653859Sml29623 #if !defined(_BIG_ENDIAN) 3663859Sml29623 uint32_t hdw; 3673859Sml29623 #endif 3683859Sml29623 } bits; 3693859Sml29623 } ldgimgm_t, *p_ldgimgm_t; 3703859Sml29623 3713859Sml29623 /* 3723859Sml29623 * Logical Device Group Interrupt Timer Resolution 3733859Sml29623 */ 3743859Sml29623 #define LDGITMRES_REG (FZC_PIO + 0x00008) 3753859Sml29623 #define LDGTITMRES_RES_SHIFT 0 /* bits 19:0 */ 3763859Sml29623 #define LDGTITMRES_RES_MASK 0x00000000000FFFFFULL 3773859Sml29623 typedef union _ldgitmres_t { 3783859Sml29623 uint64_t value; 3793859Sml29623 struct { 3803859Sml29623 #if defined(_BIG_ENDIAN) 3813859Sml29623 uint32_t hdw; 3823859Sml29623 #endif 3833859Sml29623 struct { 3843859Sml29623 #if defined(_BIT_FIELDS_HTOL) 3853859Sml29623 uint32_t res1_1:12; 3863859Sml29623 uint32_t res:20; 3873859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 3883859Sml29623 uint32_t res:20; 3893859Sml29623 uint32_t res1_1:12; 3903859Sml29623 #endif 3913859Sml29623 } ldw; 3923859Sml29623 #if !defined(_BIG_ENDIAN) 3933859Sml29623 uint32_t hdw; 3943859Sml29623 #endif 3953859Sml29623 } bits; 3963859Sml29623 } ldgitmres_t, *p_ldgitmres_t; 3973859Sml29623 3983859Sml29623 /* 3993859Sml29623 * System Interrupt Data 4003859Sml29623 */ 4013859Sml29623 #define SID_REG (FZC_PIO + 0x10200) 4023859Sml29623 #define SID_DATA_SHIFT 0 /* bits 6:0 */ 4033859Sml29623 #define SID_DATA_MASK 0x000000000000007FULL 4043859Sml29623 #define SID_DATA_INTNUM_SHIFT 0 /* bits 4:0 */ 4053859Sml29623 #define SID_DATA_INTNUM_MASK 0x000000000000001FULL 4063859Sml29623 #define SID_DATA_FUNCNUM_SHIFT 5 /* bits 6:5 */ 4073859Sml29623 #define SID_DATA_FUNCNUM_MASK 0x0000000000000060ULL 4083859Sml29623 #define SID_PCI_FUNCTION_SHIFT (1 << 5) 4093859Sml29623 #define SID_N2_INDEX (1 << 6) 4103859Sml29623 4113859Sml29623 #define SID_DATA(f, v) ((f << SID_DATA_FUNCNUM_SHIFT) | \ 4123859Sml29623 ((v << SID_DATA_SHIFT) & SID_DATA_INTNUM_MASK)) 4133859Sml29623 4143859Sml29623 #define SID_DATA_N2(v) (v | SID_N2_INDEX) 4153859Sml29623 4163859Sml29623 typedef union _sid_t { 4173859Sml29623 uint64_t value; 4183859Sml29623 struct { 4193859Sml29623 #if defined(_BIG_ENDIAN) 4203859Sml29623 uint32_t hdw; 4213859Sml29623 #endif 4223859Sml29623 struct { 4233859Sml29623 #if defined(_BIT_FIELDS_HTOL) 4243859Sml29623 uint32_t res1_1:25; 4253859Sml29623 uint32_t data:7; 4263859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 4273859Sml29623 uint32_t data:7; 4283859Sml29623 uint32_t res1_1:25; 4293859Sml29623 #endif 4303859Sml29623 } ldw; 4313859Sml29623 #if !defined(_BIG_ENDIAN) 4323859Sml29623 uint32_t hdw; 4333859Sml29623 #endif 4343859Sml29623 } bits; 4353859Sml29623 } sid_t, *p_sid_t; 4363859Sml29623 4373859Sml29623 /* 4383859Sml29623 * Reset Control 4393859Sml29623 */ 4403859Sml29623 #define RST_CTL_REG (FZC_PIO + 0x00038) 4413859Sml29623 #define RST_CTL_MAC_RST3 0x0000000000400000ULL 4423859Sml29623 #define RST_CTL_MAC_RST3_SHIFT 22 4433859Sml29623 #define RST_CTL_MAC_RST2 0x0000000000200000ULL 4443859Sml29623 #define RST_CTL_MAC_RST2_SHIFT 21 4453859Sml29623 #define RST_CTL_MAC_RST1 0x0000000000100000ULL 4463859Sml29623 #define RST_CTL_MAC_RST1_SHIFT 20 4473859Sml29623 #define RST_CTL_MAC_RST0 0x0000000000080000ULL 4483859Sml29623 #define RST_CTL_MAC_RST0_SHIFT 19 4493859Sml29623 #define RST_CTL_EN_ACK_TO 0x0000000000000800ULL 4503859Sml29623 #define RST_CTL_EN_ACK_TO_SHIFT 11 4513859Sml29623 #define RST_CTL_ACK_TO_MASK 0x00000000000007FEULL 4523859Sml29623 #define RST_CTL_ACK_TO_SHIFT 1 4533859Sml29623 4543859Sml29623 4553859Sml29623 typedef union _rst_ctl_t { 4563859Sml29623 uint64_t value; 4573859Sml29623 struct { 4583859Sml29623 #if defined(_BIG_ENDIAN) 4593859Sml29623 uint32_t hdw; 4603859Sml29623 #endif 4613859Sml29623 struct { 4623859Sml29623 #if defined(_BIT_FIELDS_HTOL) 4633859Sml29623 uint32_t res1:9; 4643859Sml29623 uint32_t mac_rst3:1; 4653859Sml29623 uint32_t mac_rst2:1; 4663859Sml29623 uint32_t mac_rst1:1; 4673859Sml29623 uint32_t mac_rst0:1; 4683859Sml29623 uint32_t res2:7; 4693859Sml29623 uint32_t ack_to_en:1; 4703859Sml29623 uint32_t ack_to_val:10; 4713859Sml29623 uint32_t res3:1; 4723859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 4733859Sml29623 uint32_t res3:1; 4743859Sml29623 uint32_t ack_to_val:10; 4753859Sml29623 uint32_t ack_to_en:1; 4763859Sml29623 uint32_t res2:7; 4773859Sml29623 uint32_t mac_rst0:1; 4783859Sml29623 uint32_t mac_rst1:1; 4793859Sml29623 uint32_t mac_rst2:1; 4803859Sml29623 uint32_t mac_rst3:1; 4813859Sml29623 uint32_t res1:9; 4823859Sml29623 #endif 4833859Sml29623 } ldw; 4843859Sml29623 #if !defined(_BIG_ENDIAN) 4853859Sml29623 uint32_t hdw; 4863859Sml29623 #endif 4873859Sml29623 } bits; 4883859Sml29623 } rst_ctl_t, *p_rst_ctl_t; 4893859Sml29623 4903859Sml29623 /* 4913859Sml29623 * System Error Mask 4923859Sml29623 */ 4933859Sml29623 #define SYS_ERR_MASK_REG (FZC_PIO + 0x00090) 4943859Sml29623 4953859Sml29623 /* 4963859Sml29623 * System Error Status 4973859Sml29623 */ 4983859Sml29623 #define SYS_ERR_STAT_REG (FZC_PIO + 0x00098) 4993859Sml29623 5003859Sml29623 5013859Sml29623 #define SYS_ERR_META2_MASK 0x0000000000000400ULL 5023859Sml29623 #define SYS_ERR_META2_SHIFT 10 5033859Sml29623 #define SYS_ERR_META1_MASK 0x0000000000000200ULL 5043859Sml29623 #define SYS_ERR_META1_SHIFT 9 5053859Sml29623 #define SYS_ERR_PEU_MASK 0x0000000000000100ULL 5063859Sml29623 #define SYS_ERR_PEU_SHIFT 8 5073859Sml29623 #define SYS_ERR_TXC_MASK 0x0000000000000080ULL 5083859Sml29623 #define SYS_ERR_TXC_SHIFT 7 5093859Sml29623 #define SYS_ERR_RDMC_MASK 0x0000000000000040ULL 5103859Sml29623 #define SYS_ERR_RDMC_SHIFT 6 5113859Sml29623 #define SYS_ERR_TDMC_MASK 0x0000000000000020ULL 5123859Sml29623 #define SYS_ERR_TDMC_SHIFT 5 5133859Sml29623 #define SYS_ERR_ZCP_MASK 0x0000000000000010ULL 5143859Sml29623 #define SYS_ERR_ZCP_SHIFT 4 5153859Sml29623 #define SYS_ERR_FFLP_MASK 0x0000000000000008ULL 5163859Sml29623 #define SYS_ERR_FFLP_SHIFT 3 5173859Sml29623 #define SYS_ERR_IPP_MASK 0x0000000000000004ULL 5183859Sml29623 #define SYS_ERR_IPP_SHIFT 2 5193859Sml29623 #define SYS_ERR_MAC_MASK 0x0000000000000002ULL 5203859Sml29623 #define SYS_ERR_MAC_SHIFT 1 5213859Sml29623 #define SYS_ERR_SMX_MASK 0x0000000000000001ULL 5223859Sml29623 #define SYS_ERR_SMX_SHIFT 0 5233859Sml29623 #define SYS_ERR_MASK_ALL (SYS_ERR_SMX_MASK | SYS_ERR_MAC_MASK | \ 5243859Sml29623 SYS_ERR_IPP_MASK | SYS_ERR_FFLP_MASK | \ 5253859Sml29623 SYS_ERR_ZCP_MASK | SYS_ERR_TDMC_MASK | \ 5263859Sml29623 SYS_ERR_RDMC_MASK | SYS_ERR_TXC_MASK | \ 5273859Sml29623 SYS_ERR_PEU_MASK | SYS_ERR_META1_MASK | \ 5283859Sml29623 SYS_ERR_META2_MASK) 5293859Sml29623 5303859Sml29623 5313859Sml29623 typedef union _sys_err_mask_t { 5323859Sml29623 uint64_t value; 5333859Sml29623 struct { 5343859Sml29623 #if defined(_BIG_ENDIAN) 5353859Sml29623 uint32_t hdw; 5363859Sml29623 #endif 5373859Sml29623 struct { 5383859Sml29623 #if defined(_BIT_FIELDS_HTOL) 5393859Sml29623 uint32_t res:21; 5403859Sml29623 uint32_t meta2:1; 5413859Sml29623 uint32_t meta1:1; 5423859Sml29623 uint32_t peu:1; 5433859Sml29623 uint32_t txc:1; 5443859Sml29623 uint32_t rdmc:1; 5453859Sml29623 uint32_t tdmc:1; 5463859Sml29623 uint32_t zcp:1; 5473859Sml29623 uint32_t fflp:1; 5483859Sml29623 uint32_t ipp:1; 5493859Sml29623 uint32_t mac:1; 5503859Sml29623 uint32_t smx:1; 5513859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 5523859Sml29623 uint32_t smx:1; 5533859Sml29623 uint32_t mac:1; 5543859Sml29623 uint32_t ipp:1; 5553859Sml29623 uint32_t fflp:1; 5563859Sml29623 uint32_t zcp:1; 5573859Sml29623 uint32_t tdmc:1; 5583859Sml29623 uint32_t rdmc:1; 5593859Sml29623 uint32_t txc:1; 5603859Sml29623 uint32_t peu:1; 5613859Sml29623 uint32_t meta1:1; 5623859Sml29623 uint32_t meta2:1; 5633859Sml29623 uint32_t res:21; 5643859Sml29623 #endif 5653859Sml29623 } ldw; 5663859Sml29623 #if !defined(_BIG_ENDIAN) 5673859Sml29623 uint32_t hdw; 5683859Sml29623 #endif 5693859Sml29623 } bits; 5703859Sml29623 } sys_err_mask_t, sys_err_stat_t, *p_sys_err_mask_t, *p_sys_err_stat_t; 5713859Sml29623 5723859Sml29623 5733859Sml29623 /* 5743859Sml29623 * Meta Arbiter Dirty Transaction ID Control 5753859Sml29623 */ 5763859Sml29623 5773859Sml29623 #define DIRTY_TID_CTL_REG (FZC_PIO + 0x0010) 5783859Sml29623 #define DIRTY_TID_CTL_WR_THRES_MASK 0x00000000003F0000ULL 5793859Sml29623 #define DIRTY_TID_CTL_WR_THRES_SHIFT 16 5803859Sml29623 #define DIRTY_TID_CTL_RD_THRES_MASK 0x00000000000003F0ULL 5813859Sml29623 #define DIRTY_TID_CTL_RD_THRES_SHIFT 4 5823859Sml29623 #define DIRTY_TID_CTL_DTID_CLR 0x0000000000000002ULL 5833859Sml29623 #define DIRTY_TID_CTL_DTID_CLR_SHIFT 1 5843859Sml29623 #define DIRTY_TID_CTL_DTID_EN 0x0000000000000001ULL 5853859Sml29623 #define DIRTY_TID_CTL_DTID_EN_SHIFT 0 5863859Sml29623 5873859Sml29623 typedef union _dty_tid_ctl_t { 5883859Sml29623 uint64_t value; 5893859Sml29623 struct { 5903859Sml29623 #if defined(_BIG_ENDIAN) 5913859Sml29623 uint32_t hdw; 5923859Sml29623 #endif 5933859Sml29623 struct { 5943859Sml29623 #if defined(_BIT_FIELDS_HTOL) 5953859Sml29623 uint32_t res1:10; 5963859Sml29623 uint32_t np_wr_thres_val:6; 5973859Sml29623 uint32_t res2:6; 5983859Sml29623 uint32_t np_rd_thres_val:6; 5993859Sml29623 uint32_t res3:2; 6003859Sml29623 uint32_t dty_tid_clr:1; 6013859Sml29623 uint32_t dty_tid_en:1; 6023859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 6033859Sml29623 uint32_t dty_tid_en:1; 6043859Sml29623 uint32_t dty_tid_clr:1; 6053859Sml29623 uint32_t res3:2; 6063859Sml29623 uint32_t np_rd_thres_val:6; 6073859Sml29623 uint32_t res2:6; 6083859Sml29623 uint32_t np_wr_thres_val:6; 6093859Sml29623 uint32_t res1:10; 6103859Sml29623 #endif 6113859Sml29623 } ldw; 6123859Sml29623 #if !defined(_BIG_ENDIAN) 6133859Sml29623 uint32_t hdw; 6143859Sml29623 #endif 6153859Sml29623 } bits; 6163859Sml29623 } dty_tid_ctl_t, *p_dty_tid_ctl_t; 6173859Sml29623 6183859Sml29623 6193859Sml29623 /* 6203859Sml29623 * Meta Arbiter Dirty Transaction ID Status 6213859Sml29623 */ 6223859Sml29623 #define DIRTY_TID_STAT_REG (FZC_PIO + 0x0018) 6233859Sml29623 #define DIRTY_TID_STAT_WR_TID_DTY_CNT_MASK 0x0000000000003F00ULL 6243859Sml29623 #define DIRTY_TID_STAT_WR_TID_DTY_CNT_SHIFT 8 6253859Sml29623 #define DIRTY_TID_STAT_RD_TID_DTY_CNT_MASK 0x000000000000003FULL 6263859Sml29623 #define DIRTY_TID_STAT_RD_TID_DTY_CNT_SHIFT 0 6273859Sml29623 6283859Sml29623 typedef union _dty_tid_stat_t { 6293859Sml29623 uint64_t value; 6303859Sml29623 struct { 6313859Sml29623 #if defined(_BIG_ENDIAN) 6323859Sml29623 uint32_t hdw; 6333859Sml29623 #endif 6343859Sml29623 struct { 6353859Sml29623 #if defined(_BIT_FIELDS_HTOL) 6363859Sml29623 uint32_t res1:18; 6373859Sml29623 uint32_t wr_tid_dirty_cnt:6; 6383859Sml29623 uint32_t res2:2; 6393859Sml29623 uint32_t rd_tid_dirty_cnt:6; 6403859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 6413859Sml29623 uint32_t rd_tid_dirty_cnt:6; 6423859Sml29623 uint32_t res2:2; 6433859Sml29623 uint32_t wr_tid_dirty_cnt:6; 6443859Sml29623 uint32_t res1:18; 6453859Sml29623 #endif 6463859Sml29623 } ldw; 6473859Sml29623 #if !defined(_BIG_ENDIAN) 6483859Sml29623 uint32_t hdw; 6493859Sml29623 #endif 6503859Sml29623 } bits; 6513859Sml29623 } dty_tid_stat_t, *p_dty_tid_stat_t; 6523859Sml29623 6533859Sml29623 6543859Sml29623 /* 6553859Sml29623 * SMX Registers 6563859Sml29623 */ 6573859Sml29623 #define SMX_CFIG_DAT_REG (FZC_PIO + 0x00040) 6583859Sml29623 #define SMX_CFIG_DAT_RAS_DET_EN_MASK 0x0000000080000000ULL 6593859Sml29623 #define SMX_CFIG_DAT_RAS_DET_EN_SHIFT 31 6603859Sml29623 #define SMX_CFIG_DAT_RAS_INJ_EN_MASK 0x0000000040000000ULL 6613859Sml29623 #define SMX_CFIG_DAT_RAS_INJ_EN_SHIFT 30 6623859Sml29623 #define SMX_CFIG_DAT_TRANS_TO_MASK 0x000000000FFFFFFFULL 6633859Sml29623 #define SMX_CFIG_DAT_TRANS_TO_SHIFT 0 6643859Sml29623 6653859Sml29623 typedef union _smx_cfg_dat_t { 6663859Sml29623 uint64_t value; 6673859Sml29623 struct { 6683859Sml29623 #if defined(_BIG_ENDIAN) 6693859Sml29623 uint32_t hdw; 6703859Sml29623 #endif 6713859Sml29623 struct { 6723859Sml29623 #if defined(_BIT_FIELDS_HTOL) 6733859Sml29623 uint32_t res_err_det:1; 6743859Sml29623 uint32_t ras_err_inj_en:1; 6753859Sml29623 uint32_t res:2; 6763859Sml29623 uint32_t trans_to_val:28; 6773859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 6783859Sml29623 uint32_t trans_to_val:28; 6793859Sml29623 uint32_t res:2; 6803859Sml29623 uint32_t ras_err_inj_en:1; 6813859Sml29623 uint32_t res_err_det:1; 6823859Sml29623 #endif 6833859Sml29623 } ldw; 6843859Sml29623 #if !defined(_BIG_ENDIAN) 6853859Sml29623 uint32_t hdw; 6863859Sml29623 #endif 6873859Sml29623 } bits; 6883859Sml29623 } smx_cfg_dat_t, *p_smx_cfg_dat_t; 6893859Sml29623 6903859Sml29623 6913859Sml29623 #define SMX_INT_STAT_REG (FZC_PIO + 0x00048) 6923859Sml29623 #define SMX_INT_STAT_SM_MASK 0x00000000FFFFFFC0ULL 6933859Sml29623 #define SMX_INT_STAT_SM_SHIFT 6 6943859Sml29623 6953859Sml29623 typedef union _smx_int_stat_t { 6963859Sml29623 uint64_t value; 6973859Sml29623 struct { 6983859Sml29623 #if defined(_BIG_ENDIAN) 6993859Sml29623 uint32_t hdw; 7003859Sml29623 #endif 7013859Sml29623 struct { 7023859Sml29623 #if defined(_BIT_FIELDS_HTOL) 7033859Sml29623 uint32_t st_mc_stat:26; 7043859Sml29623 uint32_t res:6; 7053859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 7063859Sml29623 uint32_t res:6; 7073859Sml29623 uint32_t st_mc_stat:26; 7083859Sml29623 #endif 7093859Sml29623 } ldw; 7103859Sml29623 #if !defined(_BIG_ENDIAN) 7113859Sml29623 uint32_t hdw; 7123859Sml29623 #endif 7133859Sml29623 } bits; 7143859Sml29623 } smx_int_stat_t, *p_smx_int_stat_t; 7153859Sml29623 7163859Sml29623 7173859Sml29623 #define SMX_CTL_REG (FZC_PIO + 0x00050) 7183859Sml29623 7193859Sml29623 typedef union _smx_ctl_t { 7203859Sml29623 uint64_t value; 7213859Sml29623 struct { 7223859Sml29623 #if defined(_BIG_ENDIAN) 7233859Sml29623 uint32_t hdw; 7243859Sml29623 #endif 7253859Sml29623 struct { 7263859Sml29623 #if defined(_BIT_FIELDS_HTOL) 7273859Sml29623 uint32_t res1:21; 7283859Sml29623 uint32_t resp_err_inj:3; 7293859Sml29623 uint32_t res2:1; 7303859Sml29623 uint32_t xtb_err_inj:3; 7313859Sml29623 uint32_t res3:1; 7323859Sml29623 uint32_t dbg_sel:3; 7333859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 7343859Sml29623 uint32_t dbg_sel:3; 7353859Sml29623 uint32_t res3:1; 7363859Sml29623 uint32_t xtb_err_inj:3; 7373859Sml29623 uint32_t res2:1; 7383859Sml29623 uint32_t resp_err_inj:3; 7393859Sml29623 uint32_t res1:21; 7403859Sml29623 #endif 7413859Sml29623 } ldw; 7423859Sml29623 #if !defined(_BIG_ENDIAN) 7433859Sml29623 uint32_t hdw; 7443859Sml29623 #endif 7453859Sml29623 } bits; 7463859Sml29623 } smx_ctl_t, *p_smx_ctl_t; 7473859Sml29623 7483859Sml29623 7493859Sml29623 #define SMX_DBG_VEC_REG (FZC_PIO + 0x00058) 7503859Sml29623 7513859Sml29623 typedef union _smx_dbg_vec_t { 7523859Sml29623 uint64_t value; 7533859Sml29623 struct { 7543859Sml29623 #if defined(_BIG_ENDIAN) 7553859Sml29623 uint32_t hdw; 7563859Sml29623 #endif 7573859Sml29623 struct { 7583859Sml29623 uint32_t dbg_tng_vec; 7593859Sml29623 } ldw; 7603859Sml29623 #if !defined(_BIG_ENDIAN) 7613859Sml29623 uint32_t hdw; 7623859Sml29623 #endif 7633859Sml29623 } bits; 7643859Sml29623 } smx_dbg_vec_t, *p_smx_dbg_vec_t; 7653859Sml29623 7663859Sml29623 7673859Sml29623 /* 7683859Sml29623 * Debug registers 7693859Sml29623 */ 7703859Sml29623 7713859Sml29623 #define PIO_DBG_SEL_REG (FZC_PIO + 0x00060) 7723859Sml29623 7733859Sml29623 typedef union _pio_dbg_sel_t { 7743859Sml29623 uint64_t value; 7753859Sml29623 struct { 7763859Sml29623 #if defined(_BIG_ENDIAN) 7773859Sml29623 uint32_t hdw; 7783859Sml29623 #endif 7793859Sml29623 struct { 7803859Sml29623 uint32_t sel; 7813859Sml29623 } ldw; 7823859Sml29623 #if !defined(_BIG_ENDIAN) 7833859Sml29623 uint32_t hdw; 7843859Sml29623 #endif 7853859Sml29623 } bits; 7863859Sml29623 } pio_dbg_sel_t, *p_pio_dbg_sel_t; 7873859Sml29623 7883859Sml29623 7893859Sml29623 #define PIO_TRAIN_VEC_REG (FZC_PIO + 0x00068) 7903859Sml29623 7913859Sml29623 typedef union _pio_tng_vec_t { 7923859Sml29623 uint64_t value; 7933859Sml29623 struct { 7943859Sml29623 #if defined(_BIG_ENDIAN) 7953859Sml29623 uint32_t hdw; 7963859Sml29623 #endif 7973859Sml29623 struct { 7983859Sml29623 uint32_t training_vec; 7993859Sml29623 } ldw; 8003859Sml29623 #if !defined(_BIG_ENDIAN) 8013859Sml29623 uint32_t hdw; 8023859Sml29623 #endif 8033859Sml29623 } bits; 8043859Sml29623 } pio_tng_vec_t, *p_pio_tng_vec_t; 8053859Sml29623 8063859Sml29623 #define PIO_ARB_CTL_REG (FZC_PIO + 0x00070) 8073859Sml29623 8083859Sml29623 typedef union _pio_arb_ctl_t { 8093859Sml29623 uint64_t value; 8103859Sml29623 struct { 8113859Sml29623 #if defined(_BIG_ENDIAN) 8123859Sml29623 uint32_t hdw; 8133859Sml29623 #endif 8143859Sml29623 struct { 8153859Sml29623 uint32_t ctl; 8163859Sml29623 } ldw; 8173859Sml29623 #if !defined(_BIG_ENDIAN) 8183859Sml29623 uint32_t hdw; 8193859Sml29623 #endif 8203859Sml29623 } bits; 8213859Sml29623 } pio_arb_ctl_t, *p_pio_arb_ctl_t; 8223859Sml29623 8233859Sml29623 #define PIO_ARB_DBG_VEC_REG (FZC_PIO + 0x00078) 8243859Sml29623 8253859Sml29623 typedef union _pio_arb_dbg_vec_t { 8263859Sml29623 uint64_t value; 8273859Sml29623 struct { 8283859Sml29623 #if defined(_BIG_ENDIAN) 8293859Sml29623 uint32_t hdw; 8303859Sml29623 #endif 8313859Sml29623 struct { 8323859Sml29623 uint32_t dbg_vector; 8333859Sml29623 } ldw; 8343859Sml29623 #if !defined(_BIG_ENDIAN) 8353859Sml29623 uint32_t hdw; 8363859Sml29623 #endif 8373859Sml29623 } bits; 8383859Sml29623 } pio_arb_dbg_vec_t, *p_pio_arb_dbg_vec_t; 8393859Sml29623 8403859Sml29623 8413859Sml29623 /* 8423859Sml29623 * GPIO Registers 8433859Sml29623 */ 8443859Sml29623 8453859Sml29623 #define GPIO_EN_REG (FZC_PIO + 0x00028) 8463859Sml29623 #define GPIO_EN_ENABLE_MASK 0x000000000000FFFFULL 8473859Sml29623 #define GPIO_EN_ENABLE_SHIFT 0 8483859Sml29623 typedef union _gpio_en_t { 8493859Sml29623 uint64_t value; 8503859Sml29623 struct { 8513859Sml29623 #if defined(_BIG_ENDIAN) 8523859Sml29623 uint32_t hdw; 8533859Sml29623 #endif 8543859Sml29623 struct { 8553859Sml29623 #if defined(_BIT_FIELDS_HTOL) 8563859Sml29623 uint32_t res:16; 8573859Sml29623 uint32_t enable:16; 8583859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 8593859Sml29623 uint32_t enable:16; 8603859Sml29623 uint32_t res:16; 8613859Sml29623 #endif 8623859Sml29623 } ldw; 8633859Sml29623 #if !defined(_BIG_ENDIAN) 8643859Sml29623 uint32_t hdw; 8653859Sml29623 #endif 8663859Sml29623 } bits; 8673859Sml29623 } gpio_en_t, *p_gpio_en_t; 8683859Sml29623 8693859Sml29623 #define GPIO_DATA_IN_REG (FZC_PIO + 0x00030) 8703859Sml29623 #define GPIO_DATA_IN_MASK 0x000000000000FFFFULL 8713859Sml29623 #define GPIO_DATA_IN_SHIFT 0 8723859Sml29623 typedef union _gpio_data_in_t { 8733859Sml29623 uint64_t value; 8743859Sml29623 struct { 8753859Sml29623 #if defined(_BIG_ENDIAN) 8763859Sml29623 uint32_t hdw; 8773859Sml29623 #endif 8783859Sml29623 struct { 8793859Sml29623 #if defined(_BIT_FIELDS_HTOL) 8803859Sml29623 uint32_t res:16; 8813859Sml29623 uint32_t data_in:16; 8823859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 8833859Sml29623 uint32_t data_in:16; 8843859Sml29623 uint32_t res:16; 8853859Sml29623 #endif 8863859Sml29623 } ldw; 8873859Sml29623 #if !defined(_BIG_ENDIAN) 8883859Sml29623 uint32_t hdw; 8893859Sml29623 #endif 8903859Sml29623 } bits; 8913859Sml29623 } gpio_data_in_t, *p_gpio_data_in_t; 8923859Sml29623 8933859Sml29623 8943859Sml29623 /* 8953859Sml29623 * PCI Express Interface Module (PIM) registers 8963859Sml29623 */ 8973859Sml29623 #define PIM_CONTROL_REG (FZC_PIM + 0x0) 8983859Sml29623 #define PIM_CONTROL_DBG_SEL_MASK 0x000000000000000FULL 8993859Sml29623 #define PIM_CONTROL_DBG_SEL_SHIFT 0 9003859Sml29623 typedef union _pim_ctl_t { 9013859Sml29623 uint64_t value; 9023859Sml29623 struct { 9033859Sml29623 #if defined(_BIG_ENDIAN) 9043859Sml29623 uint32_t hdw; 9053859Sml29623 #endif 9063859Sml29623 struct { 9073859Sml29623 #if defined(_BIT_FIELDS_HTOL) 9083859Sml29623 uint32_t res:28; 9093859Sml29623 uint32_t dbg_sel:4; 9103859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 9113859Sml29623 uint32_t dbg_sel:4; 9123859Sml29623 uint32_t res:28; 9133859Sml29623 #endif 9143859Sml29623 } ldw; 9153859Sml29623 #if !defined(_BIG_ENDIAN) 9163859Sml29623 uint32_t hdw; 9173859Sml29623 #endif 9183859Sml29623 } bits; 9193859Sml29623 } pim_ctl_t, *p_pim_ctl_t; 9203859Sml29623 9213859Sml29623 #define PIM_DBG_TRAINING_VEC_REG (FZC_PIM + 0x00008) 9223859Sml29623 #define PIM_DBG_TRAINING_VEC_MASK 0x00000000FFFFFFFFULL 9233859Sml29623 9243859Sml29623 #define PIM_INTR_STATUS_REG (FZC_PIM + 0x00010) 9253859Sml29623 #define PIM_INTR_STATUS_MASK 0x00000000FFFFFFFFULL 9263859Sml29623 9273859Sml29623 #define PIM_INTERNAL_STATUS_REG (FZC_PIM + 0x00018) 9283859Sml29623 #define PIM_INTERNAL_STATUS_MASK 0x00000000FFFFFFFFULL 9293859Sml29623 9303859Sml29623 #define PIM_INTR_MASK_REG (FZC_PIM + 0x00020) 9313859Sml29623 #define PIM_INTR_MASK_MASK 0x00000000FFFFFFFFULL 9323859Sml29623 9333859Sml29623 /* 9343859Sml29623 * Partitioning Logical pages Definition registers. 9353859Sml29623 * (used by both receive and transmit DMA channels) 9363859Sml29623 */ 9373859Sml29623 9383859Sml29623 /* Logical page definitions */ 9393859Sml29623 typedef union _log_page_vld_t { 9403859Sml29623 uint64_t value; 9413859Sml29623 struct { 9423859Sml29623 #if defined(_BIG_ENDIAN) 9433859Sml29623 uint32_t hdw; 9443859Sml29623 #endif 9453859Sml29623 struct { 9463859Sml29623 #if defined(_BIT_FIELDS_HTOL) 9473859Sml29623 uint32_t res1_1:28; 9483859Sml29623 uint32_t func:2; 9493859Sml29623 uint32_t page1:1; 9503859Sml29623 uint32_t page0:1; 9513859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 9523859Sml29623 uint32_t page0:1; 9533859Sml29623 uint32_t page1:1; 9543859Sml29623 uint32_t func:2; 9553859Sml29623 uint32_t res1_1:28; 9563859Sml29623 #endif 9573859Sml29623 } ldw; 9583859Sml29623 #if !defined(_BIG_ENDIAN) 9593859Sml29623 uint32_t hdw; 9603859Sml29623 #endif 9613859Sml29623 } bits; 9623859Sml29623 } log_page_vld_t, *p_log_page_vld_t; 9633859Sml29623 9643859Sml29623 9653859Sml29623 #define DMA_LOG_PAGE_MASK_SHIFT 0 9663859Sml29623 #define DMA_LOG_PAGE_MASK_MASK 0x00000000ffffffffULL 9673859Sml29623 9683859Sml29623 /* Receive Logical Page Mask */ 9693859Sml29623 typedef union _log_page_mask_t { 9703859Sml29623 uint64_t value; 9713859Sml29623 struct { 9723859Sml29623 #if defined(_BIG_ENDIAN) 9733859Sml29623 uint32_t hdw; 9743859Sml29623 #endif 9753859Sml29623 struct { 9763859Sml29623 #if defined(_BIT_FIELDS_HTOL) 9773859Sml29623 uint32_t mask:32; 9783859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 9793859Sml29623 uint32_t mask:32; 9803859Sml29623 #endif 9813859Sml29623 } ldw; 9823859Sml29623 #if !defined(_BIG_ENDIAN) 9833859Sml29623 uint32_t hdw; 9843859Sml29623 #endif 9853859Sml29623 } bits; 9863859Sml29623 } log_page_mask_t, *p_log_page_mask_t; 9873859Sml29623 9883859Sml29623 9893859Sml29623 /* Receive Logical Page Value */ 9903859Sml29623 #define DMA_LOG_PAGE_VALUE_SHIFT 0 9913859Sml29623 #define DMA_LOG_PAGE_VALUE_MASK 0x00000000ffffffffULL 9923859Sml29623 9933859Sml29623 /* Receive Logical Page Value */ 9943859Sml29623 typedef union _log_page_value_t { 9953859Sml29623 uint64_t value; 9963859Sml29623 struct { 9973859Sml29623 #if defined(_BIG_ENDIAN) 9983859Sml29623 uint32_t hdw; 9993859Sml29623 #endif 10003859Sml29623 struct { 10013859Sml29623 #if defined(_BIT_FIELDS_HTOL) 10023859Sml29623 uint32_t value:32; 10033859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 10043859Sml29623 uint32_t value:32; 10053859Sml29623 #endif 10063859Sml29623 } ldw; 10073859Sml29623 #if !defined(_BIG_ENDIAN) 10083859Sml29623 uint32_t hdw; 10093859Sml29623 #endif 10103859Sml29623 } bits; 10113859Sml29623 } log_page_value_t, *p_log_page_value_t; 10123859Sml29623 10133859Sml29623 /* Receive Logical Page Relocation */ 10143859Sml29623 #define DMA_LOG_PAGE_RELO_SHIFT 0 /* bits 31:0 */ 10153859Sml29623 #define DMA_LOG_PAGE_RELO_MASK 0x00000000ffffffffULL 10163859Sml29623 10173859Sml29623 /* Receive Logical Page Relocation */ 10183859Sml29623 typedef union _log_page_relo_t { 10193859Sml29623 uint64_t value; 10203859Sml29623 struct { 10213859Sml29623 #if defined(_BIG_ENDIAN) 10223859Sml29623 uint32_t hdw; 10233859Sml29623 #endif 10243859Sml29623 struct { 10253859Sml29623 #if defined(_BIT_FIELDS_HTOL) 10263859Sml29623 uint32_t relo:32; 10273859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 10283859Sml29623 uint32_t relo:32; 10293859Sml29623 #endif 10303859Sml29623 } ldw; 10313859Sml29623 #if !defined(_BIG_ENDIAN) 10323859Sml29623 uint32_t hdw; 10333859Sml29623 #endif 10343859Sml29623 } bits; 10353859Sml29623 } log_page_relo_t, *p_log_page_relo_t; 10363859Sml29623 10373859Sml29623 10383859Sml29623 /* Receive Logical Page Handle */ 10393859Sml29623 #define DMA_LOG_PAGE_HANDLE_SHIFT 0 /* bits 19:0 */ 10403859Sml29623 #define DMA_LOG_PAGE_HANDLE_MASK 0x00000000ffffffffULL 10413859Sml29623 10423859Sml29623 /* Receive Logical Page Handle */ 10433859Sml29623 typedef union _log_page_hdl_t { 10443859Sml29623 uint64_t value; 10453859Sml29623 struct { 10463859Sml29623 #if defined(_BIG_ENDIAN) 10473859Sml29623 uint32_t hdw; 10483859Sml29623 #endif 10493859Sml29623 struct { 10503859Sml29623 #if defined(_BIT_FIELDS_HTOL) 10513859Sml29623 uint32_t res1_1:12; 10523859Sml29623 uint32_t handle:20; 10533859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 10543859Sml29623 uint32_t handle:20; 10553859Sml29623 uint32_t res1_1:12; 10563859Sml29623 #endif 10573859Sml29623 } ldw; 10583859Sml29623 #if !defined(_BIG_ENDIAN) 10593859Sml29623 uint32_t hdw; 10603859Sml29623 #endif 10613859Sml29623 } bits; 10623859Sml29623 } log_page_hdl_t, *p_log_page_hdl_t; 10633859Sml29623 10643859Sml29623 #ifdef __cplusplus 10653859Sml29623 } 10663859Sml29623 #endif 10673859Sml29623 10683859Sml29623 #endif /* _SYS_NXGE_NXGE_HW_H */ 1069