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_TXC_HW_H 273859Sml29623 #define _SYS_NXGE_NXGE_TXC_HW_H 283859Sml29623 293859Sml29623 #pragma ident "%Z%%M% %I% %E% SMI" 303859Sml29623 313859Sml29623 #ifdef __cplusplus 323859Sml29623 extern "C" { 333859Sml29623 #endif 343859Sml29623 353859Sml29623 #include <nxge_defs.h> 363859Sml29623 373859Sml29623 /* Transmit Ring Scheduler Registers */ 383859Sml29623 #define TXC_PORT_DMA_ENABLE_REG (FZC_TXC + 0x20028) 393859Sml29623 #define TXC_PORT_DMA_LIST 0 /* RW bit 23:0 */ 403859Sml29623 #define TXC_DMA_DMA_LIST_MASK 0x0000000000FFFFFFULL 413859Sml29623 #define TXC_DMA_DMA_LIST_MASK_N2 0x000000000000FFFFULL 423859Sml29623 433859Sml29623 typedef union _txc_port_enable_t { 443859Sml29623 uint64_t value; 453859Sml29623 struct { 463859Sml29623 #ifdef _BIG_ENDIAN 473859Sml29623 uint32_t hdw; 483859Sml29623 #endif 493859Sml29623 struct { 503859Sml29623 #if defined(_BIT_FIELDS_HTOL) 513859Sml29623 uint32_t res:8; 523859Sml29623 uint32_t port_dma_list:24; 533859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 543859Sml29623 uint32_t port_dma_list:24; 553859Sml29623 uint32_t res:8; 563859Sml29623 #endif 573859Sml29623 } ldw; 583859Sml29623 #ifndef _BIG_ENDIAN 593859Sml29623 uint32_t hdw; 603859Sml29623 #endif 613859Sml29623 } bits; 623859Sml29623 } txc_port_enable_t, *p_txc_port_enable_t; 633859Sml29623 643859Sml29623 typedef union _txc_port_enable_n2_t { 653859Sml29623 uint64_t value; 663859Sml29623 struct { 673859Sml29623 #ifdef _BIG_ENDIAN 683859Sml29623 uint32_t hdw; 693859Sml29623 #endif 703859Sml29623 struct { 713859Sml29623 #if defined(_BIT_FIELDS_HTOL) 723859Sml29623 uint32_t res:16; 733859Sml29623 uint32_t port_dma_list:16; 743859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 753859Sml29623 uint32_t port_dma_list:16; 763859Sml29623 uint32_t res:16; 773859Sml29623 #endif 783859Sml29623 } ldw; 793859Sml29623 #ifndef _BIG_ENDIAN 803859Sml29623 uint32_t hdw; 813859Sml29623 #endif 823859Sml29623 } bits; 833859Sml29623 } txc_port_enable_n2_t, *p_txc_port_enable_n2_t; 843859Sml29623 853859Sml29623 /* Transmit Controller - Registers */ 863859Sml29623 #define TXC_FZC_OFFSET 0x1000 873859Sml29623 #define TXC_FZC_PORT_OFFSET(port) (port * TXC_FZC_OFFSET) 883859Sml29623 #define TXC_FZC_CHANNEL_OFFSET(channel) (channel * TXC_FZC_OFFSET) 893859Sml29623 #define TXC_FZC_REG_CN_OFFSET(x, cn) (x + TXC_FZC_CHANNEL_OFFSET(cn)) 903859Sml29623 913859Sml29623 #define TXC_FZC_CONTROL_OFFSET 0x100 923859Sml29623 #define TXC_FZC_CNTL_PORT_OFFSET(port) (port * TXC_FZC_CONTROL_OFFSET) 933859Sml29623 #define TXC_FZC_REG_PT_OFFSET(x, pt) (x + TXC_FZC_CNTL_PORT_OFFSET(pt)) 943859Sml29623 953859Sml29623 #define TXC_DMA_MAX_BURST_REG (FZC_TXC + 0x00000) 963859Sml29623 #define TXC_DMA_MAX_BURST_SHIFT 0 /* RW bit 19:0 */ 973859Sml29623 #define TXC_DMA_MAX_BURST_MASK 0x00000000000FFFFFULL 983859Sml29623 993859Sml29623 #define TXC_MAX_BURST_OFFSET(channel) (TXC_DMA_MAX_BURST_REG + \ 1003859Sml29623 (channel * TXC_FZC_OFFSET)) 1013859Sml29623 1023859Sml29623 typedef union _txc_dma_max_burst_t { 1033859Sml29623 uint64_t value; 1043859Sml29623 struct { 1053859Sml29623 #ifdef _BIG_ENDIAN 1063859Sml29623 uint32_t hdw; 1073859Sml29623 #endif 1083859Sml29623 struct { 1093859Sml29623 #if defined(_BIT_FIELDS_HTOL) 1103859Sml29623 uint32_t res:12; 1113859Sml29623 uint32_t dma_max_burst:20; 1123859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 1133859Sml29623 uint32_t dma_max_burst:20; 1143859Sml29623 uint32_t res:12; 1153859Sml29623 1163859Sml29623 #endif 1173859Sml29623 } ldw; 1183859Sml29623 #ifndef _BIG_ENDIAN 1193859Sml29623 uint32_t hdw; 1203859Sml29623 #endif 1213859Sml29623 } bits; 1223859Sml29623 } txc_dma_max_burst_t, *p_txc_dma_max_burst_t; 1233859Sml29623 1243859Sml29623 /* DRR Performance Monitoring Register */ 1253859Sml29623 #define TXC_DMA_MAX_LENGTH_REG (FZC_TXC + 0x00008) 1263859Sml29623 #define TXC_DMA_MAX_LENGTH_SHIFT /* RW bit 27:0 */ 1273859Sml29623 #define TXC_DMA_MAX_LENGTH_MASK 0x000000000FFFFFFFULL 1283859Sml29623 1293859Sml29623 #define TXC_DMA_MAX_LEN_OFFSET(channel) (TXC_DMA_MAX_LENGTH_REG + \ 1303859Sml29623 (channel * TXC_FZC_OFFSET)) 1313859Sml29623 1323859Sml29623 typedef union _txc_dma_max_length_t { 1333859Sml29623 uint64_t value; 1343859Sml29623 struct { 1353859Sml29623 #ifdef _BIG_ENDIAN 1363859Sml29623 uint32_t hdw; 1373859Sml29623 #endif 1383859Sml29623 struct { 1393859Sml29623 #if defined(_BIT_FIELDS_HTOL) 1403859Sml29623 uint32_t res:4; 1413859Sml29623 uint32_t dma_length:28; 1423859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 1433859Sml29623 uint32_t dma_length:28; 1443859Sml29623 uint32_t res:4; 1453859Sml29623 1463859Sml29623 #endif 1473859Sml29623 } ldw; 1483859Sml29623 #ifndef _BIG_ENDIAN 1493859Sml29623 uint32_t hdw; 1503859Sml29623 #endif 1513859Sml29623 } bits; 1523859Sml29623 } txc_dma_max_length_t, *p_txc_dma_max_length_t; 1533859Sml29623 1543859Sml29623 1553859Sml29623 #define TXC_CONTROL_REG (FZC_TXC + 0x20000) 1563859Sml29623 #define TXC_DMA_LENGTH_SHIFT 0 /* RW bit 27:0 */ 1573859Sml29623 #define TXC_DMA_LENGTH_MASK 0x000000000FFFFFFFULL 1583859Sml29623 1593859Sml29623 typedef union _txc_control_t { 1603859Sml29623 uint64_t value; 1613859Sml29623 struct { 1623859Sml29623 #ifdef _BIG_ENDIAN 1633859Sml29623 uint32_t hdw; 1643859Sml29623 #endif 1653859Sml29623 struct { 1663859Sml29623 #if defined(_BIT_FIELDS_HTOL) 1673859Sml29623 uint32_t res:27; 1683859Sml29623 uint32_t txc_enabled:1; 1693859Sml29623 uint32_t port3_enabled:1; 1703859Sml29623 uint32_t port2_enabled:1; 1713859Sml29623 uint32_t port1_enabled:1; 1723859Sml29623 uint32_t port0_enabled:1; 1733859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 1743859Sml29623 uint32_t port0_enabled:1; 1753859Sml29623 uint32_t port1_enabled:1; 1763859Sml29623 uint32_t port2_enabled:1; 1773859Sml29623 uint32_t port3_enabled:1; 1783859Sml29623 uint32_t txc_enabled:1; 1793859Sml29623 uint32_t res:27; 1803859Sml29623 1813859Sml29623 #endif 1823859Sml29623 } ldw; 1833859Sml29623 #ifndef _BIG_ENDIAN 1843859Sml29623 uint32_t hdw; 1853859Sml29623 #endif 1863859Sml29623 } bits; 1873859Sml29623 } txc_control_t, *p_txc_control_t; 1883859Sml29623 1893859Sml29623 typedef union _txc_control_n2_t { 1903859Sml29623 uint64_t value; 1913859Sml29623 struct { 1923859Sml29623 #ifdef _BIG_ENDIAN 1933859Sml29623 uint32_t hdw; 1943859Sml29623 #endif 1953859Sml29623 struct { 1963859Sml29623 #if defined(_BIT_FIELDS_HTOL) 1973859Sml29623 uint32_t res:27; 1983859Sml29623 uint32_t txc_enabled:1; 1993859Sml29623 uint32_t res1:2; 2003859Sml29623 uint32_t port1_enabled:1; 2013859Sml29623 uint32_t port0_enabled:1; 2023859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 2033859Sml29623 uint32_t port0_enabled:1; 2043859Sml29623 uint32_t port1_enabled:1; 2053859Sml29623 uint32_t res1:2; 2063859Sml29623 uint32_t txc_enabled:1; 2073859Sml29623 uint32_t res:27; 2083859Sml29623 2093859Sml29623 #endif 2103859Sml29623 } ldw; 2113859Sml29623 #ifndef _BIG_ENDIAN 2123859Sml29623 uint32_t hdw; 2133859Sml29623 #endif 2143859Sml29623 } bits; 2153859Sml29623 } txc_control_n2_t, *p_txc_control_n2_t; 2163859Sml29623 2173859Sml29623 2183859Sml29623 #define TXC_TRAINING_REG (FZC_TXC + 0x20008) 2193859Sml29623 #define TXC_TRAINING_VECTOR 0 /* RW bit 32:0 */ 2203859Sml29623 #define TXC_TRAINING_VECTOR_MASK 0x00000000FFFFFFFFULL 2213859Sml29623 2223859Sml29623 typedef union _txc_training_t { 2233859Sml29623 uint64_t value; 2243859Sml29623 struct { 2253859Sml29623 #ifdef _BIG_ENDIAN 2263859Sml29623 uint32_t hdw; 2273859Sml29623 #endif 2283859Sml29623 struct { 2293859Sml29623 #if defined(_BIT_FIELDS_HTOL) 2303859Sml29623 uint32_t txc_training_vector:32; 2313859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 2323859Sml29623 uint32_t txc_training_vector:32; 2333859Sml29623 2343859Sml29623 #endif 2353859Sml29623 } ldw; 2363859Sml29623 #ifndef _BIG_ENDIAN 2373859Sml29623 uint32_t hdw; 2383859Sml29623 #endif 2393859Sml29623 } bits; 2403859Sml29623 } txc_training_t, *p_txc_training_t; 2413859Sml29623 2423859Sml29623 2433859Sml29623 #define TXC_DEBUG_SELECT_REG (FZC_TXC + 0x20010) 2443859Sml29623 #define TXC_DEBUG_SELECT_SHIFT 0 /* WO bit 5:0 */ 2453859Sml29623 #define TXC_DEBUG_SELECT_MASK 0x000000000000003FULL 2463859Sml29623 2473859Sml29623 typedef union _txc_debug_select_t { 2483859Sml29623 uint64_t value; 2493859Sml29623 struct { 2503859Sml29623 #ifdef _BIG_ENDIAN 2513859Sml29623 uint32_t hdw; 2523859Sml29623 #endif 2533859Sml29623 struct { 2543859Sml29623 #if defined(_BIT_FIELDS_HTOL) 2553859Sml29623 uint32_t res:26; 2563859Sml29623 uint32_t debug_select:6; 2573859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 2583859Sml29623 uint32_t debug_select:6; 2593859Sml29623 uint32_t res:26; 2603859Sml29623 2613859Sml29623 #endif 2623859Sml29623 } ldw; 2633859Sml29623 #ifndef _BIG_ENDIAN 2643859Sml29623 uint32_t hdw; 2653859Sml29623 #endif 2663859Sml29623 } bits; 2673859Sml29623 } txc_debug_select_t, *p_txc_debug_select_t; 2683859Sml29623 2693859Sml29623 2703859Sml29623 #define TXC_MAX_REORDER_REG (FZC_TXC + 0x20018) 2713859Sml29623 #define TXC_MAX_REORDER_MASK_2 (0xf) 2723859Sml29623 #define TXC_MAX_REORDER_MASK_4 (0x7) 2733859Sml29623 #define TXC_MAX_REORDER_SHIFT_BITS 8 2743859Sml29623 #define TXC_MAX_REORDER_SHIFT(port) (port * (TXC_MAX_REORDER_SHIFT_BITS)) 2753859Sml29623 2763859Sml29623 typedef union _txc_max_reorder_t { 2773859Sml29623 uint64_t value; 2783859Sml29623 struct { 2793859Sml29623 #ifdef _BIG_ENDIAN 2803859Sml29623 uint32_t hdw; 2813859Sml29623 #endif 2823859Sml29623 struct { 2833859Sml29623 #if defined(_BIT_FIELDS_HTOL) 2843859Sml29623 uint32_t resv3:4; 2853859Sml29623 uint32_t port3:4; 2863859Sml29623 uint32_t resv2:4; 2873859Sml29623 uint32_t port2:4; 2883859Sml29623 uint32_t resv1:4; 2893859Sml29623 uint32_t port1:4; 2903859Sml29623 uint32_t resv0:4; 2913859Sml29623 uint32_t port0:4; 2923859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 2933859Sml29623 uint32_t port0:4; 2943859Sml29623 uint32_t resv0:4; 2953859Sml29623 uint32_t port1:4; 2963859Sml29623 uint32_t resv1:4; 2973859Sml29623 uint32_t port2:4; 2983859Sml29623 uint32_t resv2:4; 2993859Sml29623 uint32_t port3:4; 3003859Sml29623 uint32_t resv3:4; 3013859Sml29623 #endif 3023859Sml29623 } ldw; 3033859Sml29623 #ifndef _BIG_ENDIAN 3043859Sml29623 uint32_t hdw; 3053859Sml29623 #endif 3063859Sml29623 } bits; 3073859Sml29623 } txc_max_reorder_t, *p_txc_max_reorder_t; 3083859Sml29623 3093859Sml29623 3103859Sml29623 #define TXC_PORT_CTL_REG (FZC_TXC + 0x20020) /* RO */ 3113859Sml29623 #define TXC_PORT_CTL_OFFSET(port) (TXC_PORT_CTL_REG + \ 3123859Sml29623 (port * TXC_FZC_CONTROL_OFFSET)) 3133859Sml29623 #define TXC_PORT_CNTL_CLEAR 0x1 3143859Sml29623 3153859Sml29623 typedef union _txc_port_ctl_t { 3163859Sml29623 uint64_t value; 3173859Sml29623 struct { 3183859Sml29623 #ifdef _BIG_ENDIAN 3193859Sml29623 uint32_t hdw; 3203859Sml29623 #endif 3213859Sml29623 struct { 3223859Sml29623 #if defined(_BIT_FIELDS_HTOL) 3233859Sml29623 uint32_t rsvd:31; 3243859Sml29623 uint32_t clr_all_stat:1; 3253859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 3263859Sml29623 uint32_t clr_all_stat:1; 3273859Sml29623 uint32_t rsvd:31; 3283859Sml29623 #endif 3293859Sml29623 } ldw; 3303859Sml29623 #ifndef _BIG_ENDIAN 3313859Sml29623 uint32_t hdw; 3323859Sml29623 #endif 3333859Sml29623 } bits; 3343859Sml29623 } txc_port_ctl_t, *p_txc_port_ctl_t; 3353859Sml29623 3363859Sml29623 #define TXC_PKT_STUFFED_REG (FZC_TXC + 0x20030) 3373859Sml29623 #define TXC_PKT_STUFF_PKTASY_SHIFT 16 /* RW bit 16:0 */ 3383859Sml29623 #define TXC_PKT_STUFF_PKTASY_MASK 0x000000000000FFFFULL 3393859Sml29623 #define TXC_PKT_STUFF_REORDER_SHIFT 0 /* RW bit 31:16 */ 3403859Sml29623 #define TXC_PKT_STUFF_REORDER_MASK 0x00000000FFFF0000ULL 3413859Sml29623 3423859Sml29623 typedef union _txc_pkt_stuffed_t { 3433859Sml29623 uint64_t value; 3443859Sml29623 struct { 3453859Sml29623 #ifdef _BIG_ENDIAN 3463859Sml29623 uint32_t hdw; 3473859Sml29623 #endif 3483859Sml29623 struct { 3493859Sml29623 #if defined(_BIT_FIELDS_HTOL) 3503859Sml29623 uint32_t pkt_pro_reorder:16; 3513859Sml29623 uint32_t pkt_proc_pktasy:16; 3523859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 3533859Sml29623 uint32_t pkt_proc_pktasy:16; 3543859Sml29623 uint32_t pkt_pro_reorder:16; 3553859Sml29623 #endif 3563859Sml29623 } ldw; 3573859Sml29623 #ifndef _BIG_ENDIAN 3583859Sml29623 uint32_t hdw; 3593859Sml29623 #endif 3603859Sml29623 } bits; 3613859Sml29623 } txc_pkt_stuffed_t, *p_txc_pkt_stuffed_t; 3623859Sml29623 3633859Sml29623 3643859Sml29623 #define TXC_PKT_XMIT_REG (FZC_TXC + 0x20038) 3653859Sml29623 #define TXC_PKTS_XMIT_SHIFT 0 /* RW bit 15:0 */ 3663859Sml29623 #define TXC_PKTS_XMIT_MASK 0x000000000000FFFFULL 3673859Sml29623 #define TXC_BYTES_XMIT_SHIFT 16 /* RW bit 31:16 */ 3683859Sml29623 #define TXC_BYTES_XMIT_MASK 0x00000000FFFF0000ULL 3693859Sml29623 3703859Sml29623 typedef union _txc_pkt_xmit_t { 3713859Sml29623 uint64_t value; 3723859Sml29623 struct { 3733859Sml29623 #ifdef _BIG_ENDIAN 3743859Sml29623 uint32_t hdw; 3753859Sml29623 #endif 3763859Sml29623 struct { 3773859Sml29623 #if defined(_BIT_FIELDS_HTOL) 3783859Sml29623 uint32_t bytes_transmitted:16; 3793859Sml29623 uint32_t pkts_transmitted:16; 3803859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 3813859Sml29623 uint32_t pkts_transmitted:16; 3823859Sml29623 uint32_t bytes_transmitted:16; 3833859Sml29623 #endif 3843859Sml29623 } ldw; 3853859Sml29623 #ifndef _BIG_ENDIAN 3863859Sml29623 uint32_t hdw; 3873859Sml29623 #endif 3883859Sml29623 } bits; 3893859Sml29623 } txc_pkt_xmit, *p_txc_pkt_xmit; 3903859Sml29623 3913859Sml29623 3923859Sml29623 /* count 4 step 0x00100 */ 3933859Sml29623 #define TXC_ROECC_CTL_REG (FZC_TXC + 0x20040) 3943859Sml29623 #define TXC_ROECC_CTL_OFFSET(port) (TXC_ROECC_CTL_REG + \ 3953859Sml29623 (TXC_FZC_CNTL_PORT_OFFSET(port))) 3963859Sml29623 3973859Sml29623 typedef union _txc_roecc_ctl_t { 3983859Sml29623 uint64_t value; 3993859Sml29623 struct { 4003859Sml29623 #ifdef _BIG_ENDIAN 4013859Sml29623 uint32_t hdw; 4023859Sml29623 #endif 4033859Sml29623 struct { 4043859Sml29623 #if defined(_BIT_FIELDS_HTOL) 4053859Sml29623 uint32_t disable_ue_error:1; 4063859Sml29623 uint32_t rsvd:13; 4073859Sml29623 uint32_t double_bit_err:1; 4083859Sml29623 uint32_t single_bit_err:1; 4093859Sml29623 uint32_t rsvd_2:5; 4103859Sml29623 uint32_t all_pkts:1; 4113859Sml29623 uint32_t alternate_pkts:1; 4123859Sml29623 uint32_t one_pkt:1; 4133859Sml29623 uint32_t rsvd_3:5; 4143859Sml29623 uint32_t last_line_pkt:1; 4153859Sml29623 uint32_t second_line_pkt:1; 4163859Sml29623 uint32_t firstd_line_pkt:1; 4173859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 4183859Sml29623 uint32_t firstd_line_pkt:1; 4193859Sml29623 uint32_t second_line_pkt:1; 4203859Sml29623 uint32_t last_line_pkt:1; 4213859Sml29623 uint32_t rsvd_3:5; 4223859Sml29623 uint32_t one_pkt:1; 4233859Sml29623 uint32_t alternate_pkts:1; 4243859Sml29623 uint32_t all_pkts:1; 4253859Sml29623 uint32_t rsvd_2:5; 4263859Sml29623 uint32_t single_bit_err:1; 4273859Sml29623 uint32_t double_bit_err:1; 4283859Sml29623 uint32_t rsvd:13; 4293859Sml29623 uint32_t disable_ue_error:1; 4303859Sml29623 #endif 4313859Sml29623 } ldw; 4323859Sml29623 #ifndef _BIG_ENDIAN 4333859Sml29623 uint32_t hdw; 4343859Sml29623 #endif 4353859Sml29623 } bits; 4363859Sml29623 } txc_roecc_ctl_t, *p_txc_roecc_ctl_t; 4373859Sml29623 4383859Sml29623 4393859Sml29623 #define TXC_ROECC_ST_REG (FZC_TXC + 0x20048) 4403859Sml29623 4413859Sml29623 #define TXC_ROECC_ST_OFFSET(port) (TXC_ROECC_ST_REG + \ 4423859Sml29623 (TXC_FZC_CNTL_PORT_OFFSET(port))) 4433859Sml29623 4443859Sml29623 typedef union _txc_roecc_st_t { 4453859Sml29623 uint64_t value; 4463859Sml29623 struct { 4473859Sml29623 #ifdef _BIG_ENDIAN 4483859Sml29623 uint32_t hdw; 4493859Sml29623 #endif 4503859Sml29623 struct { 4513859Sml29623 #if defined(_BIT_FIELDS_HTOL) 4523859Sml29623 uint32_t clr_st:1; 4533859Sml29623 uint32_t res:13; 4543859Sml29623 uint32_t correct_error:1; 4553859Sml29623 uint32_t uncorrect_error:1; 4563859Sml29623 uint32_t rsvd:6; 4573859Sml29623 uint32_t ecc_address:10; 4583859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 4593859Sml29623 uint32_t ecc_address:10; 4603859Sml29623 uint32_t rsvd:6; 4613859Sml29623 uint32_t uncorrect_error:1; 4623859Sml29623 uint32_t correct_error:1; 4633859Sml29623 uint32_t res:13; 4643859Sml29623 uint32_t clr_st:1; 4653859Sml29623 #endif 4663859Sml29623 } ldw; 4673859Sml29623 #ifndef _BIG_ENDIAN 4683859Sml29623 uint32_t hdw; 4693859Sml29623 #endif 4703859Sml29623 } bits; 4713859Sml29623 } txc_roecc_st_t, *p_txc_roecc_st_t; 4723859Sml29623 4733859Sml29623 4743859Sml29623 #define TXC_RO_DATA0_REG (FZC_TXC + 0x20050) 4753859Sml29623 #define TXC_RO_DATA0_OFFSET(port) (TXC_RO_DATA0_REG + \ 4763859Sml29623 (TXC_FZC_CNTL_PORT_OFFSET(port))) 4773859Sml29623 4783859Sml29623 typedef union _txc_ro_data0_t { 4793859Sml29623 uint64_t value; 4803859Sml29623 struct { 4813859Sml29623 #ifdef _BIG_ENDIAN 4823859Sml29623 uint32_t hdw; 4833859Sml29623 #endif 4843859Sml29623 struct { 4853859Sml29623 #if defined(_BIT_FIELDS_HTOL) 4863859Sml29623 uint32_t ro_ecc_data0:32; /* ro_ecc_data[31:0] */ 4873859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 4883859Sml29623 uint32_t ro_ecc_data0:32; /* ro_ecc_data[31:0] */ 4893859Sml29623 #endif 4903859Sml29623 } ldw; 4913859Sml29623 #ifndef _BIG_ENDIAN 4923859Sml29623 uint32_t hdw; 4933859Sml29623 #endif 4943859Sml29623 } bits; 4953859Sml29623 } txc_ro_data0_t, *p_txc_ro_data0_t; 4963859Sml29623 4973859Sml29623 #define TXC_RO_DATA1_REG (FZC_TXC + 0x20058) 4983859Sml29623 #define TXC_RO_DATA1_OFFSET(port) (TXC_RO_DATA1_REG + \ 4993859Sml29623 (TXC_FZC_CNTL_PORT_OFFSET(port))) 5003859Sml29623 5013859Sml29623 typedef union _txc_ro_data1_t { 5023859Sml29623 uint64_t value; 5033859Sml29623 struct { 5043859Sml29623 #ifdef _BIG_ENDIAN 5053859Sml29623 uint32_t hdw; 5063859Sml29623 #endif 5073859Sml29623 struct { 5083859Sml29623 #if defined(_BIT_FIELDS_HTOL) 5093859Sml29623 uint32_t ro_ecc_data1:32; /* ro_ecc_data[63:32] */ 5103859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 5113859Sml29623 uint32_t ro_ecc_data1:32; /* ro_ecc_data[31:32] */ 5123859Sml29623 #endif 5133859Sml29623 } ldw; 5143859Sml29623 #ifndef _BIG_ENDIAN 5153859Sml29623 uint32_t hdw; 5163859Sml29623 #endif 5173859Sml29623 } bits; 5183859Sml29623 } txc_ro_data1_t, *p_txc_ro_data1_t; 5193859Sml29623 5203859Sml29623 5213859Sml29623 #define TXC_RO_DATA2_REG (FZC_TXC + 0x20060) 5223859Sml29623 5233859Sml29623 #define TXC_RO_DATA2_OFFSET(port) (TXC_RO_DATA2_REG + \ 5243859Sml29623 (TXC_FZC_CNTL_PORT_OFFSET(port))) 5253859Sml29623 5263859Sml29623 typedef union _txc_ro_data2_t { 5273859Sml29623 uint64_t value; 5283859Sml29623 struct { 5293859Sml29623 #ifdef _BIG_ENDIAN 5303859Sml29623 uint32_t hdw; 5313859Sml29623 #endif 5323859Sml29623 struct { 5333859Sml29623 #if defined(_BIT_FIELDS_HTOL) 5343859Sml29623 uint32_t ro_ecc_data2:32; /* ro_ecc_data[95:64] */ 5353859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 5363859Sml29623 uint32_t ro_ecc_data2:32; /* ro_ecc_data[95:64] */ 5373859Sml29623 #endif 5383859Sml29623 } ldw; 5393859Sml29623 #ifndef _BIG_ENDIAN 5403859Sml29623 uint32_t hdw; 5413859Sml29623 #endif 5423859Sml29623 } bits; 5433859Sml29623 } txc_ro_data2_t, *p_txc_ro_data2_t; 5443859Sml29623 5453859Sml29623 #define TXC_RO_DATA3_REG (FZC_TXC + 0x20068) 5463859Sml29623 #define TXC_RO_DATA3_OFFSET(port) (TXC_RO_DATA3_REG + \ 5473859Sml29623 (TXC_FZC_CNTL_PORT_OFFSET(port))) 5483859Sml29623 5493859Sml29623 typedef union _txc_ro_data3_t { 5503859Sml29623 uint64_t value; 5513859Sml29623 struct { 5523859Sml29623 #ifdef _BIG_ENDIAN 5533859Sml29623 uint32_t hdw; 5543859Sml29623 #endif 5553859Sml29623 struct { 5563859Sml29623 #if defined(_BIT_FIELDS_HTOL) 5573859Sml29623 uint32_t ro_ecc_data3:32; /* ro_ecc_data[127:96] */ 5583859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 5593859Sml29623 uint32_t ro_ecc_data3:32; /* ro_ecc_data[127:96] */ 5603859Sml29623 #endif 5613859Sml29623 } ldw; 5623859Sml29623 #ifndef _BIG_ENDIAN 5633859Sml29623 uint32_t hdw; 5643859Sml29623 #endif 5653859Sml29623 } bits; 5663859Sml29623 } txc_ro_data3_t, *p_txc_ro_data3_t; 5673859Sml29623 5683859Sml29623 #define TXC_RO_DATA4_REG (FZC_TXC + 0x20070) 5693859Sml29623 #define TXC_RO_DATA4_OFFSET(port) (TXC_RO_DATA4_REG + \ 5703859Sml29623 (TXC_FZC_CNTL_PORT_OFFSET(port))) 5713859Sml29623 5723859Sml29623 typedef union _txc_ro_data4_t { 5733859Sml29623 uint64_t value; 5743859Sml29623 struct { 5753859Sml29623 #ifdef _BIG_ENDIAN 5763859Sml29623 uint32_t hdw; 5773859Sml29623 #endif 5783859Sml29623 struct { 5793859Sml29623 #if defined(_BIT_FIELDS_HTOL) 5803859Sml29623 uint32_t ro_ecc_data4:32; /* ro_ecc_data[151:128] */ 5813859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 5823859Sml29623 uint32_t ro_ecc_data4:32; /* ro_ecc_data[151:128] */ 5833859Sml29623 #endif 5843859Sml29623 } ldw; 5853859Sml29623 #ifndef _BIG_ENDIAN 5863859Sml29623 uint32_t hdw; 5873859Sml29623 #endif 5883859Sml29623 } bits; 5893859Sml29623 } txc_ro_data4_t, *p_txc_ro_data4_t; 5903859Sml29623 5913859Sml29623 /* count 4 step 0x00100 */ 5923859Sml29623 #define TXC_SFECC_CTL_REG (FZC_TXC + 0x20078) 5933859Sml29623 #define TXC_SFECC_CTL_OFFSET(port) (TXC_SFECC_CTL_REG + \ 5943859Sml29623 (TXC_FZC_CNTL_PORT_OFFSET(port))) 5953859Sml29623 5963859Sml29623 typedef union _txc_sfecc_ctl_t { 5973859Sml29623 uint64_t value; 5983859Sml29623 struct { 5993859Sml29623 #ifdef _BIG_ENDIAN 6003859Sml29623 uint32_t hdw; 6013859Sml29623 #endif 6023859Sml29623 struct { 6033859Sml29623 #if defined(_BIT_FIELDS_HTOL) 6043859Sml29623 uint32_t disable_ue_error:1; 6053859Sml29623 uint32_t rsvd:13; 6063859Sml29623 uint32_t double_bit_err:1; 6073859Sml29623 uint32_t single_bit_err:1; 6083859Sml29623 uint32_t rsvd_2:5; 6093859Sml29623 uint32_t all_pkts:1; 6103859Sml29623 uint32_t alternate_pkts:1; 6113859Sml29623 uint32_t one_pkt:1; 6123859Sml29623 uint32_t rsvd_3:5; 6133859Sml29623 uint32_t last_line_pkt:1; 6143859Sml29623 uint32_t second_line_pkt:1; 6153859Sml29623 uint32_t firstd_line_pkt:1; 6163859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 6173859Sml29623 uint32_t firstd_line_pkt:1; 6183859Sml29623 uint32_t second_line_pkt:1; 6193859Sml29623 uint32_t last_line_pkt:1; 6203859Sml29623 uint32_t rsvd_3:5; 6213859Sml29623 uint32_t one_pkt:1; 6223859Sml29623 uint32_t alternate_pkts:1; 6233859Sml29623 uint32_t all_pkts:1; 6243859Sml29623 uint32_t rsvd_2:5; 6253859Sml29623 uint32_t single_bit_err:1; 6263859Sml29623 uint32_t double_bit_err:1; 6273859Sml29623 uint32_t rsvd:13; 6283859Sml29623 uint32_t disable_ue_error:1; 6293859Sml29623 #endif 6303859Sml29623 } ldw; 6313859Sml29623 #ifndef _BIG_ENDIAN 6323859Sml29623 uint32_t hdw; 6333859Sml29623 #endif 6343859Sml29623 } bits; 6353859Sml29623 } txc_sfecc_ctl_t, *p_txc_sfecc_ctl_t; 6363859Sml29623 6373859Sml29623 #define TXC_SFECC_ST_REG (FZC_TXC + 0x20080) 6383859Sml29623 #define TXC_SFECC_ST_OFFSET(port) (TXC_SFECC_ST_REG + \ 6393859Sml29623 (TXC_FZC_CNTL_PORT_OFFSET(port))) 6403859Sml29623 6413859Sml29623 typedef union _txc_sfecc_st_t { 6423859Sml29623 uint64_t value; 6433859Sml29623 struct { 6443859Sml29623 #ifdef _BIG_ENDIAN 6453859Sml29623 uint32_t hdw; 6463859Sml29623 #endif 6473859Sml29623 struct { 6483859Sml29623 #if defined(_BIT_FIELDS_HTOL) 6493859Sml29623 uint32_t clr_st:1; 6503859Sml29623 uint32_t res:13; 6513859Sml29623 uint32_t correct_error:1; 6523859Sml29623 uint32_t uncorrect_error:1; 6533859Sml29623 uint32_t rsvd:6; 6543859Sml29623 uint32_t ecc_address:10; 6553859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 6563859Sml29623 uint32_t ecc_address:10; 6573859Sml29623 uint32_t rsvd:6; 6583859Sml29623 uint32_t uncorrect_error:1; 6593859Sml29623 uint32_t correct_error:1; 6603859Sml29623 uint32_t res:13; 6613859Sml29623 uint32_t clr_st:1; 6623859Sml29623 #endif 6633859Sml29623 } ldw; 6643859Sml29623 #ifndef _BIG_ENDIAN 6653859Sml29623 uint32_t hdw; 6663859Sml29623 #endif 6673859Sml29623 } bits; 6683859Sml29623 } txc_sfecc_st_t, *p_txc_sfecc_st_t; 6693859Sml29623 6703859Sml29623 #define TXC_SF_DATA0_REG (FZC_TXC + 0x20088) 6713859Sml29623 #define TXC_SF_DATA0_OFFSET(port) (TXC_SF_DATA0_REG + \ 6723859Sml29623 (TXC_FZC_CNTL_PORT_OFFSET(port))) 6733859Sml29623 6743859Sml29623 typedef union _txc_sf_data0_t { 6753859Sml29623 uint64_t value; 6763859Sml29623 struct { 6773859Sml29623 #ifdef _BIG_ENDIAN 6783859Sml29623 uint32_t hdw; 6793859Sml29623 #endif 6803859Sml29623 struct { 6813859Sml29623 #if defined(_BIT_FIELDS_HTOL) 6823859Sml29623 uint32_t sf_ecc_data0:32; /* sf_ecc_data[31:0] */ 6833859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 6843859Sml29623 uint32_t sf_ecc_data0:32; /* sf_ecc_data[31:0] */ 6853859Sml29623 #endif 6863859Sml29623 } ldw; 6873859Sml29623 #ifndef _BIG_ENDIAN 6883859Sml29623 uint32_t hdw; 6893859Sml29623 #endif 6903859Sml29623 } bits; 6913859Sml29623 } txc_sf_data0_t, *p_txc_sf_data0_t; 6923859Sml29623 6933859Sml29623 #define TXC_SF_DATA1_REG (FZC_TXC + 0x20090) 6943859Sml29623 #define TXC_SF_DATA1_OFFSET(port) (TXC_SF_DATA1_REG + \ 6953859Sml29623 (TXC_FZC_CNTL_PORT_OFFSET(port))) 6963859Sml29623 6973859Sml29623 typedef union _txc_sf_data1_t { 6983859Sml29623 uint64_t value; 6993859Sml29623 struct { 7003859Sml29623 #ifdef _BIG_ENDIAN 7013859Sml29623 uint32_t hdw; 7023859Sml29623 #endif 7033859Sml29623 struct { 7043859Sml29623 #if defined(_BIT_FIELDS_HTOL) 7053859Sml29623 uint32_t sf_ecc_data1:32; /* sf_ecc_data[63:32] */ 7063859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 7073859Sml29623 uint32_t sf_ecc_data1:32; /* sf_ecc_data[31:32] */ 7083859Sml29623 #endif 7093859Sml29623 } ldw; 7103859Sml29623 #ifndef _BIG_ENDIAN 7113859Sml29623 uint32_t hdw; 7123859Sml29623 #endif 7133859Sml29623 } bits; 7143859Sml29623 } txc_sf_data1_t, *p_txc_sf_data1_t; 7153859Sml29623 7163859Sml29623 7173859Sml29623 #define TXC_SF_DATA2_REG (FZC_TXC + 0x20098) 7183859Sml29623 #define TXC_SF_DATA2_OFFSET(port) (TXC_SF_DATA2_REG + \ 7193859Sml29623 (TXC_FZC_CNTL_PORT_OFFSET(port))) 7203859Sml29623 7213859Sml29623 typedef union _txc_sf_data2_t { 7223859Sml29623 uint64_t value; 7233859Sml29623 struct { 7243859Sml29623 #ifdef _BIG_ENDIAN 7253859Sml29623 uint32_t hdw; 7263859Sml29623 #endif 7273859Sml29623 struct { 7283859Sml29623 #if defined(_BIT_FIELDS_HTOL) 7293859Sml29623 uint32_t sf_ecc_data2:32; /* sf_ecc_data[95:64] */ 7303859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 7313859Sml29623 uint32_t sf_ecc_data2:32; /* sf_ecc_data[95:64] */ 7323859Sml29623 #endif 7333859Sml29623 } ldw; 7343859Sml29623 #ifndef _BIG_ENDIAN 7353859Sml29623 uint32_t hdw; 7363859Sml29623 #endif 7373859Sml29623 } bits; 7383859Sml29623 } txc_sf_data2_t, *p_txc_sf_data2_t; 7393859Sml29623 7403859Sml29623 #define TXC_SF_DATA3_REG (FZC_TXC + 0x200A0) 7413859Sml29623 #define TXC_SF_DATA3_OFFSET(port) (TXC_SF_DATA3_REG + \ 7423859Sml29623 (TXC_FZC_CNTL_PORT_OFFSET(port))) 7433859Sml29623 7443859Sml29623 typedef union _txc_sf_data3_t { 7453859Sml29623 uint64_t value; 7463859Sml29623 struct { 7473859Sml29623 #ifdef _BIG_ENDIAN 7483859Sml29623 uint32_t hdw; 7493859Sml29623 #endif 7503859Sml29623 struct { 7513859Sml29623 #if defined(_BIT_FIELDS_HTOL) 7523859Sml29623 uint32_t sf_ecc_data3:32; /* sf_ecc_data[127:96] */ 7533859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 7543859Sml29623 uint32_t sf_ecc_data3:32; /* sf_ecc_data[127:96] */ 7553859Sml29623 #endif 7563859Sml29623 } ldw; 7573859Sml29623 #ifndef _BIG_ENDIAN 7583859Sml29623 uint32_t hdw; 7593859Sml29623 #endif 7603859Sml29623 } bits; 7613859Sml29623 } txc_sf_data3_t, *p_txc_sf_data3_t; 7623859Sml29623 7633859Sml29623 #define TXC_SF_DATA4_REG (FZC_TXC + 0x200A8) 7643859Sml29623 #define TXC_SF_DATA4_OFFSET(port) (TXC_SF_DATA4_REG + \ 7653859Sml29623 (TXC_FZC_CNTL_PORT_OFFSET(port))) 7663859Sml29623 7673859Sml29623 typedef union _txc_sf_data4_t { 7683859Sml29623 uint64_t value; 7693859Sml29623 struct { 7703859Sml29623 #ifdef _BIG_ENDIAN 7713859Sml29623 uint32_t hdw; 7723859Sml29623 #endif 7733859Sml29623 struct { 7743859Sml29623 #if defined(_BIT_FIELDS_HTOL) 7753859Sml29623 uint32_t sf_ecc_data4:32; /* sf_ecc_data[151:128] */ 7763859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 7773859Sml29623 uint32_t sf_ecc_data4:32; /* sf_ecc_data[151:128] */ 7783859Sml29623 #endif 7793859Sml29623 } ldw; 7803859Sml29623 #ifndef _BIG_ENDIAN 7813859Sml29623 uint32_t hdw; 7823859Sml29623 #endif 7833859Sml29623 } bits; 7843859Sml29623 } txc_sf_data4_t, *p_txc_sf_data4_t; 7853859Sml29623 7863859Sml29623 #define TXC_RO_TIDS_REG (FZC_TXC + 0x200B0) 7873859Sml29623 #define TXC_RO_TIDS_OFFSET(port) (TXC_RO_TIDS_REG + \ 7883859Sml29623 (TXC_FZC_CNTL_PORT_OFFSET(port))) 7893859Sml29623 #define TXC_RO_TIDS_MASK 0x00000000FFFFFFFFULL 7903859Sml29623 7913859Sml29623 typedef union _txc_ro_tids_t { 7923859Sml29623 uint64_t value; 7933859Sml29623 struct { 7943859Sml29623 #ifdef _BIG_ENDIAN 7953859Sml29623 uint32_t hdw; 7963859Sml29623 #endif 7973859Sml29623 struct { 7983859Sml29623 #if defined(_BIT_FIELDS_HTOL) 7993859Sml29623 uint32_t tids_in_use:32; 8003859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 8013859Sml29623 uint32_t tids_in_use:32; 8023859Sml29623 #endif 8033859Sml29623 } ldw; 8043859Sml29623 #ifndef _BIG_ENDIAN 8053859Sml29623 uint32_t hdw; 8063859Sml29623 #endif 8073859Sml29623 } bits; 8083859Sml29623 } txc_ro_tids_t, *p_txc_ro_tids_t; 8093859Sml29623 8103859Sml29623 #define TXC_RO_STATE0_REG (FZC_TXC + 0x200B8) 8113859Sml29623 #define TXC_RO_STATE0_OFFSET(port) (TXC_STATE0_REG + \ 8123859Sml29623 (TXC_FZC_CNTL_PORT_OFFSET(port))) 8133859Sml29623 #define TXC_RO_STATE0_MASK 0x00000000FFFFFFFFULL 8143859Sml29623 8153859Sml29623 typedef union _txc_ro_state0_t { 8163859Sml29623 uint64_t value; 8173859Sml29623 struct { 8183859Sml29623 #ifdef _BIG_ENDIAN 8193859Sml29623 uint32_t hdw; 8203859Sml29623 #endif 8213859Sml29623 struct { 8223859Sml29623 #if defined(_BIT_FIELDS_HTOL) 8233859Sml29623 uint32_t duplicate_tid:32; 8243859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 8253859Sml29623 uint32_t duplicate_tid:32; 8263859Sml29623 #endif 8273859Sml29623 } ldw; 8283859Sml29623 #ifndef _BIG_ENDIAN 8293859Sml29623 uint32_t hdw; 8303859Sml29623 #endif 8313859Sml29623 } bits; 8323859Sml29623 } txc_ro_state0_t, *p_txc_ro_state0_t; 8333859Sml29623 8343859Sml29623 #define TXC_RO_STATE1_REG (FZC_TXC + 0x200C0) 8353859Sml29623 #define TXC_RO_STATE1_OFFSET(port) (TXC_STATE1_REG + \ 8363859Sml29623 (TXC_FZC_CNTL_PORT_OFFSET(port))) 8373859Sml29623 #define TXC_RO_STATE1_MASK 0x00000000FFFFFFFFULL 8383859Sml29623 8393859Sml29623 typedef union _txc_ro_state1_t { 8403859Sml29623 uint64_t value; 8413859Sml29623 struct { 8423859Sml29623 #ifdef _BIG_ENDIAN 8433859Sml29623 uint32_t hdw; 8443859Sml29623 #endif 8453859Sml29623 struct { 8463859Sml29623 #if defined(_BIT_FIELDS_HTOL) 8473859Sml29623 uint32_t unused_tid:32; 8483859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 8493859Sml29623 uint32_t unused_tid:32; 8503859Sml29623 #endif 8513859Sml29623 } ldw; 8523859Sml29623 #ifndef _BIG_ENDIAN 8533859Sml29623 uint32_t hdw; 8543859Sml29623 #endif 8553859Sml29623 } bits; 8563859Sml29623 } txc_ro_state1_t, *p_txc_ro_state1_t; 8573859Sml29623 8583859Sml29623 #define TXC_RO_STATE2_REG (FZC_TXC + 0x200C8) 8593859Sml29623 #define TXC_RO_STATE2_OFFSET(port) (TXC_STATE2_REG + \ 8603859Sml29623 (TXC_FZC_CNTL_PORT_OFFSET(port))) 8613859Sml29623 #define TXC_RO_STATE2_MASK 0x00000000FFFFFFFFULL 8623859Sml29623 8633859Sml29623 typedef union _txc_ro_state2_t { 8643859Sml29623 uint64_t value; 8653859Sml29623 struct { 8663859Sml29623 #ifdef _BIG_ENDIAN 8673859Sml29623 uint32_t hdw; 8683859Sml29623 #endif 8693859Sml29623 struct { 8703859Sml29623 #if defined(_BIT_FIELDS_HTOL) 8713859Sml29623 uint32_t transaction_timeout:32; 8723859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 8733859Sml29623 uint32_t transaction_timeout:32; 8743859Sml29623 #endif 8753859Sml29623 } ldw; 8763859Sml29623 #ifndef _BIG_ENDIAN 8773859Sml29623 uint32_t hdw; 8783859Sml29623 #endif 8793859Sml29623 } bits; 8803859Sml29623 } txc_ro_state2_t, *p_txc_ro_state2_t; 8813859Sml29623 8823859Sml29623 #define TXC_RO_STATE3_REG (FZC_TXC + 0x200D0) 8833859Sml29623 #define TXC_RO_STATE3_OFFSET(port) (TXC_RO_STATE3_REG + \ 8843859Sml29623 (TXC_FZC_CNTL_PORT_OFFSET(port))) 8853859Sml29623 8863859Sml29623 typedef union _txc_ro_state3_t { 8873859Sml29623 uint64_t value; 8883859Sml29623 struct { 8893859Sml29623 #ifdef _BIG_ENDIAN 8903859Sml29623 uint32_t hdw; 8913859Sml29623 #endif 8923859Sml29623 struct { 8933859Sml29623 #if defined(_BIT_FIELDS_HTOL) 8943859Sml29623 uint32_t enable_spacefilled_watermark:1; 8953859Sml29623 uint32_t ro_spacefilled_watermask:10; 8963859Sml29623 uint32_t ro_fifo_spaceavailable:10; 8973859Sml29623 uint32_t rsv:2; 8983859Sml29623 uint32_t enable_ro_watermark:1; 8993859Sml29623 uint32_t highest_reorder_used:4; 9003859Sml29623 uint32_t num_reorder_used:4; 9013859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 9023859Sml29623 uint32_t num_reorder_used:4; 9033859Sml29623 uint32_t highest_reorder_used:4; 9043859Sml29623 uint32_t enable_ro_watermark:1; 9053859Sml29623 uint32_t rsv:2; 9063859Sml29623 uint32_t ro_fifo_spaceavailable:10; 9073859Sml29623 uint32_t ro_spacefilled_watermask:10; 9083859Sml29623 uint32_t enable_spacefilled_watermark:1; 9093859Sml29623 #endif 9103859Sml29623 } ldw; 9113859Sml29623 #ifndef _BIG_ENDIAN 9123859Sml29623 uint32_t hdw; 9133859Sml29623 #endif 9143859Sml29623 } bits; 9153859Sml29623 } txc_ro_state3_t, *p_txc_ro_state3_t; 9163859Sml29623 9173859Sml29623 #define TXC_RO_CTL_REG (FZC_TXC + 0x200D8) 9183859Sml29623 #define TXC_RO_CTL_OFFSET(port) (TXC_RO_CTL_REG + \ 9193859Sml29623 (TXC_FZC_CNTL_PORT_OFFSET(port))) 9203859Sml29623 9213859Sml29623 typedef union _txc_ro_ctl_t { 9223859Sml29623 uint64_t value; 9233859Sml29623 struct { 9243859Sml29623 #ifdef _BIG_ENDIAN 9253859Sml29623 uint32_t hdw; 9263859Sml29623 #endif 9273859Sml29623 struct { 9283859Sml29623 #if defined(_BIT_FIELDS_HTOL) 9293859Sml29623 uint32_t clr_fail_state:1; 9303859Sml29623 uint32_t rsvd3:3; 9313859Sml29623 uint32_t ro_addr1:4; 9323859Sml29623 uint32_t rsvd2:1; 9333859Sml29623 uint32_t address_failed:1; 9343859Sml29623 uint32_t dma_failed:1; 9353859Sml29623 uint32_t length_failed:1; 9363859Sml29623 uint32_t rsv:1; 9373859Sml29623 uint32_t capture_address_fail:1; 9383859Sml29623 uint32_t capture_dma_fail:1; 9393859Sml29623 uint32_t capture_length_fail:1; 9403859Sml29623 uint32_t rsvd:8; 9413859Sml29623 uint32_t ro_state_rd_done:1; 9423859Sml29623 uint32_t ro_state_wr_done:1; 9433859Sml29623 uint32_t ro_state_rd:1; 9443859Sml29623 uint32_t ro_state_wr:1; 9453859Sml29623 uint32_t ro_state_addr:4; 9463859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 9473859Sml29623 uint32_t ro_state_addr:4; 9483859Sml29623 uint32_t ro_state_wr:1; 9493859Sml29623 uint32_t ro_state_rd:1; 9503859Sml29623 uint32_t ro_state_wr_done:1; 9513859Sml29623 uint32_t ro_state_rd_done:1; 9523859Sml29623 uint32_t rsvd:8; 9533859Sml29623 uint32_t capture_length_fail:1; 9543859Sml29623 uint32_t capture_dma_fail:1; 9553859Sml29623 uint32_t capture_address_fail:1; 9563859Sml29623 uint32_t rsv:1; 9573859Sml29623 uint32_t length_failed:1; 9583859Sml29623 uint32_t dma_failed:1; 9593859Sml29623 uint32_t address_failed:1; 9603859Sml29623 uint32_t rsvd2:1; 9613859Sml29623 uint32_t ro_addr1:4; 9623859Sml29623 uint32_t rsvd3:3; 9633859Sml29623 uint32_t clr_fail_state:1; 9643859Sml29623 #endif 9653859Sml29623 } ldw; 9663859Sml29623 #ifndef _BIG_ENDIAN 9673859Sml29623 uint32_t hdw; 9683859Sml29623 #endif 9693859Sml29623 } bits; 9703859Sml29623 } txc_ro_ctl_t, *p_txc_ro_ctl_t; 9713859Sml29623 9723859Sml29623 9733859Sml29623 #define TXC_RO_ST_DATA0_REG (FZC_TXC + 0x200E0) 9743859Sml29623 #define TXC_RO_ST_DATA0_OFFSET(port) (TXC_RO_ST_DATA0_REG + \ 9753859Sml29623 (TXC_FZC_CNTL_PORT_OFFSET(port))) 9763859Sml29623 #define TXC_RO_ST_DATA0_MASK 0x00000000FFFFFFFFULL 9773859Sml29623 9783859Sml29623 typedef union _txc_ro_st_data0_t { 9793859Sml29623 uint64_t value; 9803859Sml29623 struct { 9813859Sml29623 #ifdef _BIG_ENDIAN 9823859Sml29623 uint32_t hdw; 9833859Sml29623 #endif 9843859Sml29623 struct { 9853859Sml29623 #if defined(_BIT_FIELDS_HTOL) 9863859Sml29623 uint32_t ro_st_dat0:32; 9873859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 9883859Sml29623 uint32_t ro_st_dat0:32; 9893859Sml29623 #endif 9903859Sml29623 } ldw; 9913859Sml29623 #ifndef _BIG_ENDIAN 9923859Sml29623 uint32_t hdw; 9933859Sml29623 #endif 9943859Sml29623 } bits; 9953859Sml29623 } txc_ro_st_data0_t, *p_txc_ro_st_data0_t; 9963859Sml29623 9973859Sml29623 9983859Sml29623 #define TXC_RO_ST_DATA1_REG (FZC_TXC + 0x200E8) 9993859Sml29623 #define TXC_RO_ST_DATA1_OFFSET(port) (TXC_RO_ST_DATA1_REG + \ 10003859Sml29623 (TXC_FZC_CNTL_PORT_OFFSET(port))) 10013859Sml29623 #define TXC_RO_ST_DATA1_MASK 0x00000000FFFFFFFFULL 10023859Sml29623 10033859Sml29623 typedef union _txc_ro_st_data1_t { 10043859Sml29623 uint64_t value; 10053859Sml29623 struct { 10063859Sml29623 #ifdef _BIG_ENDIAN 10073859Sml29623 uint32_t hdw; 10083859Sml29623 #endif 10093859Sml29623 struct { 10103859Sml29623 #if defined(_BIT_FIELDS_HTOL) 10113859Sml29623 uint32_t ro_st_dat1:32; 10123859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 10133859Sml29623 uint32_t ro_st_dat1:32; 10143859Sml29623 #endif 10153859Sml29623 } ldw; 10163859Sml29623 #ifndef _BIG_ENDIAN 10173859Sml29623 uint32_t hdw; 10183859Sml29623 #endif 10193859Sml29623 } bits; 10203859Sml29623 } txc_ro_st_data1_t, *p_txc_ro_st_data1_t; 10213859Sml29623 10223859Sml29623 10233859Sml29623 #define TXC_RO_ST_DATA2_REG (FZC_TXC + 0x200F0) 10243859Sml29623 #define TXC_RO_ST_DATA2_OFFSET(port) (TXC_RO_ST_DATA2_REG + \ 10253859Sml29623 (TXC_FZC_CNTL_PORT_OFFSET(port))) 10263859Sml29623 #define TXC_RO_ST_DATA2_MASK 0x00000000FFFFFFFFULL 10273859Sml29623 10283859Sml29623 typedef union _txc_ro_st_data2_t { 10293859Sml29623 uint64_t value; 10303859Sml29623 struct { 10313859Sml29623 #ifdef _BIG_ENDIAN 10323859Sml29623 uint32_t hdw; 10333859Sml29623 #endif 10343859Sml29623 struct { 10353859Sml29623 #if defined(_BIT_FIELDS_HTOL) 10363859Sml29623 uint32_t ro_st_dat2:32; 10373859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 10383859Sml29623 uint32_t ro_st_dat2:32; 10393859Sml29623 #endif 10403859Sml29623 } ldw; 10413859Sml29623 #ifndef _BIG_ENDIAN 10423859Sml29623 uint32_t hdw; 10433859Sml29623 #endif 10443859Sml29623 } bits; 10453859Sml29623 } txc_ro_st_data2_t, *p_txc_ro_st_data2_t; 10463859Sml29623 10473859Sml29623 #define TXC_RO_ST_DATA3_REG (FZC_TXC + 0x200F8) 10483859Sml29623 #define TXC_RO_ST_DATA3_OFFSET(port) (TXC_RO_ST_DATA3_REG + \ 10493859Sml29623 (TXC_FZC_CNTL_PORT_OFFSET(port))) 10503859Sml29623 #define TXC_RO_ST_DATA3_MASK 0x00000000FFFFFFFFULL 10513859Sml29623 10523859Sml29623 typedef union _txc_ro_st_data3_t { 10533859Sml29623 uint64_t value; 10543859Sml29623 struct { 10553859Sml29623 #ifdef _BIG_ENDIAN 10563859Sml29623 uint32_t hdw; 10573859Sml29623 #endif 10583859Sml29623 struct { 10593859Sml29623 #if defined(_BIT_FIELDS_HTOL) 10603859Sml29623 uint32_t ro_st_dat3:32; 10613859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 10623859Sml29623 uint32_t ro_st_dat3:32; 10633859Sml29623 #endif 10643859Sml29623 } ldw; 10653859Sml29623 #ifndef _BIG_ENDIAN 10663859Sml29623 uint32_t hdw; 10673859Sml29623 #endif 10683859Sml29623 } bits; 10693859Sml29623 } txc_ro_st_data3_t, *p_txc_ro_st_data3_t; 10703859Sml29623 10713859Sml29623 #define TXC_PORT_PACKET_REQ_REG (FZC_TXC + 0x20100) 10723859Sml29623 #define TXC_PORT_PACKET_REQ_OFFSET(port) (TXC_PORT_PACKET_REQ_REG + \ 10733859Sml29623 (TXC_FZC_CNTL_PORT_OFFSET(port))) 10743859Sml29623 #define TXC_PORT_PACKET_REQ_MASK 0x00000000FFFFFFFFULL 10753859Sml29623 10763859Sml29623 typedef union _txc_port_packet_req_t { 10773859Sml29623 uint64_t value; 10783859Sml29623 struct { 10793859Sml29623 #ifdef _BIG_ENDIAN 10803859Sml29623 uint32_t hdw; 10813859Sml29623 #endif 10823859Sml29623 struct { 10833859Sml29623 #if defined(_BIT_FIELDS_HTOL) 10843859Sml29623 uint32_t gather_req:4; 10853859Sml29623 uint32_t packet_eq:12; 10863859Sml29623 uint32_t pkterr_abort:16; 10873859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 10883859Sml29623 uint32_t pkterr_abort:16; 10893859Sml29623 uint32_t packet_eq:12; 10903859Sml29623 uint32_t gather_req:4; 10913859Sml29623 #endif 10923859Sml29623 } ldw; 10933859Sml29623 #ifndef _BIG_ENDIAN 10943859Sml29623 uint32_t hdw; 10953859Sml29623 #endif 10963859Sml29623 } bits; 10973859Sml29623 } txc_port_packet_req_t, *p_txc_port_packet_req_t; 10983859Sml29623 10993859Sml29623 /* Reorder error bits in interrupt registers */ 11003859Sml29623 #define TXC_INT_STAT_SF_CORR_ERR 0x01 11013859Sml29623 #define TXC_INT_STAT_SF_UNCORR_ERR 0x02 11023859Sml29623 #define TXC_INT_STAT_RO_CORR_ERR 0x04 11033859Sml29623 #define TXC_INT_STAT_RO_UNCORR_ERR 0x08 11043859Sml29623 #define TXC_INT_STAT_REORDER_ERR 0x10 11053859Sml29623 #define TXC_INT_STAT_PKTASSYDEAD 0x20 11063859Sml29623 11073859Sml29623 #define TXC_INT_STAT_DBG_REG (FZC_TXC + 0x20420) 11083859Sml29623 #define TXC_INT_STAT_DBG_MASK 0x00000000FFFFFFFFULL 11093859Sml29623 11103859Sml29623 typedef union _txc_int_stat_dbg_t { 11113859Sml29623 uint64_t value; 11123859Sml29623 struct { 11133859Sml29623 #ifdef _BIG_ENDIAN 11143859Sml29623 uint32_t hdw; 11153859Sml29623 #endif 11163859Sml29623 struct { 11173859Sml29623 #if defined(_BIT_FIELDS_HTOL) 11183859Sml29623 uint32_t rsvd3:2; 11193859Sml29623 uint32_t port3_int_status:6; 11203859Sml29623 uint32_t rsvd2:2; 11213859Sml29623 uint32_t port2_int_status:6; 11223859Sml29623 uint32_t rsvd1:2; 11233859Sml29623 uint32_t port1_int_status:6; 11243859Sml29623 uint32_t rsvd:2; 11253859Sml29623 uint32_t port0_int_status:6; 11263859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 11273859Sml29623 uint32_t port0_int_status:6; 11283859Sml29623 uint32_t rsvd:2; 11293859Sml29623 uint32_t port1_int_status:6; 11303859Sml29623 uint32_t rsvd1:2; 11313859Sml29623 uint32_t port2_int_status:6; 11323859Sml29623 uint32_t rsvd2:2; 11333859Sml29623 uint32_t port3_int_status:6; 11343859Sml29623 uint32_t rsvd3:2; 11353859Sml29623 #endif 11363859Sml29623 } ldw; 11373859Sml29623 #ifndef _BIG_ENDIAN 11383859Sml29623 uint32_t hdw; 11393859Sml29623 #endif 11403859Sml29623 } bits; 11413859Sml29623 } txc_int_stat_dbg_t, *p_txc_int_stat_dbg_t; 11423859Sml29623 11433859Sml29623 11443859Sml29623 #define TXC_INT_STAT_REG (FZC_TXC + 0x20428) 11453859Sml29623 #define TXC_INT_STAT_MASK 0x00000000FFFFFFFFULL 11463859Sml29623 11473859Sml29623 typedef union _txc_int_stat_t { 11483859Sml29623 uint64_t value; 11493859Sml29623 struct { 11503859Sml29623 #ifdef _BIG_ENDIAN 11513859Sml29623 uint32_t hdw; 11523859Sml29623 #endif 11533859Sml29623 struct { 11543859Sml29623 #if defined(_BIT_FIELDS_HTOL) 11553859Sml29623 uint32_t rsvd3:2; 11563859Sml29623 uint32_t port3_int_status:6; 11573859Sml29623 uint32_t rsvd2:2; 11583859Sml29623 uint32_t port2_int_status:6; 11593859Sml29623 uint32_t rsvd1:2; 11603859Sml29623 uint32_t port1_int_status:6; 11613859Sml29623 uint32_t rsvd:2; 11623859Sml29623 uint32_t port0_int_status:6; 11633859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 11643859Sml29623 uint32_t port0_int_status:6; 11653859Sml29623 uint32_t rsvd:2; 11663859Sml29623 uint32_t port1_int_status:6; 11673859Sml29623 uint32_t rsvd1:2; 11683859Sml29623 uint32_t port2_int_status:6; 11693859Sml29623 uint32_t rsvd2:2; 11703859Sml29623 uint32_t port3_int_status:6; 11713859Sml29623 uint32_t rsvd3:2; 11723859Sml29623 #endif 11733859Sml29623 } ldw; 11743859Sml29623 #ifndef _BIG_ENDIAN 11753859Sml29623 uint32_t hdw; 11763859Sml29623 #endif 11773859Sml29623 } bits; 11783859Sml29623 } txc_int_stat_t, *p_txc_int_stat_t; 11793859Sml29623 11803859Sml29623 #define TXC_INT_MASK_REG (FZC_TXC + 0x20430) 11813859Sml29623 #define TXC_INT_MASK_MASK 0x00000000FFFFFFFFULL 1182*6495Sspeer #define TXC_INT_MASK_IVAL 0x3f 11833859Sml29623 11843859Sml29623 typedef union _txc_int_mask_t { 11853859Sml29623 uint64_t value; 11863859Sml29623 struct { 11873859Sml29623 #ifdef _BIG_ENDIAN 11883859Sml29623 uint32_t hdw; 11893859Sml29623 #endif 11903859Sml29623 struct { 11913859Sml29623 #if defined(_BIT_FIELDS_HTOL) 11923859Sml29623 uint32_t rsvd3:2; 11933859Sml29623 uint32_t port3_int_mask:6; 11943859Sml29623 uint32_t rsvd2:2; 11953859Sml29623 uint32_t port2_int_mask:6; 11963859Sml29623 uint32_t rsvd1:2; 11973859Sml29623 uint32_t port1_int_mask:6; 11983859Sml29623 uint32_t rsvd:2; 11993859Sml29623 uint32_t port0_int_mask:6; 12003859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 12013859Sml29623 uint32_t port0_int_mask:6; 12023859Sml29623 uint32_t rsvd:2; 12033859Sml29623 uint32_t port1_int_mask:6; 12043859Sml29623 uint32_t rsvd1:2; 12053859Sml29623 uint32_t port2_int_mask:6; 12063859Sml29623 uint32_t rsvd2:2; 12073859Sml29623 uint32_t port3_int_mask:6; 12083859Sml29623 uint32_t rsvd3:2; 12093859Sml29623 #endif 12103859Sml29623 } ldw; 12113859Sml29623 #ifndef _BIG_ENDIAN 12123859Sml29623 uint32_t hdw; 12133859Sml29623 #endif 12143859Sml29623 } bits; 12153859Sml29623 } txc_int_mask_t, *p_txc_int_mask_t; 12163859Sml29623 12173859Sml29623 /* 2 ports */ 12183859Sml29623 typedef union _txc_int_mask_n2_t { 12193859Sml29623 uint64_t value; 12203859Sml29623 struct { 12213859Sml29623 #ifdef _BIG_ENDIAN 12223859Sml29623 uint32_t hdw; 12233859Sml29623 #endif 12243859Sml29623 struct { 12253859Sml29623 #if defined(_BIT_FIELDS_HTOL) 12263859Sml29623 uint32_t rsvd1:18; 12273859Sml29623 uint32_t port1_int_mask:6; 12283859Sml29623 uint32_t rsvd:2; 12293859Sml29623 uint32_t port0_int_mask:6; 12303859Sml29623 #elif defined(_BIT_FIELDS_LTOH) 12313859Sml29623 uint32_t port0_int_mask:6; 12323859Sml29623 uint32_t rsvd:2; 12333859Sml29623 uint32_t port1_int_mask:6; 12343859Sml29623 uint32_t rsvd1:18; 12353859Sml29623 #endif 12363859Sml29623 } ldw; 12373859Sml29623 #ifndef _BIG_ENDIAN 12383859Sml29623 uint32_t hdw; 12393859Sml29623 #endif 12403859Sml29623 } bits; 12413859Sml29623 } txc_int_mask_n2_t, *p_txc_int_mask_n2_t; 12423859Sml29623 12433859Sml29623 typedef struct _txc_ro_states { 12443859Sml29623 txc_roecc_st_t roecc; 12453859Sml29623 txc_ro_data0_t d0; 12463859Sml29623 txc_ro_data1_t d1; 12473859Sml29623 txc_ro_data2_t d2; 12483859Sml29623 txc_ro_data3_t d3; 12493859Sml29623 txc_ro_data4_t d4; 12503859Sml29623 txc_ro_tids_t tids; 12513859Sml29623 txc_ro_state0_t st0; 12523859Sml29623 txc_ro_state1_t st1; 12533859Sml29623 txc_ro_state2_t st2; 12543859Sml29623 txc_ro_state3_t st3; 12553859Sml29623 txc_ro_ctl_t ctl; 12563859Sml29623 } txc_ro_states_t, *p_txc_ro_states_t; 12573859Sml29623 12583859Sml29623 typedef struct _txc_sf_states { 12593859Sml29623 txc_sfecc_st_t sfecc; 12603859Sml29623 txc_sf_data0_t d0; 12613859Sml29623 txc_sf_data1_t d1; 12623859Sml29623 txc_sf_data2_t d2; 12633859Sml29623 txc_sf_data3_t d3; 12643859Sml29623 txc_sf_data4_t d4; 12653859Sml29623 } txc_sf_states_t, *p_txc_sf_states_t; 12663859Sml29623 12673859Sml29623 #ifdef __cplusplus 12683859Sml29623 } 12693859Sml29623 #endif 12703859Sml29623 12713859Sml29623 #endif /* _SYS_NXGE_NXGE_TXC_HW_H */ 1272