linux/drivers/net/ethernet/sun/niu.h

/* SPDX-License-Identifier: GPL-2.0 */
/* niu.h: Definitions for Neptune ethernet driver.
 *
 * Copyright (C) 2007 David S. Miller ([email protected])
 */

#ifndef _NIU_H
#define _NIU_H

#define PIO
#define FZC_PIO
#define FZC_MAC
#define FZC_IPP
#define FFLP
#define FZC_FFLP
#define PIO_VADDR
#define ZCP
#define FZC_ZCP
#define DMC
#define FZC_DMC
#define TXC
#define FZC_TXC
#define PIO_LDSV
#define PIO_PIO_LDGIM
#define PIO_IMASK0
#define PIO_IMASK1
#define FZC_PROM
#define FZC_PIM

#define LDSV0(LDG)
#define LDSV1(LDG)
#define LDSV2(LDG)

#define LDG_IMGMT(LDG)
#define LDG_IMGMT_ARM
#define LDG_IMGMT_TIMER

#define LD_IM0(IDX)
#define LD_IM0_MASK

#define LD_IM1(IDX)
#define LD_IM1_MASK

#define LDG_TIMER_RES
#define LDG_TIMER_RES_VAL

#define DIRTY_TID_CTL
#define DIRTY_TID_CTL_NPTHRED
#define DIRTY_TID_CTL_RDTHRED
#define DIRTY_TID_CTL_DTIDCLR
#define DIRTY_TID_CTL_DTIDENAB

#define DIRTY_TID_STAT
#define DIRTY_TID_STAT_NPWSTAT
#define DIRTY_TID_STAT_RDSTAT

#define RST_CTL
#define RST_CTL_MAC_RST3
#define RST_CTL_MAC_RST2
#define RST_CTL_MAC_RST1
#define RST_CTL_MAC_RST0
#define RST_CTL_ACK_TO_EN
#define RST_CTL_ACK_TO_VAL

#define SMX_CFIG_DAT
#define SMX_CFIG_DAT_RAS_DET
#define SMX_CFIG_DAT_RAS_INJ
#define SMX_CFIG_DAT_XACT_TO

#define SMX_INT_STAT
#define SMX_INT_STAT_STAT

#define SMX_CTL
#define SMX_CTL_CTL

#define SMX_DBG_VEC
#define SMX_DBG_VEC_VEC

#define PIO_DBG_SEL
#define PIO_DBG_SEL_SEL

#define PIO_TRAIN_VEC
#define PIO_TRAIN_VEC_VEC

#define PIO_ARB_CTL
#define PIO_ARB_CTL_CTL

#define PIO_ARB_DBG_VEC
#define PIO_ARB_DBG_VEC_VEC

#define SYS_ERR_MASK
#define SYS_ERR_MASK_META2
#define SYS_ERR_MASK_META1
#define SYS_ERR_MASK_PEU
#define SYS_ERR_MASK_TXC
#define SYS_ERR_MASK_RDMC
#define SYS_ERR_MASK_TDMC
#define SYS_ERR_MASK_ZCP
#define SYS_ERR_MASK_FFLP
#define SYS_ERR_MASK_IPP
#define SYS_ERR_MASK_MAC
#define SYS_ERR_MASK_SMX

#define SYS_ERR_STAT
#define SYS_ERR_STAT_META2
#define SYS_ERR_STAT_META1
#define SYS_ERR_STAT_PEU
#define SYS_ERR_STAT_TXC
#define SYS_ERR_STAT_RDMC
#define SYS_ERR_STAT_TDMC
#define SYS_ERR_STAT_ZCP
#define SYS_ERR_STAT_FFLP
#define SYS_ERR_STAT_IPP
#define SYS_ERR_STAT_MAC
#define SYS_ERR_STAT_SMX

#define SID(LDG)
#define SID_FUNC
#define SID_FUNC_SHIFT
#define SID_VECTOR
#define SID_VECTOR_SHIFT

#define LDG_NUM(LDN)

#define XMAC_PORT0_OFF
#define XMAC_PORT1_OFF
#define BMAC_PORT2_OFF
#define BMAC_PORT3_OFF

/* XMAC registers, offset from np->mac_regs  */

#define XTXMAC_SW_RST
#define XTXMAC_SW_RST_REG_RS
#define XTXMAC_SW_RST_SOFT_RST

#define XRXMAC_SW_RST
#define XRXMAC_SW_RST_REG_RS
#define XRXMAC_SW_RST_SOFT_RST

#define XTXMAC_STATUS
#define XTXMAC_STATUS_FRAME_CNT_EXP
#define XTXMAC_STATUS_BYTE_CNT_EXP
#define XTXMAC_STATUS_TXFIFO_XFR_ERR
#define XTXMAC_STATUS_TXMAC_OFLOW
#define XTXMAC_STATUS_MAX_PSIZE_ERR
#define XTXMAC_STATUS_TXMAC_UFLOW
#define XTXMAC_STATUS_FRAME_XMITED

#define XRXMAC_STATUS
#define XRXMAC_STATUS_RXHIST7_CNT_EXP
#define XRXMAC_STATUS_LCL_FLT_STATUS
#define XRXMAC_STATUS_RFLT_DET
#define XRXMAC_STATUS_LFLT_CNT_EXP
#define XRXMAC_STATUS_PHY_MDINT
#define XRXMAC_STATUS_ALIGNERR_CNT_EXP
#define XRXMAC_STATUS_RXFRAG_CNT_EXP
#define XRXMAC_STATUS_RXMULTF_CNT_EXP
#define XRXMAC_STATUS_RXBCAST_CNT_EXP
#define XRXMAC_STATUS_RXHIST6_CNT_EXP
#define XRXMAC_STATUS_RXHIST5_CNT_EXP
#define XRXMAC_STATUS_RXHIST4_CNT_EXP
#define XRXMAC_STATUS_RXHIST3_CNT_EXP
#define XRXMAC_STATUS_RXHIST2_CNT_EXP
#define XRXMAC_STATUS_RXHIST1_CNT_EXP
#define XRXMAC_STATUS_RXOCTET_CNT_EXP
#define XRXMAC_STATUS_CVIOLERR_CNT_EXP
#define XRXMAC_STATUS_LENERR_CNT_EXP
#define XRXMAC_STATUS_CRCERR_CNT_EXP
#define XRXMAC_STATUS_RXUFLOW
#define XRXMAC_STATUS_RXOFLOW
#define XRXMAC_STATUS_FRAME_RCVD

#define XMAC_FC_STAT
#define XMAC_FC_STAT_RX_RCV_PAUSE_TIME
#define XMAC_FC_STAT_TX_MAC_NPAUSE
#define XMAC_FC_STAT_TX_MAC_PAUSE
#define XMAC_FC_STAT_RX_MAC_RPAUSE

#define XTXMAC_STAT_MSK
#define XTXMAC_STAT_MSK_FRAME_CNT_EXP
#define XTXMAC_STAT_MSK_BYTE_CNT_EXP
#define XTXMAC_STAT_MSK_TXFIFO_XFR_ERR
#define XTXMAC_STAT_MSK_TXMAC_OFLOW
#define XTXMAC_STAT_MSK_MAX_PSIZE_ERR
#define XTXMAC_STAT_MSK_TXMAC_UFLOW
#define XTXMAC_STAT_MSK_FRAME_XMITED

#define XRXMAC_STAT_MSK
#define XRXMAC_STAT_MSK_LCL_FLT_STAT_MSK
#define XRXMAC_STAT_MSK_RFLT_DET
#define XRXMAC_STAT_MSK_LFLT_CNT_EXP
#define XRXMAC_STAT_MSK_PHY_MDINT
#define XRXMAC_STAT_MSK_RXFRAG_CNT_EXP
#define XRXMAC_STAT_MSK_RXMULTF_CNT_EXP
#define XRXMAC_STAT_MSK_RXBCAST_CNT_EXP
#define XRXMAC_STAT_MSK_RXHIST6_CNT_EXP
#define XRXMAC_STAT_MSK_RXHIST5_CNT_EXP
#define XRXMAC_STAT_MSK_RXHIST4_CNT_EXP
#define XRXMAC_STAT_MSK_RXHIST3_CNT_EXP
#define XRXMAC_STAT_MSK_RXHIST2_CNT_EXP
#define XRXMAC_STAT_MSK_RXHIST1_CNT_EXP
#define XRXMAC_STAT_MSK_RXOCTET_CNT_EXP
#define XRXMAC_STAT_MSK_CVIOLERR_CNT_EXP
#define XRXMAC_STAT_MSK_LENERR_CNT_EXP
#define XRXMAC_STAT_MSK_CRCERR_CNT_EXP
#define XRXMAC_STAT_MSK_RXUFLOW_CNT_EXP
#define XRXMAC_STAT_MSK_RXOFLOW_CNT_EXP
#define XRXMAC_STAT_MSK_FRAME_RCVD

#define XMAC_FC_MSK
#define XMAC_FC_MSK_TX_MAC_NPAUSE
#define XMAC_FC_MSK_TX_MAC_PAUSE
#define XMAC_FC_MSK_RX_MAC_RPAUSE

#define XMAC_CONFIG
#define XMAC_CONFIG_SEL_CLK_25MHZ
#define XMAC_CONFIG_1G_PCS_BYPASS
#define XMAC_CONFIG_10G_XPCS_BYPASS
#define XMAC_CONFIG_MODE_MASK
#define XMAC_CONFIG_MODE_XGMII
#define XMAC_CONFIG_MODE_GMII
#define XMAC_CONFIG_MODE_MII
#define XMAC_CONFIG_LFS_DISABLE
#define XMAC_CONFIG_LOOPBACK
#define XMAC_CONFIG_TX_OUTPUT_EN
#define XMAC_CONFIG_SEL_POR_CLK_SRC
#define XMAC_CONFIG_LED_POLARITY
#define XMAC_CONFIG_FORCE_LED_ON
#define XMAC_CONFIG_PASS_FLOW_CTRL
#define XMAC_CONFIG_RCV_PAUSE_ENABLE
#define XMAC_CONFIG_MAC2IPP_PKT_CNT_EN
#define XMAC_CONFIG_STRIP_CRC
#define XMAC_CONFIG_ADDR_FILTER_EN
#define XMAC_CONFIG_HASH_FILTER_EN
#define XMAC_CONFIG_RX_CODEV_CHK_DIS
#define XMAC_CONFIG_RESERVED_MULTICAST
#define XMAC_CONFIG_RX_CRC_CHK_DIS
#define XMAC_CONFIG_ERR_CHK_DIS
#define XMAC_CONFIG_PROMISC_GROUP
#define XMAC_CONFIG_PROMISCUOUS
#define XMAC_CONFIG_RX_MAC_ENABLE
#define XMAC_CONFIG_WARNING_MSG_EN
#define XMAC_CONFIG_ALWAYS_NO_CRC
#define XMAC_CONFIG_VAR_MIN_IPG_EN
#define XMAC_CONFIG_STRETCH_MODE
#define XMAC_CONFIG_TX_ENABLE

#define XMAC_IPG
#define XMAC_IPG_STRETCH_CONST
#define XMAC_IPG_STRETCH_CONST_SHIFT
#define XMAC_IPG_STRETCH_RATIO
#define XMAC_IPG_STRETCH_RATIO_SHIFT
#define XMAC_IPG_IPG_MII_GMII
#define XMAC_IPG_IPG_MII_GMII_SHIFT
#define XMAC_IPG_IPG_XGMII
#define XMAC_IPG_IPG_XGMII_SHIFT

#define IPG_12_15_XGMII
#define IPG_16_19_XGMII
#define IPG_20_23_XGMII
#define IPG_12_MII_GMII
#define IPG_13_MII_GMII
#define IPG_14_MII_GMII
#define IPG_15_MII_GMII
#define IPG_16_MII_GMII

#define XMAC_MIN
#define XMAC_MIN_RX_MIN_PKT_SIZE
#define XMAC_MIN_RX_MIN_PKT_SIZE_SHFT
#define XMAC_MIN_SLOT_TIME
#define XMAC_MIN_SLOT_TIME_SHFT
#define XMAC_MIN_TX_MIN_PKT_SIZE
#define XMAC_MIN_TX_MIN_PKT_SIZE_SHFT

#define XMAC_MAX
#define XMAC_MAX_FRAME_SIZE
#define XMAC_MAX_FRAME_SIZE_SHFT

#define XMAC_ADDR0
#define XMAC_ADDR0_ADDR0

#define XMAC_ADDR1
#define XMAC_ADDR1_ADDR1

#define XMAC_ADDR2
#define XMAC_ADDR2_ADDR2

#define XMAC_ADDR_CMPEN
#define XMAC_ADDR_CMPEN_EN15
#define XMAC_ADDR_CMPEN_EN14
#define XMAC_ADDR_CMPEN_EN13
#define XMAC_ADDR_CMPEN_EN12
#define XMAC_ADDR_CMPEN_EN11
#define XMAC_ADDR_CMPEN_EN10
#define XMAC_ADDR_CMPEN_EN9
#define XMAC_ADDR_CMPEN_EN8
#define XMAC_ADDR_CMPEN_EN7
#define XMAC_ADDR_CMPEN_EN6
#define XMAC_ADDR_CMPEN_EN5
#define XMAC_ADDR_CMPEN_EN4
#define XMAC_ADDR_CMPEN_EN3
#define XMAC_ADDR_CMPEN_EN2
#define XMAC_ADDR_CMPEN_EN1
#define XMAC_ADDR_CMPEN_EN0

#define XMAC_NUM_ALT_ADDR

#define XMAC_ALT_ADDR0(NUM)
#define XMAC_ALT_ADDR0_ADDR0

#define XMAC_ALT_ADDR1(NUM)
#define XMAC_ALT_ADDR1_ADDR1

#define XMAC_ALT_ADDR2(NUM)
#define XMAC_ALT_ADDR2_ADDR2

#define XMAC_ADD_FILT0
#define XMAC_ADD_FILT0_FILT0

#define XMAC_ADD_FILT1
#define XMAC_ADD_FILT1_FILT1

#define XMAC_ADD_FILT2
#define XMAC_ADD_FILT2_FILT2

#define XMAC_ADD_FILT12_MASK
#define XMAC_ADD_FILT12_MASK_VAL

#define XMAC_ADD_FILT00_MASK
#define XMAC_ADD_FILT00_MASK_VAL

#define XMAC_HASH_TBL(NUM)
#define XMAC_HASH_TBL_VAL

#define XMAC_NUM_HOST_INFO

#define XMAC_HOST_INFO(NUM)

#define XMAC_PA_DATA0
#define XMAC_PA_DATA0_VAL

#define XMAC_PA_DATA1
#define XMAC_PA_DATA1_VAL

#define XMAC_DEBUG_SEL
#define XMAC_DEBUG_SEL_XMAC
#define XMAC_DEBUG_SEL_MAC

#define XMAC_TRAIN_VEC
#define XMAC_TRAIN_VEC_VAL

#define RXMAC_BT_CNT
#define RXMAC_BT_CNT_COUNT

#define RXMAC_BC_FRM_CNT
#define RXMAC_BC_FRM_CNT_COUNT

#define RXMAC_MC_FRM_CNT
#define RXMAC_MC_FRM_CNT_COUNT

#define RXMAC_FRAG_CNT
#define RXMAC_FRAG_CNT_COUNT

#define RXMAC_HIST_CNT1
#define RXMAC_HIST_CNT1_COUNT

#define RXMAC_HIST_CNT2
#define RXMAC_HIST_CNT2_COUNT

#define RXMAC_HIST_CNT3
#define RXMAC_HIST_CNT3_COUNT

#define RXMAC_HIST_CNT4
#define RXMAC_HIST_CNT4_COUNT

#define RXMAC_HIST_CNT5
#define RXMAC_HIST_CNT5_COUNT

#define RXMAC_HIST_CNT6
#define RXMAC_HIST_CNT6_COUNT

#define RXMAC_MPSZER_CNT
#define RXMAC_MPSZER_CNT_COUNT

#define RXMAC_CRC_ER_CNT
#define RXMAC_CRC_ER_CNT_COUNT

#define RXMAC_CD_VIO_CNT
#define RXMAC_CD_VIO_CNT_COUNT

#define RXMAC_ALIGN_ERR_CNT
#define RXMAC_ALIGN_ERR_CNT_COUNT

#define TXMAC_FRM_CNT
#define TXMAC_FRM_CNT_COUNT

#define TXMAC_BYTE_CNT
#define TXMAC_BYTE_CNT_COUNT

#define LINK_FAULT_CNT
#define LINK_FAULT_CNT_COUNT

#define RXMAC_HIST_CNT7
#define RXMAC_HIST_CNT7_COUNT

#define XMAC_SM_REG
#define XMAC_SM_REG_STATE

#define XMAC_INTER1
#define XMAC_INTERN1_SIGNALS1

#define XMAC_INTER2
#define XMAC_INTERN2_SIGNALS2

/* BMAC registers, offset from np->mac_regs  */

#define BTXMAC_SW_RST
#define BTXMAC_SW_RST_RESET

#define BRXMAC_SW_RST
#define BRXMAC_SW_RST_RESET

#define BMAC_SEND_PAUSE
#define BMAC_SEND_PAUSE_SEND
#define BMAC_SEND_PAUSE_TIME

#define BTXMAC_STATUS
#define BTXMAC_STATUS_XMIT
#define BTXMAC_STATUS_UNDERRUN
#define BTXMAC_STATUS_MAX_PKT_ERR
#define BTXMAC_STATUS_BYTE_CNT_EXP
#define BTXMAC_STATUS_FRAME_CNT_EXP

#define BRXMAC_STATUS
#define BRXMAC_STATUS_RX_PKT
#define BRXMAC_STATUS_OVERFLOW
#define BRXMAC_STATUS_FRAME_CNT_EXP
#define BRXMAC_STATUS_ALIGN_ERR_EXP
#define BRXMAC_STATUS_CRC_ERR_EXP
#define BRXMAC_STATUS_LEN_ERR_EXP

#define BMAC_CTRL_STATUS
#define BMAC_CTRL_STATUS_PAUSE_RECV
#define BMAC_CTRL_STATUS_PAUSE
#define BMAC_CTRL_STATUS_NOPAUSE
#define BMAC_CTRL_STATUS_TIME
#define BMAC_CTRL_STATUS_TIME_SHIFT

#define BTXMAC_STATUS_MASK
#define BRXMAC_STATUS_MASK
#define BMAC_CTRL_STATUS_MASK

#define BTXMAC_CONFIG
#define BTXMAC_CONFIG_ENABLE
#define BTXMAC_CONFIG_FCS_DISABLE

#define BRXMAC_CONFIG
#define BRXMAC_CONFIG_DISCARD_DIS
#define BRXMAC_CONFIG_ADDR_FILT_EN
#define BRXMAC_CONFIG_HASH_FILT_EN
#define BRXMAC_CONFIG_PROMISC_GRP
#define BRXMAC_CONFIG_PROMISC
#define BRXMAC_CONFIG_STRIP_FCS
#define BRXMAC_CONFIG_STRIP_PAD
#define BRXMAC_CONFIG_ENABLE

#define BMAC_CTRL_CONFIG
#define BMAC_CTRL_CONFIG_TX_PAUSE_EN
#define BMAC_CTRL_CONFIG_RX_PAUSE_EN
#define BMAC_CTRL_CONFIG_PASS_CTRL

#define BMAC_XIF_CONFIG
#define BMAC_XIF_CONFIG_TX_OUTPUT_EN
#define BMAC_XIF_CONFIG_MII_LOOPBACK
#define BMAC_XIF_CONFIG_GMII_MODE
#define BMAC_XIF_CONFIG_LINK_LED
#define BMAC_XIF_CONFIG_LED_POLARITY
#define BMAC_XIF_CONFIG_25MHZ_CLOCK

#define BMAC_MIN_FRAME
#define BMAC_MIN_FRAME_VAL

#define BMAC_MAX_FRAME
#define BMAC_MAX_FRAME_MAX_BURST
#define BMAC_MAX_FRAME_MAX_BURST_SHIFT
#define BMAC_MAX_FRAME_MAX_FRAME
#define BMAC_MAX_FRAME_MAX_FRAME_SHIFT

#define BMAC_PREAMBLE_SIZE
#define BMAC_PREAMBLE_SIZE_VAL

#define BMAC_CTRL_TYPE

#define BMAC_ADDR0
#define BMAC_ADDR0_ADDR0

#define BMAC_ADDR1
#define BMAC_ADDR1_ADDR1

#define BMAC_ADDR2
#define BMAC_ADDR2_ADDR2

#define BMAC_NUM_ALT_ADDR

#define BMAC_ALT_ADDR0(NUM)
#define BMAC_ALT_ADDR0_ADDR0

#define BMAC_ALT_ADDR1(NUM)
#define BMAC_ALT_ADDR1_ADDR1

#define BMAC_ALT_ADDR2(NUM)
#define BMAC_ALT_ADDR2_ADDR2

#define BMAC_FC_ADDR0
#define BMAC_FC_ADDR0_ADDR0

#define BMAC_FC_ADDR1
#define BMAC_FC_ADDR1_ADDR1

#define BMAC_FC_ADDR2
#define BMAC_FC_ADDR2_ADDR2

#define BMAC_ADD_FILT0
#define BMAC_ADD_FILT0_FILT0

#define BMAC_ADD_FILT1
#define BMAC_ADD_FILT1_FILT1

#define BMAC_ADD_FILT2
#define BMAC_ADD_FILT2_FILT2

#define BMAC_ADD_FILT12_MASK
#define BMAC_ADD_FILT12_MASK_VAL

#define BMAC_ADD_FILT00_MASK
#define BMAC_ADD_FILT00_MASK_VAL

#define BMAC_HASH_TBL(NUM)
#define BMAC_HASH_TBL_VAL

#define BRXMAC_FRAME_CNT
#define BRXMAC_FRAME_CNT_COUNT

#define BRXMAC_MAX_LEN_ERR_CNT

#define BRXMAC_ALIGN_ERR_CNT
#define BRXMAC_ALIGN_ERR_CNT_COUNT

#define BRXMAC_CRC_ERR_CNT
#define BRXMAC_ALIGN_ERR_CNT_COUNT

#define BRXMAC_CODE_VIOL_ERR_CNT
#define BRXMAC_CODE_VIOL_ERR_CNT_COUNT

#define BMAC_STATE_MACHINE

#define BMAC_ADDR_CMPEN
#define BMAC_ADDR_CMPEN_EN15
#define BMAC_ADDR_CMPEN_EN14
#define BMAC_ADDR_CMPEN_EN13
#define BMAC_ADDR_CMPEN_EN12
#define BMAC_ADDR_CMPEN_EN11
#define BMAC_ADDR_CMPEN_EN10
#define BMAC_ADDR_CMPEN_EN9
#define BMAC_ADDR_CMPEN_EN8
#define BMAC_ADDR_CMPEN_EN7
#define BMAC_ADDR_CMPEN_EN6
#define BMAC_ADDR_CMPEN_EN5
#define BMAC_ADDR_CMPEN_EN4
#define BMAC_ADDR_CMPEN_EN3
#define BMAC_ADDR_CMPEN_EN2
#define BMAC_ADDR_CMPEN_EN1
#define BMAC_ADDR_CMPEN_EN0

#define BMAC_NUM_HOST_INFO

#define BMAC_HOST_INFO(NUM)

#define BTXMAC_BYTE_CNT
#define BTXMAC_BYTE_CNT_COUNT

#define BTXMAC_FRM_CNT
#define BTXMAC_FRM_CNT_COUNT

#define BRXMAC_BYTE_CNT
#define BRXMAC_BYTE_CNT_COUNT

#define HOST_INFO_MPR
#define HOST_INFO_MACRDCTBLN

/* XPCS registers, offset from np->regs + np->xpcs_off  */

#define XPCS_CONTROL1
#define XPCS_CONTROL1_RESET
#define XPCS_CONTROL1_LOOPBACK
#define XPCS_CONTROL1_SPEED_SELECT3
#define XPCS_CONTROL1_CSR_LOW_PWR
#define XPCS_CONTROL1_CSR_SPEED1
#define XPCS_CONTROL1_CSR_SPEED0

#define XPCS_STATUS1
#define XPCS_STATUS1_CSR_FAULT
#define XPCS_STATUS1_CSR_RXLNK_STAT
#define XPCS_STATUS1_CSR_LPWR_ABLE

#define XPCS_DEVICE_IDENTIFIER
#define XPCS_DEVICE_IDENTIFIER_VAL

#define XPCS_SPEED_ABILITY
#define XPCS_SPEED_ABILITY_10GIG

#define XPCS_DEV_IN_PKG
#define XPCS_DEV_IN_PKG_CSR_VEND2
#define XPCS_DEV_IN_PKG_CSR_VEND1
#define XPCS_DEV_IN_PKG_DTE_XS
#define XPCS_DEV_IN_PKG_PHY_XS
#define XPCS_DEV_IN_PKG_PCS
#define XPCS_DEV_IN_PKG_WIS
#define XPCS_DEV_IN_PKG_PMD_PMA
#define XPCS_DEV_IN_PKG_CLS22

#define XPCS_CONTROL2
#define XPCS_CONTROL2_CSR_PSC_SEL

#define XPCS_STATUS2
#define XPCS_STATUS2_CSR_DEV_PRES
#define XPCS_STATUS2_CSR_TX_FAULT
#define XPCS_STATUS2_CSR_RCV_FAULT
#define XPCS_STATUS2_TEN_GBASE_W
#define XPCS_STATUS2_TEN_GBASE_X
#define XPCS_STATUS2_TEN_GBASE_R

#define XPCS_PKG_ID
#define XPCS_PKG_ID_VAL

#define XPCS_STATUS(IDX)
#define XPCS_STATUS_CSR_LANE_ALIGN
#define XPCS_STATUS_CSR_PATTEST_CAP
#define XPCS_STATUS_CSR_LANE3_SYNC
#define XPCS_STATUS_CSR_LANE2_SYNC
#define XPCS_STATUS_CSR_LANE1_SYNC
#define XPCS_STATUS_CSR_LANE0_SYNC

#define XPCS_TEST_CONTROL
#define XPCS_TEST_CONTROL_TXTST_EN
#define XPCS_TEST_CONTROL_TPAT_SEL

#define XPCS_CFG_VENDOR1
#define XPCS_CFG_VENDOR1_DBG_IOTST
#define XPCS_CFG_VENDOR1_DBG_SEL
#define XPCS_CFG_VENDOR1_BYPASS_DET
#define XPCS_CFG_VENDOR1_TXBUF_EN
#define XPCS_CFG_VENDOR1_XPCS_EN

#define XPCS_DIAG_VENDOR2
#define XPCS_DIAG_VENDOR2_SSM_LANE3
#define XPCS_DIAG_VENDOR2_SSM_LANE2
#define XPCS_DIAG_VENDOR2_SSM_LANE1
#define XPCS_DIAG_VENDOR2_SSM_LANE0
#define XPCS_DIAG_VENDOR2_EBUF_SM
#define XPCS_DIAG_VENDOR2_RCV_SM

#define XPCS_MASK1
#define XPCS_MASK1_FAULT_MASK
#define XPCS_MASK1_RXALIGN_STAT_MSK

#define XPCS_PKT_COUNT
#define XPCS_PKT_COUNT_TX
#define XPCS_PKT_COUNT_RX

#define XPCS_TX_SM
#define XPCS_TX_SM_VAL

#define XPCS_DESKEW_ERR_CNT
#define XPCS_DESKEW_ERR_CNT_VAL

#define XPCS_SYMERR_CNT01
#define XPCS_SYMERR_CNT01_LANE1
#define XPCS_SYMERR_CNT01_LANE0

#define XPCS_SYMERR_CNT23
#define XPCS_SYMERR_CNT23_LANE3
#define XPCS_SYMERR_CNT23_LANE2

#define XPCS_TRAINING_VECTOR
#define XPCS_TRAINING_VECTOR_VAL

/* PCS registers, offset from np->regs + np->pcs_off  */

#define PCS_MII_CTL
#define PCS_MII_CTL_RST
#define PCS_MII_CTL_10_100_SPEED
#define PCS_MII_AUTONEG_EN
#define PCS_MII_PWR_DOWN
#define PCS_MII_ISOLATE
#define PCS_MII_AUTONEG_RESTART
#define PCS_MII_DUPLEX
#define PCS_MII_COLL_TEST
#define PCS_MII_1000MB_SPEED

#define PCS_MII_STAT
#define PCS_MII_STAT_EXT_STATUS
#define PCS_MII_STAT_AUTONEG_DONE
#define PCS_MII_STAT_REMOTE_FAULT
#define PCS_MII_STAT_AUTONEG_ABLE
#define PCS_MII_STAT_LINK_STATUS
#define PCS_MII_STAT_JABBER_DET
#define PCS_MII_STAT_EXT_CAP

#define PCS_MII_ADV
#define PCS_MII_ADV_NEXT_PAGE
#define PCS_MII_ADV_ACK
#define PCS_MII_ADV_REMOTE_FAULT
#define PCS_MII_ADV_ASM_DIR
#define PCS_MII_ADV_PAUSE
#define PCS_MII_ADV_HALF_DUPLEX
#define PCS_MII_ADV_FULL_DUPLEX

#define PCS_MII_PARTNER
#define PCS_MII_PARTNER_NEXT_PAGE
#define PCS_MII_PARTNER_ACK
#define PCS_MII_PARTNER_REMOTE_FAULT
#define PCS_MII_PARTNER_PAUSE
#define PCS_MII_PARTNER_HALF_DUPLEX
#define PCS_MII_PARTNER_FULL_DUPLEX

#define PCS_CONF
#define PCS_CONF_MASK
#define PCS_CONF_10MS_TMR_OVERRIDE
#define PCS_CONF_JITTER_STUDY
#define PCS_CONF_SIGDET_ACTIVE_LOW
#define PCS_CONF_SIGDET_OVERRIDE
#define PCS_CONF_ENABLE

#define PCS_STATE
#define PCS_STATE_D_PARTNER_FAIL
#define PCS_STATE_D_WAIT_C_CODES_ACK
#define PCS_STATE_D_SYNC_LOSS
#define PCS_STATE_D_NO_GOOD_C_CODES
#define PCS_STATE_D_SERDES
#define PCS_STATE_D_BREAKLINK_C_CODES
#define PCS_STATE_L_SIGDET
#define PCS_STATE_L_SYNC_LOSS
#define PCS_STATE_L_C_CODES
#define PCS_STATE_LINK_CFG_STATE
#define PCS_STATE_SEQ_DET_STATE
#define PCS_STATE_WORD_SYNC_STATE
#define PCS_STATE_NO_IDLE

#define PCS_INTERRUPT
#define PCS_INTERRUPT_LSTATUS

#define PCS_DPATH_MODE
#define PCS_DPATH_MODE_PCS
#define PCS_DPATH_MODE_MII
#define PCS_DPATH_MODE_LINKUP_F_ENAB

#define PCS_PKT_CNT
#define PCS_PKT_CNT_RX
#define PCS_PKT_CNT_TX

#define MIF_BB_MDC
#define MIF_BB_MDC_CLK

#define MIF_BB_MDO
#define MIF_BB_MDO_DAT

#define MIF_BB_MDO_EN
#define MIF_BB_MDO_EN_VAL

#define MIF_FRAME_OUTPUT
#define MIF_FRAME_OUTPUT_ST
#define MIF_FRAME_OUTPUT_ST_SHIFT
#define MIF_FRAME_OUTPUT_OP_ADDR
#define MIF_FRAME_OUTPUT_OP_WRITE
#define MIF_FRAME_OUTPUT_OP_READ_INC
#define MIF_FRAME_OUTPUT_OP_READ
#define MIF_FRAME_OUTPUT_OP_SHIFT
#define MIF_FRAME_OUTPUT_PORT
#define MIF_FRAME_OUTPUT_PORT_SHIFT
#define MIF_FRAME_OUTPUT_REG
#define MIF_FRAME_OUTPUT_REG_SHIFT
#define MIF_FRAME_OUTPUT_TA
#define MIF_FRAME_OUTPUT_TA_SHIFT
#define MIF_FRAME_OUTPUT_DATA
#define MIF_FRAME_OUTPUT_DATA_SHIFT

#define MDIO_ADDR_OP(port, dev, reg)

#define MDIO_READ_OP(port, dev)

#define MDIO_WRITE_OP(port, dev, data)

#define MII_READ_OP(port, reg)

#define MII_WRITE_OP(port, reg, data)

#define MIF_CONFIG
#define MIF_CONFIG_ATCA_GE
#define MIF_CONFIG_INDIRECT_MODE
#define MIF_CONFIG_POLL_PRT_PHYADDR
#define MIF_CONFIG_POLL_DEV_REG_ADDR
#define MIF_CONFIG_BB_MODE
#define MIF_CONFIG_POLL_EN
#define MIF_CONFIG_BB_SER_SEL
#define MIF_CONFIG_MANUAL_MODE

#define MIF_POLL_STATUS
#define MIF_POLL_STATUS_DATA
#define MIF_POLL_STATUS_STAT

#define MIF_POLL_MASK
#define MIF_POLL_MASK_VAL

#define MIF_SM
#define MIF_SM_PORT_ADDR
#define MIF_SM_MDI_1
#define MIF_SM_MDI_0
#define MIF_SM_MDCLK
#define MIF_SM_MDO_EN
#define MIF_SM_MDO
#define MIF_SM_MDI
#define MIF_SM_CTL
#define MIF_SM_EX

#define MIF_STATUS
#define MIF_STATUS_MDINT1
#define MIF_STATUS_MDINT0

#define MIF_MASK
#define MIF_MASK_MDINT1
#define MIF_MASK_MDINT0
#define MIF_MASK_PEU_ERR
#define MIF_MASK_YC
#define MIF_MASK_XGE_ERR0
#define MIF_MASK_MIF_INIT_DONE

#define ENET_SERDES_RESET
#define ENET_SERDES_RESET_1
#define ENET_SERDES_RESET_0

#define ENET_SERDES_CFG
#define ENET_SERDES_BE_LOOPBACK
#define ENET_SERDES_CFG_FORCE_RDY

#define ENET_SERDES_0_PLL_CFG
#define ENET_SERDES_PLL_FBDIV0
#define ENET_SERDES_PLL_FBDIV1
#define ENET_SERDES_PLL_FBDIV2
#define ENET_SERDES_PLL_HRATE0
#define ENET_SERDES_PLL_HRATE1
#define ENET_SERDES_PLL_HRATE2
#define ENET_SERDES_PLL_HRATE3

#define ENET_SERDES_0_CTRL_CFG
#define ENET_SERDES_CTRL_SDET_0
#define ENET_SERDES_CTRL_SDET_1
#define ENET_SERDES_CTRL_SDET_2
#define ENET_SERDES_CTRL_SDET_3
#define ENET_SERDES_CTRL_EMPH_0
#define ENET_SERDES_CTRL_EMPH_0_SHIFT
#define ENET_SERDES_CTRL_EMPH_1
#define ENET_SERDES_CTRL_EMPH_1_SHIFT
#define ENET_SERDES_CTRL_EMPH_2
#define ENET_SERDES_CTRL_EMPH_2_SHIFT
#define ENET_SERDES_CTRL_EMPH_3
#define ENET_SERDES_CTRL_EMPH_3_SHIFT
#define ENET_SERDES_CTRL_LADJ_0
#define ENET_SERDES_CTRL_LADJ_0_SHIFT
#define ENET_SERDES_CTRL_LADJ_1
#define ENET_SERDES_CTRL_LADJ_1_SHIFT
#define ENET_SERDES_CTRL_LADJ_2
#define ENET_SERDES_CTRL_LADJ_2_SHIFT
#define ENET_SERDES_CTRL_LADJ_3
#define ENET_SERDES_CTRL_LADJ_3_SHIFT
#define ENET_SERDES_CTRL_RXITERM_0
#define ENET_SERDES_CTRL_RXITERM_1
#define ENET_SERDES_CTRL_RXITERM_2
#define ENET_SERDES_CTRL_RXITERM_3

#define ENET_SERDES_0_TEST_CFG
#define ENET_SERDES_TEST_MD_0
#define ENET_SERDES_TEST_MD_0_SHIFT
#define ENET_SERDES_TEST_MD_1
#define ENET_SERDES_TEST_MD_1_SHIFT
#define ENET_SERDES_TEST_MD_2
#define ENET_SERDES_TEST_MD_2_SHIFT
#define ENET_SERDES_TEST_MD_3
#define ENET_SERDES_TEST_MD_3_SHIFT

#define ENET_TEST_MD_NO_LOOPBACK
#define ENET_TEST_MD_EWRAP
#define ENET_TEST_MD_PAD_LOOPBACK
#define ENET_TEST_MD_REV_LOOPBACK

#define ENET_SERDES_1_PLL_CFG
#define ENET_SERDES_1_CTRL_CFG
#define ENET_SERDES_1_TEST_CFG

#define ENET_RGMII_CFG_REG

#define ESR_INT_SIGNALS
#define ESR_INT_SIGNALS_ALL
#define ESR_INT_SIGNALS_P0_BITS
#define ESR_INT_SIGNALS_P1_BITS
#define ESR_INT_SRDY0_P0
#define ESR_INT_DET0_P0
#define ESR_INT_SRDY0_P1
#define ESR_INT_DET0_P1
#define ESR_INT_XSRDY_P0
#define ESR_INT_XDP_P0_CH3
#define ESR_INT_XDP_P0_CH2
#define ESR_INT_XDP_P0_CH1
#define ESR_INT_XDP_P0_CH0
#define ESR_INT_XSRDY_P1
#define ESR_INT_XDP_P1_CH3
#define ESR_INT_XDP_P1_CH2
#define ESR_INT_XDP_P1_CH1
#define ESR_INT_XDP_P1_CH0
#define ESR_INT_SLOSS_P1_CH3
#define ESR_INT_SLOSS_P1_CH2
#define ESR_INT_SLOSS_P1_CH1
#define ESR_INT_SLOSS_P1_CH0
#define ESR_INT_SLOSS_P0_CH3
#define ESR_INT_SLOSS_P0_CH2
#define ESR_INT_SLOSS_P0_CH1
#define ESR_INT_SLOSS_P0_CH0

#define ESR_DEBUG_SEL
#define ESR_DEBUG_SEL_VAL

/* SerDes registers behind MIF */
#define NIU_ESR_DEV_ADDR
#define ESR_BASE

#define ESR_RXTX_COMM_CTRL_L
#define ESR_RXTX_COMM_CTRL_H

#define ESR_RXTX_RESET_CTRL_L
#define ESR_RXTX_RESET_CTRL_H

#define ESR_RX_POWER_CTRL_L
#define ESR_RX_POWER_CTRL_H

#define ESR_TX_POWER_CTRL_L
#define ESR_TX_POWER_CTRL_H

#define ESR_MISC_POWER_CTRL_L
#define ESR_MISC_POWER_CTRL_H

#define ESR_RXTX_CTRL_L(CHAN)
#define ESR_RXTX_CTRL_H(CHAN)
#define ESR_RXTX_CTRL_BIASCNTL
#define ESR_RXTX_CTRL_RESV1
#define ESR_RXTX_CTRL_TDENFIFO
#define ESR_RXTX_CTRL_TDWS20
#define ESR_RXTX_CTRL_VMUXLO
#define ESR_RXTX_CTRL_VMUXLO_SHIFT
#define ESR_RXTX_CTRL_VPULSELO
#define ESR_RXTX_CTRL_VPULSELO_SHIFT
#define ESR_RXTX_CTRL_RESV2
#define ESR_RXTX_CTRL_RESV3
#define ESR_RXTX_CTRL_RXPRESWIN
#define ESR_RXTX_CTRL_RXPRESWIN_SHIFT
#define ESR_RXTX_CTRL_RESV4
#define ESR_RXTX_CTRL_RISEFALL
#define ESR_RXTX_CTRL_RISEFALL_SHIFT
#define ESR_RXTX_CTRL_RESV5
#define ESR_RXTX_CTRL_ENSTRETCH

#define ESR_RXTX_TUNING_L(CHAN)
#define ESR_RXTX_TUNING_H(CHAN)

#define ESR_RX_SYNCCHAR_L(CHAN)
#define ESR_RX_SYNCCHAR_H(CHAN)

#define ESR_RXTX_TEST_L(CHAN)
#define ESR_RXTX_TEST_H(CHAN)

#define ESR_GLUE_CTRL0_L(CHAN)
#define ESR_GLUE_CTRL0_H(CHAN)
#define ESR_GLUE_CTRL0_RESV1
#define ESR_GLUE_CTRL0_BLTIME
#define ESR_GLUE_CTRL0_BLTIME_SHIFT
#define ESR_GLUE_CTRL0_RESV2
#define ESR_GLUE_CTRL0_RXLOS_TEST
#define ESR_GLUE_CTRL0_RESV3
#define ESR_GLUE_CTRL0_RXLOSENAB
#define ESR_GLUE_CTRL0_FASTRESYNC
#define ESR_GLUE_CTRL0_SRATE
#define ESR_GLUE_CTRL0_SRATE_SHIFT
#define ESR_GLUE_CTRL0_THCNT
#define ESR_GLUE_CTRL0_THCNT_SHIFT

#define BLTIME_64_CYCLES
#define BLTIME_128_CYCLES
#define BLTIME_256_CYCLES
#define BLTIME_300_CYCLES
#define BLTIME_384_CYCLES
#define BLTIME_512_CYCLES
#define BLTIME_1024_CYCLES
#define BLTIME_2048_CYCLES

#define ESR_GLUE_CTRL1_L(CHAN)
#define ESR_GLUE_CTRL1_H(CHAN)
#define ESR_RXTX_TUNING1_L(CHAN)
#define ESR_RXTX_TUNING1_H(CHAN)
#define ESR_RXTX_TUNING2_L(CHAN)
#define ESR_RXTX_TUNING2_H(CHAN)
#define ESR_RXTX_TUNING3_L(CHAN)
#define ESR_RXTX_TUNING3_H(CHAN)

#define NIU_ESR2_DEV_ADDR
#define ESR2_BASE

#define ESR2_TI_PLL_CFG_L
#define ESR2_TI_PLL_CFG_H
#define PLL_CFG_STD
#define PLL_CFG_STD_SHIFT
#define PLL_CFG_LD
#define PLL_CFG_LD_SHIFT
#define PLL_CFG_MPY
#define PLL_CFG_MPY_SHIFT
#define PLL_CFG_MPY_4X
#define PLL_CFG_MPY_5X
#define PLL_CFG_MPY_6X
#define PLL_CFG_MPY_8X
#define PLL_CFG_MPY_10X
#define PLL_CFG_MPY_12X
#define PLL_CFG_MPY_12P5X
#define PLL_CFG_ENPLL

#define ESR2_TI_PLL_STS_L
#define ESR2_TI_PLL_STS_H
#define PLL_STS_LOCK

#define ESR2_TI_PLL_TEST_CFG_L
#define ESR2_TI_PLL_TEST_CFG_H
#define PLL_TEST_INVPATT
#define PLL_TEST_RATE
#define PLL_TEST_RATE_SHIFT
#define PLL_TEST_CFG_ENBSAC
#define PLL_TEST_CFG_ENBSRX
#define PLL_TEST_CFG_ENBSTX
#define PLL_TEST_CFG_LOOPBACK_PAD
#define PLL_TEST_CFG_LOOPBACK_CML_DIS
#define PLL_TEST_CFG_LOOPBACK_CML_EN
#define PLL_TEST_CFG_CLKBYP
#define PLL_TEST_CFG_CLKBYP_SHIFT
#define PLL_TEST_CFG_EN_RXPATT
#define PLL_TEST_CFG_EN_TXPATT
#define PLL_TEST_CFG_TPATT
#define PLL_TEST_CFG_TPATT_SHIFT

#define ESR2_TI_PLL_TX_CFG_L(CHAN)
#define ESR2_TI_PLL_TX_CFG_H(CHAN)
#define PLL_TX_CFG_RDTCT
#define PLL_TX_CFG_RDTCT_SHIFT
#define PLL_TX_CFG_ENIDL
#define PLL_TX_CFG_BSTX
#define PLL_TX_CFG_ENFTP
#define PLL_TX_CFG_DE
#define PLL_TX_CFG_DE_SHIFT
#define PLL_TX_CFG_SWING_125MV
#define PLL_TX_CFG_SWING_250MV
#define PLL_TX_CFG_SWING_500MV
#define PLL_TX_CFG_SWING_625MV
#define PLL_TX_CFG_SWING_750MV
#define PLL_TX_CFG_SWING_1000MV
#define PLL_TX_CFG_SWING_1250MV
#define PLL_TX_CFG_SWING_1375MV
#define PLL_TX_CFG_CM
#define PLL_TX_CFG_INVPAIR
#define PLL_TX_CFG_RATE
#define PLL_TX_CFG_RATE_SHIFT
#define PLL_TX_CFG_RATE_FULL
#define PLL_TX_CFG_RATE_HALF
#define PLL_TX_CFG_RATE_QUAD
#define PLL_TX_CFG_BUSWIDTH
#define PLL_TX_CFG_BUSWIDTH_SHIFT
#define PLL_TX_CFG_ENTEST
#define PLL_TX_CFG_ENTX

#define ESR2_TI_PLL_TX_STS_L(CHAN)
#define ESR2_TI_PLL_TX_STS_H(CHAN)
#define PLL_TX_STS_RDTCTIP
#define PLL_TX_STS_TESTFAIL

#define ESR2_TI_PLL_RX_CFG_L(CHAN)
#define ESR2_TI_PLL_RX_CFG_H(CHAN)
#define PLL_RX_CFG_BSINRXN
#define PLL_RX_CFG_BSINRXP
#define PLL_RX_CFG_EQ_MAX_LF
#define PLL_RX_CFG_EQ_LP_ADAPTIVE
#define PLL_RX_CFG_EQ_LP_1084MHZ
#define PLL_RX_CFG_EQ_LP_805MHZ
#define PLL_RX_CFG_EQ_LP_573MHZ
#define PLL_RX_CFG_EQ_LP_402MHZ
#define PLL_RX_CFG_EQ_LP_304MHZ
#define PLL_RX_CFG_EQ_LP_216MHZ
#define PLL_RX_CFG_EQ_LP_156MHZ
#define PLL_RX_CFG_EQ_LP_135MHZ
#define PLL_RX_CFG_EQ_SHIFT
#define PLL_RX_CFG_CDR
#define PLL_RX_CFG_CDR_SHIFT
#define PLL_RX_CFG_LOS_DIS
#define PLL_RX_CFG_LOS_HTHRESH
#define PLL_RX_CFG_LOS_LTHRESH
#define PLL_RX_CFG_ALIGN_DIS
#define PLL_RX_CFG_ALIGN_ENA
#define PLL_RX_CFG_ALIGN_JOG
#define PLL_RX_CFG_TERM_VDDT
#define PLL_RX_CFG_TERM_0P8VDDT
#define PLL_RX_CFG_TERM_FLOAT
#define PLL_RX_CFG_INVPAIR
#define PLL_RX_CFG_RATE
#define PLL_RX_CFG_RATE_SHIFT
#define PLL_RX_CFG_RATE_FULL
#define PLL_RX_CFG_RATE_HALF
#define PLL_RX_CFG_RATE_QUAD
#define PLL_RX_CFG_BUSWIDTH
#define PLL_RX_CFG_BUSWIDTH_SHIFT
#define PLL_RX_CFG_ENTEST
#define PLL_RX_CFG_ENRX

#define ESR2_TI_PLL_RX_STS_L(CHAN)
#define ESR2_TI_PLL_RX_STS_H(CHAN)
#define PLL_RX_STS_CRCIDTCT
#define PLL_RX_STS_CWDTCT
#define PLL_RX_STS_BSRXN
#define PLL_RX_STS_BSRXP
#define PLL_RX_STS_LOSDTCT
#define PLL_RX_STS_ODDCG
#define PLL_RX_STS_SYNC
#define PLL_RX_STS_TESTFAIL

#define ENET_VLAN_TBL(IDX)
#define ENET_VLAN_TBL_PARITY1
#define ENET_VLAN_TBL_PARITY0
#define ENET_VLAN_TBL_VPR
#define ENET_VLAN_TBL_VLANRDCTBLN
#define ENET_VLAN_TBL_SHIFT(PORT)

#define ENET_VLAN_TBL_NUM_ENTRIES

#define FFLP_VLAN_PAR_ERR
#define FFLP_VLAN_PAR_ERR_ERR
#define FFLP_VLAN_PAR_ERR_M_ERR
#define FFLP_VLAN_PAR_ERR_ADDR
#define FFLP_VLAN_PAR_ERR_DATA

#define L2_CLS(IDX)
#define L2_CLS_VLD
#define L2_CLS_ETYPE
#define L2_CLS_ETYPE_SHIFT

#define L3_CLS(IDX)
#define L3_CLS_VALID
#define L3_CLS_IPVER
#define L3_CLS_PID
#define L3_CLS_PID_SHIFT
#define L3_CLS_TOSMASK
#define L3_CLS_TOSMASK_SHIFT
#define L3_CLS_TOS
#define L3_CLS_TOS_SHIFT

#define TCAM_KEY(IDX)
#define TCAM_KEY_DISC
#define TCAM_KEY_TSEL
#define TCAM_KEY_IPADDR

#define TCAM_KEY_0
#define TCAM_KEY_0_KEY

#define TCAM_KEY_1
#define TCAM_KEY_1_KEY

#define TCAM_KEY_2
#define TCAM_KEY_2_KEY

#define TCAM_KEY_3
#define TCAM_KEY_3_KEY

#define TCAM_KEY_MASK_0
#define TCAM_KEY_MASK_0_KEY_SEL

#define TCAM_KEY_MASK_1
#define TCAM_KEY_MASK_1_KEY_SEL

#define TCAM_KEY_MASK_2
#define TCAM_KEY_MASK_2_KEY_SEL

#define TCAM_KEY_MASK_3
#define TCAM_KEY_MASK_3_KEY_SEL

#define TCAM_CTL
#define TCAM_CTL_RWC
#define TCAM_CTL_RWC_TCAM_WRITE
#define TCAM_CTL_RWC_TCAM_READ
#define TCAM_CTL_RWC_TCAM_COMPARE
#define TCAM_CTL_RWC_RAM_WRITE
#define TCAM_CTL_RWC_RAM_READ
#define TCAM_CTL_STAT
#define TCAM_CTL_MATCH
#define TCAM_CTL_LOC

#define TCAM_ERR
#define TCAM_ERR_ERR
#define TCAM_ERR_P_ECC
#define TCAM_ERR_MULT
#define TCAM_ERR_ADDR
#define TCAM_ERR_SYNDROME

#define HASH_LOOKUP_ERR_LOG1
#define HASH_LOOKUP_ERR_LOG1_ERR
#define HASH_LOOKUP_ERR_LOG1_MULT_LK
#define HASH_LOOKUP_ERR_LOG1_CU
#define HASH_LOOKUP_ERR_LOG1_MULT_BIT

#define HASH_LOOKUP_ERR_LOG2
#define HASH_LOOKUP_ERR_LOG2_H1
#define HASH_LOOKUP_ERR_LOG2_SUBAREA
#define HASH_LOOKUP_ERR_LOG2_SYNDROME

#define FFLP_CFG_1
#define FFLP_CFG_1_TCAM_DIS
#define FFLP_CFG_1_PIO_DBG_SEL
#define FFLP_CFG_1_PIO_FIO_RST
#define FFLP_CFG_1_PIO_FIO_LAT
#define FFLP_CFG_1_CAMLAT
#define FFLP_CFG_1_CAMLAT_SHIFT
#define FFLP_CFG_1_CAMRATIO
#define FFLP_CFG_1_CAMRATIO_SHIFT
#define FFLP_CFG_1_FCRAMRATIO
#define FFLP_CFG_1_FCRAMRATIO_SHIFT
#define FFLP_CFG_1_FCRAMOUTDR_MASK
#define FFLP_CFG_1_FCRAMOUTDR_NORMAL
#define FFLP_CFG_1_FCRAMOUTDR_STRONG
#define FFLP_CFG_1_FCRAMOUTDR_WEAK
#define FFLP_CFG_1_FCRAMQS
#define FFLP_CFG_1_ERRORDIS
#define FFLP_CFG_1_FFLPINITDONE
#define FFLP_CFG_1_LLCSNAP

#define DEFAULT_FCRAMRATIO

#define DEFAULT_TCAM_LATENCY
#define DEFAULT_TCAM_ACCESS_RATIO

#define TCP_CFLAG_MSK
#define TCP_CFLAG_MSK_MASK

#define FCRAM_REF_TMR
#define FCRAM_REF_TMR_MAX
#define FCRAM_REF_TMR_MAX_SHIFT
#define FCRAM_REF_TMR_MIN
#define FCRAM_REF_TMR_MIN_SHIFT

#define DEFAULT_FCRAM_REFRESH_MAX
#define DEFAULT_FCRAM_REFRESH_MIN

#define FCRAM_FIO_ADDR
#define FCRAM_FIO_ADDR_ADDR

#define FCRAM_FIO_DAT
#define FCRAM_FIO_DAT_DATA

#define FCRAM_ERR_TST0
#define FCRAM_ERR_TST0_SYND

#define FCRAM_ERR_TST1
#define FCRAM_ERR_TST1_DAT

#define FCRAM_ERR_TST2
#define FCRAM_ERR_TST2_DAT

#define FFLP_ERR_MASK
#define FFLP_ERR_MASK_HSH_TBL_DAT
#define FFLP_ERR_MASK_HSH_TBL_LKUP
#define FFLP_ERR_MASK_TCAM
#define FFLP_ERR_MASK_VLAN

#define FFLP_DBG_TRAIN_VCT
#define FFLP_DBG_TRAIN_VCT_VECTOR

#define FCRAM_PHY_RD_LAT
#define FCRAM_PHY_RD_LAT_LAT

/* Ethernet TCAM format */
#define TCAM_ETHKEY0_RESV1
#define TCAM_ETHKEY0_CLASS_CODE
#define TCAM_ETHKEY0_CLASS_CODE_SHIFT
#define TCAM_ETHKEY0_RESV2
#define TCAM_ETHKEY1_FRAME_BYTE0_7(NUM)
#define TCAM_ETHKEY2_FRAME_BYTE8
#define TCAM_ETHKEY2_FRAME_BYTE8_SHIFT
#define TCAM_ETHKEY2_FRAME_BYTE9
#define TCAM_ETHKEY2_FRAME_BYTE9_SHIFT
#define TCAM_ETHKEY2_FRAME_BYTE10
#define TCAM_ETHKEY2_FRAME_BYTE10_SHIFT
#define TCAM_ETHKEY2_FRAME_RESV
#define TCAM_ETHKEY3_FRAME_RESV

/* IPV4 TCAM format */
#define TCAM_V4KEY0_RESV1
#define TCAM_V4KEY0_CLASS_CODE
#define TCAM_V4KEY0_CLASS_CODE_SHIFT
#define TCAM_V4KEY0_RESV2
#define TCAM_V4KEY1_L2RDCNUM
#define TCAM_V4KEY1_L2RDCNUM_SHIFT
#define TCAM_V4KEY1_NOPORT
#define TCAM_V4KEY1_RESV
#define TCAM_V4KEY2_RESV
#define TCAM_V4KEY2_TOS
#define TCAM_V4KEY2_TOS_SHIFT
#define TCAM_V4KEY2_PROTO
#define TCAM_V4KEY2_PROTO_SHIFT
#define TCAM_V4KEY2_PORT_SPI
#define TCAM_V4KEY2_PORT_SPI_SHIFT
#define TCAM_V4KEY3_SADDR
#define TCAM_V4KEY3_SADDR_SHIFT
#define TCAM_V4KEY3_DADDR
#define TCAM_V4KEY3_DADDR_SHIFT

/* IPV6 TCAM format */
#define TCAM_V6KEY0_RESV1
#define TCAM_V6KEY0_CLASS_CODE
#define TCAM_V6KEY0_CLASS_CODE_SHIFT
#define TCAM_V6KEY0_RESV2
#define TCAM_V6KEY1_L2RDCNUM
#define TCAM_V6KEY1_L2RDCNUM_SHIFT
#define TCAM_V6KEY1_NOPORT
#define TCAM_V6KEY1_RESV
#define TCAM_V6KEY1_TOS
#define TCAM_V6KEY1_TOS_SHIFT
#define TCAM_V6KEY1_NEXT_HDR
#define TCAM_V6KEY1_NEXT_HDR_SHIFT
#define TCAM_V6KEY1_PORT_SPI
#define TCAM_V6KEY1_PORT_SPI_SHIFT
#define TCAM_V6KEY2_ADDR_HIGH
#define TCAM_V6KEY3_ADDR_LOW

#define TCAM_ASSOCDATA_SYNDROME
#define TCAM_ASSOCDATA_SYNDROME_SHIFT
#define TCAM_ASSOCDATA_ZFID
#define TCAM_ASSOCDATA_ZFID_SHIFT
#define TCAM_ASSOCDATA_V4_ECC_OK
#define TCAM_ASSOCDATA_DISC
#define TCAM_ASSOCDATA_TRES_MASK
#define TCAM_ASSOCDATA_TRES_USE_L2RDC
#define TCAM_ASSOCDATA_TRES_USE_OFFSET
#define TCAM_ASSOCDATA_TRES_OVR_RDC
#define TCAM_ASSOCDATA_TRES_OVR_RDC_OFF
#define TCAM_ASSOCDATA_RDCTBL
#define TCAM_ASSOCDATA_RDCTBL_SHIFT
#define TCAM_ASSOCDATA_OFFSET
#define TCAM_ASSOCDATA_OFFSET_SHIFT
#define TCAM_ASSOCDATA_ZFVLD
#define TCAM_ASSOCDATA_AGE

#define FLOW_KEY(IDX)
#define FLOW_KEY_PORT
#define FLOW_KEY_L2DA
#define FLOW_KEY_VLAN
#define FLOW_KEY_IPSA
#define FLOW_KEY_IPDA
#define FLOW_KEY_PROTO
#define FLOW_KEY_L4_0
#define FLOW_KEY_L4_0_SHIFT
#define FLOW_KEY_L4_1
#define FLOW_KEY_L4_1_SHIFT

#define FLOW_KEY_L4_NONE
#define FLOW_KEY_L4_RESV
#define FLOW_KEY_L4_BYTE12
#define FLOW_KEY_L4_BYTE56

#define H1POLY
#define H1POLY_INITVAL

#define H2POLY
#define H2POLY_INITVAL

#define FLW_PRT_SEL(IDX)
#define FLW_PRT_SEL_EXT
#define FLW_PRT_SEL_MASK
#define FLW_PRT_SEL_MASK_SHIFT
#define FLW_PRT_SEL_BASE
#define FLW_PRT_SEL_BASE_SHIFT

#define HASH_TBL_ADDR(IDX)
#define HASH_TBL_ADDR_AUTOINC
#define HASH_TBL_ADDR_ADDR

#define HASH_TBL_DATA(IDX)
#define HASH_TBL_DATA_DATA

/* FCRAM hash table entries are up to 8 64-bit words in size.
 * The layout of each entry is determined by the settings in the
 * first word, which is the header.
 *
 * The indexing is controllable per partition (there is one partition
 * per RDC group, thus a total of eight) using the BASE and MASK fields
 * of FLW_PRT_SEL above.
 */
#define FCRAM_SIZE
#define FCRAM_NUM_PARTITIONS

/* Generic HASH entry header, used for all non-optimized formats.  */
#define HASH_HEADER_FMT
#define HASH_HEADER_EXT
#define HASH_HEADER_VALID
#define HASH_HEADER_RESVD
#define HASH_HEADER_L2_DADDR
#define HASH_HEADER_L2_DADDR_SHIFT
#define HASH_HEADER_VLAN
#define HASH_HEADER_VLAN_SHIFT

/* Optimized format, just a header with a special layout defined below.
 * Set FMT and EXT both to zero to indicate this layout is being used.
 */
#define HASH_OPT_HEADER_FMT
#define HASH_OPT_HEADER_EXT
#define HASH_OPT_HEADER_VALID
#define HASH_OPT_HEADER_RDCOFF
#define HASH_OPT_HEADER_RDCOFF_SHIFT
#define HASH_OPT_HEADER_HASH2
#define HASH_OPT_HEADER_HASH2_SHIFT
#define HASH_OPT_HEADER_RESVD
#define HASH_OPT_HEADER_USERINFO
#define HASH_OPT_HEADER_USERINFO_SHIFT

/* Port and protocol word used for ipv4 and ipv6 layouts.  */
#define HASH_PORT_DPORT
#define HASH_PORT_DPORT_SHIFT
#define HASH_PORT_SPORT
#define HASH_PORT_SPORT_SHIFT
#define HASH_PORT_PROTO
#define HASH_PORT_PROTO_SHIFT
#define HASH_PORT_PORT_OFF
#define HASH_PORT_PORT_OFF_SHIFT
#define HASH_PORT_PORT_RESV

/* Action word used for ipv4 and ipv6 layouts.  */
#define HASH_ACTION_RESV1
#define HASH_ACTION_RDCOFF
#define HASH_ACTION_RDCOFF_SHIFT
#define HASH_ACTION_ZFVALID
#define HASH_ACTION_RESV2
#define HASH_ACTION_ZFID
#define HASH_ACTION_ZFID_SHIFT
#define HASH_ACTION_RESV3
#define HASH_ACTION_USERINFO
#define HASH_ACTION_USERINFO_SHIFT

/* IPV4 address word.  Addresses are in network endian. */
#define HASH_IP4ADDR_SADDR
#define HASH_IP4ADDR_SADDR_SHIFT
#define HASH_IP4ADDR_DADDR
#define HASH_IP4ADDR_DADDR_SHIFT

/* IPV6 address layout is 4 words, first two are saddr, next two
 * are daddr.  Addresses are in network endian.
 */

struct fcram_hash_opt {};

/* EXT=1, FMT=0 */
struct fcram_hash_ipv4 {};

/* EXT=1, FMT=1 */
struct fcram_hash_ipv6 {};

#define HASH_TBL_DATA_LOG(IDX)
#define HASH_TBL_DATA_LOG_ERR
#define HASH_TBL_DATA_LOG_ADDR
#define HASH_TBL_DATA_LOG_SYNDROME

#define RX_DMA_CK_DIV
#define RX_DMA_CK_DIV_CNT

#define DEF_RDC(IDX)
#define DEF_RDC_VAL

#define PT_DRR_WT(IDX)
#define PT_DRR_WT_VAL

#define PT_DRR_WEIGHT_DEFAULT_10G
#define PT_DRR_WEIGHT_DEFAULT_1G

#define PT_USE(IDX)
#define PT_USE_CNT

#define RED_RAN_INIT
#define RED_RAN_INIT_OPMODE
#define RED_RAN_INIT_VAL

#define RX_ADDR_MD
#define RX_ADDR_MD_DBG_PT_MUX_SEL
#define RX_ADDR_MD_RAM_ACC
#define RX_ADDR_MD_MODE32

#define RDMC_PRE_PAR_ERR
#define RDMC_PRE_PAR_ERR_ERR
#define RDMC_PRE_PAR_ERR_MERR
#define RDMC_PRE_PAR_ERR_ADDR

#define RDMC_SHA_PAR_ERR
#define RDMC_SHA_PAR_ERR_ERR
#define RDMC_SHA_PAR_ERR_MERR
#define RDMC_SHA_PAR_ERR_ADDR

#define RDMC_MEM_ADDR
#define RDMC_MEM_ADDR_PRE_SHAD
#define RDMC_MEM_ADDR_ADDR

#define RDMC_MEM_DAT0
#define RDMC_MEM_DAT0_DATA

#define RDMC_MEM_DAT1
#define RDMC_MEM_DAT1_DATA

#define RDMC_MEM_DAT2
#define RDMC_MEM_DAT2_DATA

#define RDMC_MEM_DAT3
#define RDMC_MEM_DAT3_DATA

#define RDMC_MEM_DAT4
#define RDMC_MEM_DAT4_DATA

#define RX_CTL_DAT_FIFO_STAT
#define RX_CTL_DAT_FIFO_STAT_ID_MISMATCH
#define RX_CTL_DAT_FIFO_STAT_ZCP_EOP_ERR
#define RX_CTL_DAT_FIFO_STAT_IPP_EOP_ERR

#define RX_CTL_DAT_FIFO_MASK
#define RX_CTL_DAT_FIFO_MASK_ID_MISMATCH
#define RX_CTL_DAT_FIFO_MASK_ZCP_EOP_ERR
#define RX_CTL_DAT_FIFO_MASK_IPP_EOP_ERR

#define RDMC_TRAINING_VECTOR
#define RDMC_TRAINING_VECTOR_TRAINING_VECTOR

#define RX_CTL_DAT_FIFO_STAT_DBG
#define RX_CTL_DAT_FIFO_STAT_DBG_ID_MISMATCH
#define RX_CTL_DAT_FIFO_STAT_DBG_ZCP_EOP_ERR
#define RX_CTL_DAT_FIFO_STAT_DBG_IPP_EOP_ERR

#define RDC_TBL(TBL,SLOT)
#define RDC_TBL_RDC

#define RX_LOG_PAGE_VLD(IDX)
#define RX_LOG_PAGE_VLD_FUNC
#define RX_LOG_PAGE_VLD_FUNC_SHIFT
#define RX_LOG_PAGE_VLD_PAGE1
#define RX_LOG_PAGE_VLD_PAGE0

#define RX_LOG_MASK1(IDX)
#define RX_LOG_MASK1_MASK

#define RX_LOG_VAL1(IDX)
#define RX_LOG_VAL1_VALUE

#define RX_LOG_MASK2(IDX)
#define RX_LOG_MASK2_MASK

#define RX_LOG_VAL2(IDX)
#define RX_LOG_VAL2_VALUE

#define RX_LOG_PAGE_RELO1(IDX)
#define RX_LOG_PAGE_RELO1_RELO

#define RX_LOG_PAGE_RELO2(IDX)
#define RX_LOG_PAGE_RELO2_RELO

#define RX_LOG_PAGE_HDL(IDX)
#define RX_LOG_PAGE_HDL_HANDLE

#define TX_LOG_PAGE_VLD(IDX)
#define TX_LOG_PAGE_VLD_FUNC
#define TX_LOG_PAGE_VLD_FUNC_SHIFT
#define TX_LOG_PAGE_VLD_PAGE1
#define TX_LOG_PAGE_VLD_PAGE0

#define TX_LOG_MASK1(IDX)
#define TX_LOG_MASK1_MASK

#define TX_LOG_VAL1(IDX)
#define TX_LOG_VAL1_VALUE

#define TX_LOG_MASK2(IDX)
#define TX_LOG_MASK2_MASK

#define TX_LOG_VAL2(IDX)
#define TX_LOG_VAL2_VALUE

#define TX_LOG_PAGE_RELO1(IDX)
#define TX_LOG_PAGE_RELO1_RELO

#define TX_LOG_PAGE_RELO2(IDX)
#define TX_LOG_PAGE_RELO2_RELO

#define TX_LOG_PAGE_HDL(IDX)
#define TX_LOG_PAGE_HDL_HANDLE

#define TX_ADDR_MD
#define TX_ADDR_MD_MODE32

#define RDC_RED_PARA(IDX)
#define RDC_RED_PARA_THRE_SYN
#define RDC_RED_PARA_THRE_SYN_SHIFT
#define RDC_RED_PARA_WIN_SYN
#define RDC_RED_PARA_WIN_SYN_SHIFT
#define RDC_RED_PARA_THRE
#define RDC_RED_PARA_THRE_SHIFT
#define RDC_RED_PARA_WIN
#define RDC_RED_PARA_WIN_SHIFT

#define RED_DIS_CNT(IDX)
#define RED_DIS_CNT_OFLOW
#define RED_DIS_CNT_COUNT

#define IPP_CFIG
#define IPP_CFIG_SOFT_RST
#define IPP_CFIG_IP_MAX_PKT
#define IPP_CFIG_IP_MAX_PKT_SHIFT
#define IPP_CFIG_FFLP_CS_PIO_W
#define IPP_CFIG_PFIFO_PIO_W
#define IPP_CFIG_DFIFO_PIO_W
#define IPP_CFIG_CKSUM_EN
#define IPP_CFIG_DROP_BAD_CRC
#define IPP_CFIG_DFIFO_ECC_EN
#define IPP_CFIG_DEBUG_BUS_OUT_EN
#define IPP_CFIG_IPP_ENABLE

#define IPP_PKT_DIS
#define IPP_PKT_DIS_COUNT

#define IPP_BAD_CS_CNT
#define IPP_BAD_CS_CNT_COUNT

#define IPP_ECC
#define IPP_ECC_COUNT

#define IPP_INT_STAT
#define IPP_INT_STAT_SOP_MISS
#define IPP_INT_STAT_EOP_MISS
#define IPP_INT_STAT_DFIFO_UE
#define IPP_INT_STAT_DFIFO_CE
#define IPP_INT_STAT_DFIFO_ECC
#define IPP_INT_STAT_DFIFO_ECC_IDX
#define IPP_INT_STAT_PFIFO_PERR
#define IPP_INT_STAT_ECC_ERR_MAX
#define IPP_INT_STAT_PFIFO_ERR_IDX
#define IPP_INT_STAT_PFIFO_OVER
#define IPP_INT_STAT_PFIFO_UND
#define IPP_INT_STAT_BAD_CS_MX
#define IPP_INT_STAT_PKT_DIS_MX
#define IPP_INT_STAT_ALL

#define IPP_MSK
#define IPP_MSK_ECC_ERR_MX
#define IPP_MSK_DFIFO_EOP_SOP
#define IPP_MSK_DFIFO_UC
#define IPP_MSK_PFIFO_PAR
#define IPP_MSK_PFIFO_OVER
#define IPP_MSK_PFIFO_UND
#define IPP_MSK_BAD_CS
#define IPP_MSK_PKT_DIS_CNT
#define IPP_MSK_ALL

#define IPP_PFIFO_RD0
#define IPP_PFIFO_RD0_DATA

#define IPP_PFIFO_RD1
#define IPP_PFIFO_RD1_DATA

#define IPP_PFIFO_RD2
#define IPP_PFIFO_RD2_DATA

#define IPP_PFIFO_RD3
#define IPP_PFIFO_RD3_DATA

#define IPP_PFIFO_RD4
#define IPP_PFIFO_RD4_DATA

#define IPP_PFIFO_WR0
#define IPP_PFIFO_WR0_DATA

#define IPP_PFIFO_WR1
#define IPP_PFIFO_WR1_DATA

#define IPP_PFIFO_WR2
#define IPP_PFIFO_WR2_DATA

#define IPP_PFIFO_WR3
#define IPP_PFIFO_WR3_DATA

#define IPP_PFIFO_WR4
#define IPP_PFIFO_WR4_DATA

#define IPP_PFIFO_RD_PTR
#define IPP_PFIFO_RD_PTR_PTR

#define IPP_PFIFO_WR_PTR
#define IPP_PFIFO_WR_PTR_PTR

#define IPP_DFIFO_RD0
#define IPP_DFIFO_RD0_DATA

#define IPP_DFIFO_RD1
#define IPP_DFIFO_RD1_DATA

#define IPP_DFIFO_RD2
#define IPP_DFIFO_RD2_DATA

#define IPP_DFIFO_RD3
#define IPP_DFIFO_RD3_DATA

#define IPP_DFIFO_RD4
#define IPP_DFIFO_RD4_DATA

#define IPP_DFIFO_WR0
#define IPP_DFIFO_WR0_DATA

#define IPP_DFIFO_WR1
#define IPP_DFIFO_WR1_DATA

#define IPP_DFIFO_WR2
#define IPP_DFIFO_WR2_DATA

#define IPP_DFIFO_WR3
#define IPP_DFIFO_WR3_DATA

#define IPP_DFIFO_WR4
#define IPP_DFIFO_WR4_DATA

#define IPP_DFIFO_RD_PTR
#define IPP_DFIFO_RD_PTR_PTR

#define IPP_DFIFO_WR_PTR
#define IPP_DFIFO_WR_PTR_PTR

#define IPP_SM
#define IPP_SM_SM

#define IPP_CS_STAT
#define IPP_CS_STAT_BCYC_CNT
#define IPP_CS_STAT_IP_LEN
#define IPP_CS_STAT_CS_FAIL
#define IPP_CS_STAT_TERM
#define IPP_CS_STAT_BAD_NUM
#define IPP_CS_STAT_CS_STATE

#define IPP_FFLP_CS_INFO
#define IPP_FFLP_CS_INFO_PKT_ID
#define IPP_FFLP_CS_INFO_L4_PROTO
#define IPP_FFLP_CS_INFO_V4_HD_LEN
#define IPP_FFLP_CS_INFO_L3_VER
#define IPP_FFLP_CS_INFO_L2_OP

#define IPP_DBG_SEL
#define IPP_DBG_SEL_SEL

#define IPP_DFIFO_ECC_SYND
#define IPP_DFIFO_ECC_SYND_SYND

#define IPP_DFIFO_EOP_RD_PTR
#define IPP_DFIFO_EOP_RD_PTR_PTR

#define IPP_ECC_CTL
#define IPP_ECC_CTL_DIS_DBL
#define IPP_ECC_CTL_COR_DBL
#define IPP_ECC_CTL_COR_SNG
#define IPP_ECC_CTL_COR_ALL
#define IPP_ECC_CTL_COR_1
#define IPP_ECC_CTL_COR_LST
#define IPP_ECC_CTL_COR_SND
#define IPP_ECC_CTL_COR_FSR

#define NIU_DFIFO_ENTRIES
#define ATLAS_P0_P1_DFIFO_ENTRIES
#define ATLAS_P2_P3_DFIFO_ENTRIES

#define ZCP_CFIG
#define ZCP_CFIG_ZCP_32BIT_MODE
#define ZCP_CFIG_ZCP_DEBUG_SEL
#define ZCP_CFIG_DMA_TH
#define ZCP_CFIG_ECC_CHK_DIS
#define ZCP_CFIG_PAR_CHK_DIS
#define ZCP_CFIG_DIS_BUFF_RSP_IF
#define ZCP_CFIG_DIS_BUFF_REQ_IF
#define ZCP_CFIG_ZC_ENABLE

#define ZCP_INT_STAT
#define ZCP_INT_STAT_RRFIFO_UNDERRUN
#define ZCP_INT_STAT_RRFIFO_OVERRUN
#define ZCP_INT_STAT_RSPFIFO_UNCOR_ERR
#define ZCP_INT_STAT_BUFFER_OVERFLOW
#define ZCP_INT_STAT_STAT_TBL_PERR
#define ZCP_INT_STAT_DYN_TBL_PERR
#define ZCP_INT_STAT_BUF_TBL_PERR
#define ZCP_INT_STAT_TT_PROGRAM_ERR
#define ZCP_INT_STAT_RSP_TT_INDEX_ERR
#define ZCP_INT_STAT_SLV_TT_INDEX_ERR
#define ZCP_INT_STAT_ZCP_TT_INDEX_ERR
#define ZCP_INT_STAT_CFIFO_ECC3
#define ZCP_INT_STAT_CFIFO_ECC2
#define ZCP_INT_STAT_CFIFO_ECC1
#define ZCP_INT_STAT_CFIFO_ECC0
#define ZCP_INT_STAT_ALL

#define ZCP_INT_MASK
#define ZCP_INT_MASK_RRFIFO_UNDERRUN
#define ZCP_INT_MASK_RRFIFO_OVERRUN
#define ZCP_INT_MASK_LOJ
#define ZCP_INT_MASK_RSPFIFO_UNCOR_ERR
#define ZCP_INT_MASK_BUFFER_OVERFLOW
#define ZCP_INT_MASK_STAT_TBL_PERR
#define ZCP_INT_MASK_DYN_TBL_PERR
#define ZCP_INT_MASK_BUF_TBL_PERR
#define ZCP_INT_MASK_TT_PROGRAM_ERR
#define ZCP_INT_MASK_RSP_TT_INDEX_ERR
#define ZCP_INT_MASK_SLV_TT_INDEX_ERR
#define ZCP_INT_MASK_ZCP_TT_INDEX_ERR
#define ZCP_INT_MASK_CFIFO_ECC3
#define ZCP_INT_MASK_CFIFO_ECC2
#define ZCP_INT_MASK_CFIFO_ECC1
#define ZCP_INT_MASK_CFIFO_ECC0
#define ZCP_INT_MASK_ALL

#define BAM4BUF
#define BAM4BUF_LOJ
#define BAM4BUF_EN_CK
#define BAM4BUF_IDX_END0
#define BAM4BUF_IDX_ST0
#define BAM4BUF_OFFSET0

#define BAM8BUF
#define BAM8BUF_LOJ
#define BAM8BUF_EN_CK
#define BAM8BUF_IDX_END1
#define BAM8BUF_IDX_ST1
#define BAM8BUF_OFFSET1

#define BAM16BUF
#define BAM16BUF_LOJ
#define BAM16BUF_EN_CK
#define BAM16BUF_IDX_END2
#define BAM16BUF_IDX_ST2
#define BAM16BUF_OFFSET2

#define BAM32BUF
#define BAM32BUF_LOJ
#define BAM32BUF_EN_CK
#define BAM32BUF_IDX_END3
#define BAM32BUF_IDX_ST3
#define BAM32BUF_OFFSET3

#define DST4BUF
#define DST4BUF_DS_OFFSET0

#define DST8BUF
#define DST8BUF_DS_OFFSET1

#define DST16BUF
#define DST16BUF_DS_OFFSET2

#define DST32BUF
#define DST32BUF_DS_OFFSET3

#define ZCP_RAM_DATA0
#define ZCP_RAM_DATA0_DAT0

#define ZCP_RAM_DATA1
#define ZCP_RAM_DAT10_DAT1

#define ZCP_RAM_DATA2
#define ZCP_RAM_DATA2_DAT2

#define ZCP_RAM_DATA3
#define ZCP_RAM_DATA3_DAT3

#define ZCP_RAM_DATA4
#define ZCP_RAM_DATA4_DAT4

#define ZCP_RAM_BE
#define ZCP_RAM_BE_VAL

#define ZCP_RAM_ACC
#define ZCP_RAM_ACC_BUSY
#define ZCP_RAM_ACC_READ
#define ZCP_RAM_ACC_WRITE
#define ZCP_RAM_ACC_LOJ
#define ZCP_RAM_ACC_ZFCID
#define ZCP_RAM_ACC_ZFCID_SHIFT
#define ZCP_RAM_ACC_RAM_SEL
#define ZCP_RAM_ACC_RAM_SEL_SHIFT
#define ZCP_RAM_ACC_CFIFOADDR
#define ZCP_RAM_ACC_CFIFOADDR_SHIFT

#define ZCP_RAM_SEL_BAM(INDEX)
#define ZCP_RAM_SEL_TT_STATIC
#define ZCP_RAM_SEL_TT_DYNAMIC
#define ZCP_RAM_SEL_CFIFO(PORT)

#define NIU_CFIFO_ENTRIES
#define ATLAS_P0_P1_CFIFO_ENTRIES
#define ATLAS_P2_P3_CFIFO_ENTRIES

#define CHK_BIT_DATA
#define CHK_BIT_DATA_DATA

#define RESET_CFIFO
#define RESET_CFIFO_RST(PORT)

#define CFIFO_ECC(PORT)
#define CFIFO_ECC_DIS_DBLBIT_ERR
#define CFIFO_ECC_DBLBIT_ERR
#define CFIFO_ECC_SINGLEBIT_ERR
#define CFIFO_ECC_ALL_PKT
#define CFIFO_ECC_LAST_LINE
#define CFIFO_ECC_2ND_LINE
#define CFIFO_ECC_1ST_LINE

#define ZCP_TRAINING_VECTOR
#define ZCP_TRAINING_VECTOR_VECTOR

#define ZCP_STATE_MACHINE
#define ZCP_STATE_MACHINE_SM

/* Same bits as ZCP_INT_STAT */
#define ZCP_INT_STAT_TEST

#define RXDMA_CFIG1(IDX)
#define RXDMA_CFIG1_EN
#define RXDMA_CFIG1_RST
#define RXDMA_CFIG1_QST
#define RXDMA_CFIG1_MBADDR_H

#define RXDMA_CFIG2(IDX)
#define RXDMA_CFIG2_MBADDR_L
#define RXDMA_CFIG2_OFFSET
#define RXDMA_CFIG2_OFFSET_SHIFT
#define RXDMA_CFIG2_FULL_HDR

#define RBR_CFIG_A(IDX)
#define RBR_CFIG_A_LEN
#define RBR_CFIG_A_LEN_SHIFT
#define RBR_CFIG_A_STADDR_BASE
#define RBR_CFIG_A_STADDR

#define RBR_CFIG_B(IDX)
#define RBR_CFIG_B_BLKSIZE
#define RBR_CFIG_B_BLKSIZE_SHIFT
#define RBR_CFIG_B_VLD2
#define RBR_CFIG_B_BUFSZ2
#define RBR_CFIG_B_BUFSZ2_SHIFT
#define RBR_CFIG_B_VLD1
#define RBR_CFIG_B_BUFSZ1
#define RBR_CFIG_B_BUFSZ1_SHIFT
#define RBR_CFIG_B_VLD0
#define RBR_CFIG_B_BUFSZ0
#define RBR_CFIG_B_BUFSZ0_SHIFT

#define RBR_BLKSIZE_4K
#define RBR_BLKSIZE_8K
#define RBR_BLKSIZE_16K
#define RBR_BLKSIZE_32K
#define RBR_BUFSZ2_2K
#define RBR_BUFSZ2_4K
#define RBR_BUFSZ2_8K
#define RBR_BUFSZ2_16K
#define RBR_BUFSZ1_1K
#define RBR_BUFSZ1_2K
#define RBR_BUFSZ1_4K
#define RBR_BUFSZ1_8K
#define RBR_BUFSZ0_256
#define RBR_BUFSZ0_512
#define RBR_BUFSZ0_1K
#define RBR_BUFSZ0_2K

#define RBR_KICK(IDX)
#define RBR_KICK_BKADD

#define RBR_STAT(IDX)
#define RBR_STAT_QLEN

#define RBR_HDH(IDX)
#define RBR_HDH_HEAD_H

#define RBR_HDL(IDX)
#define RBR_HDL_HEAD_L

#define RCRCFIG_A(IDX)
#define RCRCFIG_A_LEN
#define RCRCFIG_A_LEN_SHIFT
#define RCRCFIG_A_STADDR_BASE
#define RCRCFIG_A_STADDR

#define RCRCFIG_B(IDX)
#define RCRCFIG_B_PTHRES
#define RCRCFIG_B_PTHRES_SHIFT
#define RCRCFIG_B_ENTOUT
#define RCRCFIG_B_TIMEOUT
#define RCRCFIG_B_TIMEOUT_SHIFT

#define RCRSTAT_A(IDX)
#define RCRSTAT_A_QLEN

#define RCRSTAT_B(IDX)
#define RCRSTAT_B_TIPTR_H

#define RCRSTAT_C(IDX)
#define RCRSTAT_C_TIPTR_L

#define RX_DMA_CTL_STAT(IDX)
#define RX_DMA_CTL_STAT_RBR_TMOUT
#define RX_DMA_CTL_STAT_RSP_CNT_ERR
#define RX_DMA_CTL_STAT_BYTE_EN_BUS
#define RX_DMA_CTL_STAT_RSP_DAT_ERR
#define RX_DMA_CTL_STAT_RCR_ACK_ERR
#define RX_DMA_CTL_STAT_DC_FIFO_ERR
#define RX_DMA_CTL_STAT_MEX
#define RX_DMA_CTL_STAT_RCRTHRES
#define RX_DMA_CTL_STAT_RCRTO
#define RX_DMA_CTL_STAT_RCR_SHA_PAR
#define RX_DMA_CTL_STAT_RBR_PRE_PAR
#define RX_DMA_CTL_STAT_PORT_DROP_PKT
#define RX_DMA_CTL_STAT_WRED_DROP
#define RX_DMA_CTL_STAT_RBR_PRE_EMTY
#define RX_DMA_CTL_STAT_RCRSHADOW_FULL
#define RX_DMA_CTL_STAT_CONFIG_ERR
#define RX_DMA_CTL_STAT_RCRINCON
#define RX_DMA_CTL_STAT_RCRFULL
#define RX_DMA_CTL_STAT_RBR_EMPTY
#define RX_DMA_CTL_STAT_RBRFULL
#define RX_DMA_CTL_STAT_RBRLOGPAGE
#define RX_DMA_CTL_STAT_CFIGLOGPAGE
#define RX_DMA_CTL_STAT_PTRREAD
#define RX_DMA_CTL_STAT_PTRREAD_SHIFT
#define RX_DMA_CTL_STAT_PKTREAD
#define RX_DMA_CTL_STAT_PKTREAD_SHIFT

#define RX_DMA_CTL_STAT_CHAN_FATAL

#define RX_DMA_CTL_STAT_PORT_FATAL

#define RX_DMA_CTL_WRITE_CLEAR_ERRS

#define RCR_FLSH(IDX)
#define RCR_FLSH_FLSH

#define RXMISC(IDX)
#define RXMISC_OFLOW
#define RXMISC_COUNT

#define RX_DMA_CTL_STAT_DBG(IDX)
#define RX_DMA_CTL_STAT_DBG_RBR_TMOUT
#define RX_DMA_CTL_STAT_DBG_RSP_CNT_ERR
#define RX_DMA_CTL_STAT_DBG_BYTE_EN_BUS
#define RX_DMA_CTL_STAT_DBG_RSP_DAT_ERR
#define RX_DMA_CTL_STAT_DBG_RCR_ACK_ERR
#define RX_DMA_CTL_STAT_DBG_DC_FIFO_ERR
#define RX_DMA_CTL_STAT_DBG_MEX
#define RX_DMA_CTL_STAT_DBG_RCRTHRES
#define RX_DMA_CTL_STAT_DBG_RCRTO
#define RX_DMA_CTL_STAT_DBG_RCR_SHA_PAR
#define RX_DMA_CTL_STAT_DBG_RBR_PRE_PAR
#define RX_DMA_CTL_STAT_DBG_PORT_DROP_PKT
#define RX_DMA_CTL_STAT_DBG_WRED_DROP
#define RX_DMA_CTL_STAT_DBG_RBR_PRE_EMTY
#define RX_DMA_CTL_STAT_DBG_RCRSHADOW_FULL
#define RX_DMA_CTL_STAT_DBG_CONFIG_ERR
#define RX_DMA_CTL_STAT_DBG_RCRINCON
#define RX_DMA_CTL_STAT_DBG_RCRFULL
#define RX_DMA_CTL_STAT_DBG_RBR_EMPTY
#define RX_DMA_CTL_STAT_DBG_RBRFULL
#define RX_DMA_CTL_STAT_DBG_RBRLOGPAGE
#define RX_DMA_CTL_STAT_DBG_CFIGLOGPAGE
#define RX_DMA_CTL_STAT_DBG_PTRREAD
#define RX_DMA_CTL_STAT_DBG_PKTREAD

#define RX_DMA_ENT_MSK(IDX)
#define RX_DMA_ENT_MSK_RBR_TMOUT
#define RX_DMA_ENT_MSK_RSP_CNT_ERR
#define RX_DMA_ENT_MSK_BYTE_EN_BUS
#define RX_DMA_ENT_MSK_RSP_DAT_ERR
#define RX_DMA_ENT_MSK_RCR_ACK_ERR
#define RX_DMA_ENT_MSK_DC_FIFO_ERR
#define RX_DMA_ENT_MSK_RCRTHRES
#define RX_DMA_ENT_MSK_RCRTO
#define RX_DMA_ENT_MSK_RCR_SHA_PAR
#define RX_DMA_ENT_MSK_RBR_PRE_PAR
#define RX_DMA_ENT_MSK_PORT_DROP_PKT
#define RX_DMA_ENT_MSK_WRED_DROP
#define RX_DMA_ENT_MSK_RBR_PRE_EMTY
#define RX_DMA_ENT_MSK_RCR_SHADOW_FULL
#define RX_DMA_ENT_MSK_CONFIG_ERR
#define RX_DMA_ENT_MSK_RCRINCON
#define RX_DMA_ENT_MSK_RCRFULL
#define RX_DMA_ENT_MSK_RBR_EMPTY
#define RX_DMA_ENT_MSK_RBRFULL
#define RX_DMA_ENT_MSK_RBRLOGPAGE
#define RX_DMA_ENT_MSK_CFIGLOGPAGE
#define RX_DMA_ENT_MSK_ALL

#define TX_RNG_CFIG(IDX)
#define TX_RNG_CFIG_LEN
#define TX_RNG_CFIG_LEN_SHIFT
#define TX_RNG_CFIG_STADDR_BASE
#define TX_RNG_CFIG_STADDR

#define TX_RING_HDL(IDX)
#define TX_RING_HDL_WRAP
#define TX_RING_HDL_HEAD
#define TX_RING_HDL_HEAD_SHIFT

#define TX_RING_KICK(IDX)
#define TX_RING_KICK_WRAP
#define TX_RING_KICK_TAIL

#define TX_ENT_MSK(IDX)
#define TX_ENT_MSK_MK
#define TX_ENT_MSK_MBOX_ERR
#define TX_ENT_MSK_PKT_SIZE_ERR
#define TX_ENT_MSK_TX_RING_OFLOW
#define TX_ENT_MSK_PREF_BUF_ECC_ERR
#define TX_ENT_MSK_NACK_PREF
#define TX_ENT_MSK_NACK_PKT_RD
#define TX_ENT_MSK_CONF_PART_ERR
#define TX_ENT_MSK_PKT_PRT_ERR

#define TX_CS(IDX)
#define TX_CS_PKT_CNT
#define TX_CS_PKT_CNT_SHIFT
#define TX_CS_LASTMARK
#define TX_CS_LASTMARK_SHIFT
#define TX_CS_RST
#define TX_CS_RST_STATE
#define TX_CS_MB
#define TX_CS_STOP_N_GO
#define TX_CS_SNG_STATE
#define TX_CS_MK
#define TX_CS_MMK
#define TX_CS_MBOX_ERR
#define TX_CS_PKT_SIZE_ERR
#define TX_CS_TX_RING_OFLOW
#define TX_CS_PREF_BUF_PAR_ERR
#define TX_CS_NACK_PREF
#define TX_CS_NACK_PKT_RD
#define TX_CS_CONF_PART_ERR
#define TX_CS_PKT_PRT_ERR

#define TXDMA_MBH(IDX)
#define TXDMA_MBH_MBADDR

#define TXDMA_MBL(IDX)
#define TXDMA_MBL_MBADDR

#define TX_DMA_PRE_ST(IDX)
#define TX_DMA_PRE_ST_SHADOW_HD

#define TX_RNG_ERR_LOGH(IDX)
#define TX_RNG_ERR_LOGH_ERR
#define TX_RNG_ERR_LOGH_MERR
#define TX_RNG_ERR_LOGH_ERRCODE
#define TX_RNG_ERR_LOGH_ERRADDR

#define TX_RNG_ERR_LOGL(IDX)
#define TX_RNG_ERR_LOGL_ERRADDR

#define TDMC_INTR_DBG(IDX)
#define TDMC_INTR_DBG_MK
#define TDMC_INTR_DBG_MBOX_ERR
#define TDMC_INTR_DBG_PKT_SIZE_ERR
#define TDMC_INTR_DBG_TX_RING_OFLOW
#define TDMC_INTR_DBG_PREF_BUF_PAR_ERR
#define TDMC_INTR_DBG_NACK_PREF
#define TDMC_INTR_DBG_NACK_PKT_RD
#define TDMC_INTR_DBG_CONF_PART_ERR
#define TDMC_INTR_DBG_PKT_PART_ERR

#define TX_CS_DBG(IDX)
#define TX_CS_DBG_PKT_CNT

#define TDMC_INJ_PAR_ERR(IDX)
#define TDMC_INJ_PAR_ERR_VAL

#define TDMC_DBG_SEL(IDX)
#define TDMC_DBG_SEL_DBG_SEL

#define TDMC_TRAINING_VECTOR(IDX)
#define TDMC_TRAINING_VECTOR_VEC

#define TXC_DMA_MAX(CHAN)
#define TXC_DMA_MAX_LEN(CHAN)

#define TXC_CONTROL
#define TXC_CONTROL_ENABLE
#define TXC_CONTROL_PORT_ENABLE(X)

#define TXC_TRAINING_VEC
#define TXC_TRAINING_VEC_MASK

#define TXC_DEBUG
#define TXC_DEBUG_SELECT

#define TXC_MAX_REORDER
#define TXC_MAX_REORDER_PORT3
#define TXC_MAX_REORDER_PORT2
#define TXC_MAX_REORDER_PORT1
#define TXC_MAX_REORDER_PORT0

#define TXC_PORT_CTL(PORT)
#define TXC_PORT_CTL_CLR_ALL_STAT

#define TXC_PKT_STUFFED(PORT)
#define TXC_PKT_STUFFED_PP_REORDER
#define TXC_PKT_STUFFED_PP_PACKETASSY

#define TXC_PKT_XMIT(PORT)
#define TXC_PKT_XMIT_BYTES
#define TXC_PKT_XMIT_PKTS

#define TXC_ROECC_CTL(PORT)
#define TXC_ROECC_CTL_DISABLE_UE
#define TXC_ROECC_CTL_DBL_BIT_ERR
#define TXC_ROECC_CTL_SNGL_BIT_ERR
#define TXC_ROECC_CTL_ALL_PKTS
#define TXC_ROECC_CTL_ALT_PKTS
#define TXC_ROECC_CTL_ONE_PKT_ONLY
#define TXC_ROECC_CTL_LST_PKT_LINE
#define TXC_ROECC_CTL_2ND_PKT_LINE
#define TXC_ROECC_CTL_1ST_PKT_LINE

#define TXC_ROECC_ST(PORT)
#define TXC_ROECC_CLR_ST
#define TXC_ROECC_CE
#define TXC_ROECC_UE
#define TXC_ROECC_ST_ECC_ADDR

#define TXC_RO_DATA0(PORT)
#define TXC_RO_DATA0_DATA0

#define TXC_RO_DATA1(PORT)
#define TXC_RO_DATA1_DATA1

#define TXC_RO_DATA2(PORT)
#define TXC_RO_DATA2_DATA2

#define TXC_RO_DATA3(PORT)
#define TXC_RO_DATA3_DATA3

#define TXC_RO_DATA4(PORT)
#define TXC_RO_DATA4_DATA4

#define TXC_SFECC_CTL(PORT)
#define TXC_SFECC_CTL_DISABLE_UE
#define TXC_SFECC_CTL_DBL_BIT_ERR
#define TXC_SFECC_CTL_SNGL_BIT_ERR
#define TXC_SFECC_CTL_ALL_PKTS
#define TXC_SFECC_CTL_ALT_PKTS
#define TXC_SFECC_CTL_ONE_PKT_ONLY
#define TXC_SFECC_CTL_LST_PKT_LINE
#define TXC_SFECC_CTL_2ND_PKT_LINE
#define TXC_SFECC_CTL_1ST_PKT_LINE

#define TXC_SFECC_ST(PORT)
#define TXC_SFECC_ST_CLR_ST
#define TXC_SFECC_ST_CE
#define TXC_SFECC_ST_UE
#define TXC_SFECC_ST_ECC_ADDR

#define TXC_SF_DATA0(PORT)
#define TXC_SF_DATA0_DATA0

#define TXC_SF_DATA1(PORT)
#define TXC_SF_DATA1_DATA1

#define TXC_SF_DATA2(PORT)
#define TXC_SF_DATA2_DATA2

#define TXC_SF_DATA3(PORT)
#define TXC_SF_DATA3_DATA3

#define TXC_SF_DATA4(PORT)
#define TXC_SF_DATA4_DATA4

#define TXC_RO_TIDS(PORT)
#define TXC_RO_TIDS_IN_USE

#define TXC_RO_STATE0(PORT)
#define TXC_RO_STATE0_DUPLICATE_TID

#define TXC_RO_STATE1(PORT)
#define TXC_RO_STATE1_UNUSED_TID

#define TXC_RO_STATE2(PORT)
#define TXC_RO_STATE2_TRANS_TIMEOUT

#define TXC_RO_STATE3(PORT)
#define TXC_RO_STATE3_ENAB_SPC_WMARK
#define TXC_RO_STATE3_RO_SPC_WMARK
#define TXC_RO_STATE3_ROFIFO_SPC_AVAIL
#define TXC_RO_STATE3_ENAB_RO_WMARK
#define TXC_RO_STATE3_HIGH_RO_USED
#define TXC_RO_STATE3_NUM_RO_USED

#define TXC_RO_CTL(PORT)
#define TXC_RO_CTL_CLR_FAIL_STATE
#define TXC_RO_CTL_RO_ADDR
#define TXC_RO_CTL_ADDR_FAILED
#define TXC_RO_CTL_DMA_FAILED
#define TXC_RO_CTL_LEN_FAILED
#define TXC_RO_CTL_CAPT_ADDR_FAILED
#define TXC_RO_CTL_CAPT_DMA_FAILED
#define TXC_RO_CTL_CAPT_LEN_FAILED
#define TXC_RO_CTL_RO_STATE_RD_DONE
#define TXC_RO_CTL_RO_STATE_WR_DONE
#define TXC_RO_CTL_RO_STATE_RD
#define TXC_RO_CTL_RO_STATE_WR
#define TXC_RO_CTL_RO_STATE_ADDR

#define TXC_RO_ST_DATA0(PORT)
#define TXC_RO_ST_DATA0_DATA0

#define TXC_RO_ST_DATA1(PORT)
#define TXC_RO_ST_DATA1_DATA1

#define TXC_RO_ST_DATA2(PORT)
#define TXC_RO_ST_DATA2_DATA2

#define TXC_RO_ST_DATA3(PORT)
#define TXC_RO_ST_DATA3_DATA3

#define TXC_PORT_PACKET_REQ(PORT)
#define TXC_PORT_PACKET_REQ_GATHER_REQ
#define TXC_PORT_PACKET_REQ_PKT_REQ
#define TXC_PORT_PACKET_REQ_PERR_ABRT

	/* bits are same as TXC_INT_STAT */
#define TXC_INT_STAT_DBG

#define TXC_INT_STAT
#define TXC_INT_STAT_VAL_SHIFT(PORT)
#define TXC_INT_STAT_VAL(PORT)
#define TXC_INT_STAT_SF_CE(PORT)
#define TXC_INT_STAT_SF_UE(PORT)
#define TXC_INT_STAT_RO_CE(PORT)
#define TXC_INT_STAT_RO_UE(PORT)
#define TXC_INT_STAT_REORDER_ERR(PORT)
#define TXC_INT_STAT_PKTASM_DEAD(PORT)

#define TXC_INT_MASK
#define TXC_INT_MASK_VAL_SHIFT(PORT)
#define TXC_INT_MASK_VAL(PORT)

#define TXC_INT_MASK_SF_CE
#define TXC_INT_MASK_SF_UE
#define TXC_INT_MASK_RO_CE
#define TXC_INT_MASK_RO_UE
#define TXC_INT_MASK_REORDER_ERR
#define TXC_INT_MASK_PKTASM_DEAD
#define TXC_INT_MASK_ALL

#define TXC_PORT_DMA(IDX)

#define ESPC_PIO_EN
#define ESPC_PIO_EN_ENABLE

#define ESPC_PIO_STAT
#define ESPC_PIO_STAT_READ_START
#define ESPC_PIO_STAT_READ_END
#define ESPC_PIO_STAT_WRITE_INIT
#define ESPC_PIO_STAT_WRITE_END
#define ESPC_PIO_STAT_ADDR
#define ESPC_PIO_STAT_ADDR_SHIFT
#define ESPC_PIO_STAT_DATA
#define ESPC_PIO_STAT_DATA_SHIFT

#define ESPC_NCR(IDX)
#define ESPC_NCR_VAL

#define ESPC_MAC_ADDR0
#define ESPC_MAC_ADDR1
#define ESPC_NUM_PORTS_MACS
#define ESPC_NUM_PORTS_MACS_VAL
#define ESPC_MOD_STR_LEN
#define ESPC_MOD_STR_1
#define ESPC_MOD_STR_2
#define ESPC_MOD_STR_3
#define ESPC_MOD_STR_4
#define ESPC_MOD_STR_5
#define ESPC_MOD_STR_6
#define ESPC_MOD_STR_7
#define ESPC_MOD_STR_8
#define ESPC_BD_MOD_STR_LEN
#define ESPC_BD_MOD_STR_1
#define ESPC_BD_MOD_STR_2
#define ESPC_BD_MOD_STR_3
#define ESPC_BD_MOD_STR_4

#define ESPC_PHY_TYPE
#define ESPC_PHY_TYPE_PORT0
#define ESPC_PHY_TYPE_PORT0_SHIFT
#define ESPC_PHY_TYPE_PORT1
#define ESPC_PHY_TYPE_PORT1_SHIFT
#define ESPC_PHY_TYPE_PORT2
#define ESPC_PHY_TYPE_PORT2_SHIFT
#define ESPC_PHY_TYPE_PORT3
#define ESPC_PHY_TYPE_PORT3_SHIFT

#define ESPC_PHY_TYPE_1G_COPPER
#define ESPC_PHY_TYPE_1G_FIBER
#define ESPC_PHY_TYPE_10G_COPPER
#define ESPC_PHY_TYPE_10G_FIBER

#define ESPC_MAX_FM_SZ

#define ESPC_INTR_NUM
#define ESPC_INTR_NUM_PORT0
#define ESPC_INTR_NUM_PORT1
#define ESPC_INTR_NUM_PORT2
#define ESPC_INTR_NUM_PORT3

#define ESPC_VER_IMGSZ
#define ESPC_VER_IMGSZ_IMGSZ
#define ESPC_VER_IMGSZ_IMGSZ_SHIFT
#define ESPC_VER_IMGSZ_VER
#define ESPC_VER_IMGSZ_VER_SHIFT

#define ESPC_CHKSUM
#define ESPC_CHKSUM_SUM

#define ESPC_EEPROM_SIZE

#define CLASS_CODE_UNRECOG
#define CLASS_CODE_DUMMY1
#define CLASS_CODE_ETHERTYPE1
#define CLASS_CODE_ETHERTYPE2
#define CLASS_CODE_USER_PROG1
#define CLASS_CODE_USER_PROG2
#define CLASS_CODE_USER_PROG3
#define CLASS_CODE_USER_PROG4
#define CLASS_CODE_TCP_IPV4
#define CLASS_CODE_UDP_IPV4
#define CLASS_CODE_AH_ESP_IPV4
#define CLASS_CODE_SCTP_IPV4
#define CLASS_CODE_TCP_IPV6
#define CLASS_CODE_UDP_IPV6
#define CLASS_CODE_AH_ESP_IPV6
#define CLASS_CODE_SCTP_IPV6
#define CLASS_CODE_ARP
#define CLASS_CODE_RARP
#define CLASS_CODE_DUMMY2
#define CLASS_CODE_DUMMY3
#define CLASS_CODE_DUMMY4
#define CLASS_CODE_DUMMY5
#define CLASS_CODE_DUMMY6
#define CLASS_CODE_DUMMY7
#define CLASS_CODE_DUMMY8
#define CLASS_CODE_DUMMY9
#define CLASS_CODE_DUMMY10
#define CLASS_CODE_DUMMY11
#define CLASS_CODE_DUMMY12
#define CLASS_CODE_DUMMY13
#define CLASS_CODE_DUMMY14
#define CLASS_CODE_DUMMY15

/* Logical devices and device groups */
#define LDN_RXDMA(CHAN)
#define LDN_RESV1(OFF)
#define LDN_TXDMA(CHAN)
#define LDN_RESV2(OFF)
#define LDN_MIF
#define LDN_MAC(PORT)
#define LDN_DEVICE_ERROR
#define LDN_MAX

#define NIU_LDG_MIN
#define NIU_LDG_MAX
#define NIU_NUM_LDG
#define LDG_INVALID

/* PHY stuff */
#define NIU_PMA_PMD_DEV_ADDR
#define NIU_PCS_DEV_ADDR

#define NIU_PHY_ID_MASK
#define NIU_PHY_ID_BCM8704
#define NIU_PHY_ID_BCM8706
#define NIU_PHY_ID_BCM5464R
#define NIU_PHY_ID_MRVL88X2011

/* MRVL88X2011 register addresses */
#define MRVL88X2011_USER_DEV1_ADDR
#define MRVL88X2011_USER_DEV2_ADDR
#define MRVL88X2011_USER_DEV3_ADDR
#define MRVL88X2011_USER_DEV4_ADDR
#define MRVL88X2011_PMA_PMD_CTL_1
#define MRVL88X2011_PMA_PMD_STATUS_1
#define MRVL88X2011_10G_PMD_STATUS_2
#define MRVL88X2011_10G_PMD_TX_DIS
#define MRVL88X2011_10G_XGXS_LANE_STAT
#define MRVL88X2011_GENERAL_CTL
#define MRVL88X2011_LED_BLINK_CTL
#define MRVL88X2011_LED_8_TO_11_CTL

/* MRVL88X2011 register control */
#define MRVL88X2011_ENA_XFPREFCLK
#define MRVL88X2011_ENA_PMDTX
#define MRVL88X2011_LOOPBACK
#define MRVL88X2011_LED_ACT
#define MRVL88X2011_LNK_STATUS_OK
#define MRVL88X2011_LED_BLKRATE_MASK
#define MRVL88X2011_LED_BLKRATE_034MS
#define MRVL88X2011_LED_BLKRATE_067MS
#define MRVL88X2011_LED_BLKRATE_134MS
#define MRVL88X2011_LED_BLKRATE_269MS
#define MRVL88X2011_LED_BLKRATE_538MS
#define MRVL88X2011_LED_CTL_OFF
#define MRVL88X2011_LED_CTL_PCS_ACT
#define MRVL88X2011_LED_CTL_MASK
#define MRVL88X2011_LED(n,v)
#define MRVL88X2011_LED_STAT(n,v)

#define BCM8704_PMA_PMD_DEV_ADDR
#define BCM8704_PCS_DEV_ADDR
#define BCM8704_USER_DEV3_ADDR
#define BCM8704_PHYXS_DEV_ADDR
#define BCM8704_USER_DEV4_ADDR

#define BCM8704_PMD_RCV_SIGDET
#define PMD_RCV_SIGDET_LANE3
#define PMD_RCV_SIGDET_LANE2
#define PMD_RCV_SIGDET_LANE1
#define PMD_RCV_SIGDET_LANE0
#define PMD_RCV_SIGDET_GLOBAL

#define BCM8704_PCS_10G_R_STATUS
#define PCS_10G_R_STATUS_LINKSTAT
#define PCS_10G_R_STATUS_PRBS31_ABLE
#define PCS_10G_R_STATUS_HI_BER
#define PCS_10G_R_STATUS_BLK_LOCK

#define BCM8704_USER_CONTROL
#define USER_CONTROL_OPTXENB_LVL
#define USER_CONTROL_OPTXRST_LVL
#define USER_CONTROL_OPBIASFLT_LVL
#define USER_CONTROL_OBTMPFLT_LVL
#define USER_CONTROL_OPPRFLT_LVL
#define USER_CONTROL_OPTXFLT_LVL
#define USER_CONTROL_OPRXLOS_LVL
#define USER_CONTROL_OPRXFLT_LVL
#define USER_CONTROL_OPTXON_LVL
#define USER_CONTROL_RES1
#define USER_CONTROL_RES1_SHIFT

#define BCM8704_USER_ANALOG_CLK
#define BCM8704_USER_PMD_RX_CONTROL

#define BCM8704_USER_PMD_TX_CONTROL
#define USER_PMD_TX_CTL_RES1
#define USER_PMD_TX_CTL_XFP_CLKEN
#define USER_PMD_TX_CTL_TX_DAC_TXD
#define USER_PMD_TX_CTL_TX_DAC_TXD_SH
#define USER_PMD_TX_CTL_TX_DAC_TXCK
#define USER_PMD_TX_CTL_TX_DAC_TXCK_SH
#define USER_PMD_TX_CTL_TSD_LPWREN
#define USER_PMD_TX_CTL_TSCK_LPWREN
#define USER_PMD_TX_CTL_CMU_LPWREN
#define USER_PMD_TX_CTL_SFIFORST

#define BCM8704_USER_ANALOG_STATUS0
#define BCM8704_USER_OPT_DIGITAL_CTRL
#define BCM8704_USER_TX_ALARM_STATUS

#define USER_ODIG_CTRL_FMODE
#define USER_ODIG_CTRL_TX_PDOWN
#define USER_ODIG_CTRL_RX_PDOWN
#define USER_ODIG_CTRL_EFILT_EN
#define USER_ODIG_CTRL_OPT_RST
#define USER_ODIG_CTRL_PCS_TIB
#define USER_ODIG_CTRL_PCS_RI
#define USER_ODIG_CTRL_RESV1
#define USER_ODIG_CTRL_GPIOS
#define USER_ODIG_CTRL_GPIOS_SHIFT
#define USER_ODIG_CTRL_RESV2
#define USER_ODIG_CTRL_LB_ERR_DIS
#define USER_ODIG_CTRL_RESV3
#define USER_ODIG_CTRL_TXONOFF_PD_DIS

#define BCM8704_PHYXS_XGXS_LANE_STAT
#define PHYXS_XGXS_LANE_STAT_ALINGED
#define PHYXS_XGXS_LANE_STAT_PATTEST
#define PHYXS_XGXS_LANE_STAT_MAGIC
#define PHYXS_XGXS_LANE_STAT_LANE3
#define PHYXS_XGXS_LANE_STAT_LANE2
#define PHYXS_XGXS_LANE_STAT_LANE1
#define PHYXS_XGXS_LANE_STAT_LANE0

#define BCM5464R_AUX_CTL
#define BCM5464R_AUX_CTL_EXT_LB
#define BCM5464R_AUX_CTL_EXT_PLEN
#define BCM5464R_AUX_CTL_ER1000
#define BCM5464R_AUX_CTL_ER1000_SHIFT
#define BCM5464R_AUX_CTL_RESV1
#define BCM5464R_AUX_CTL_WRITE_1
#define BCM5464R_AUX_CTL_RESV2
#define BCM5464R_AUX_CTL_PRESP_DIS
#define BCM5464R_AUX_CTL_RESV3
#define BCM5464R_AUX_CTL_ER100
#define BCM5464R_AUX_CTL_ER100_SHIFT
#define BCM5464R_AUX_CTL_DIAG_MODE
#define BCM5464R_AUX_CTL_SR_SEL
#define BCM5464R_AUX_CTL_SR_SEL_SHIFT

#define BCM5464R_CTRL1000_AS_MASTER
#define BCM5464R_CTRL1000_ENABLE_AS_MASTER

#define RCR_ENTRY_MULTI
#define RCR_ENTRY_PKT_TYPE
#define RCR_ENTRY_PKT_TYPE_SHIFT
#define RCR_ENTRY_ZERO_COPY
#define RCR_ENTRY_NOPORT
#define RCR_ENTRY_PROMISC
#define RCR_ENTRY_ERROR
#define RCR_ENTRY_DCF_ERR
#define RCR_ENTRY_L2_LEN
#define RCR_ENTRY_L2_LEN_SHIFT
#define RCR_ENTRY_PKTBUFSZ
#define RCR_ENTRY_PKTBUFSZ_SHIFT
#define RCR_ENTRY_PKT_BUF_ADDR
#define RCR_ENTRY_PKT_BUF_ADDR_SHIFT

#define RCR_PKT_TYPE_OTHER
#define RCR_PKT_TYPE_TCP
#define RCR_PKT_TYPE_UDP
#define RCR_PKT_TYPE_SCTP

#define NIU_RXPULL_MAX

struct rx_pkt_hdr0 {};

struct rx_pkt_hdr1 {};

struct tx_dma_mbox {};

struct tx_pkt_hdr {};

#define TX_DESC_SOP
#define TX_DESC_MARK
#define TX_DESC_NUM_PTR
#define TX_DESC_NUM_PTR_SHIFT
#define TX_DESC_TR_LEN
#define TX_DESC_TR_LEN_SHIFT
#define TX_DESC_SAD
#define TX_DESC_SAD_SHIFT

struct tx_buff_info {};

struct txdma_mailbox {} __attribute__((aligned));

#define MAX_TX_RING_SIZE
#define MAX_TX_DESC_LEN

struct tx_ring_info {};

#define NEXT_TX(tp, index)

static inline u32 niu_tx_avail(struct tx_ring_info *tp)
{}

struct rxdma_mailbox {} __attribute__((aligned));

#define MAX_RBR_RING_SIZE
#define MAX_RCR_RING_SIZE

#define RBR_REFILL_MIN

#define RX_SKB_ALLOC_SIZE

struct rx_ring_info {};

#define NEXT_RCR(rp, index)
#define NEXT_RBR(rp, index)

#define NIU_MAX_PORTS
#define NIU_NUM_RXCHAN
#define NIU_NUM_TXCHAN
#define MAC_NUM_HASH

#define NIU_MAX_MTU

/* VPD strings */
#define NIU_QGC_LP_BM_STR
#define NIU_2XGF_LP_BM_STR
#define NIU_QGC_PEM_BM_STR
#define NIU_2XGF_PEM_BM_STR
#define NIU_ALONSO_BM_STR
#define NIU_FOXXY_BM_STR
#define NIU_2XGF_MRVL_BM_STR
#define NIU_QGC_LP_MDL_STR
#define NIU_2XGF_LP_MDL_STR
#define NIU_QGC_PEM_MDL_STR
#define NIU_2XGF_PEM_MDL_STR
#define NIU_ALONSO_MDL_STR
#define NIU_KIMI_MDL_STR
#define NIU_MARAMBA_MDL_STR
#define NIU_FOXXY_MDL_STR
#define NIU_2XGF_MRVL_MDL_STR

#define NIU_VPD_MIN_MAJOR
#define NIU_VPD_MIN_MINOR

#define NIU_VPD_MODEL_MAX
#define NIU_VPD_BD_MODEL_MAX
#define NIU_VPD_VERSION_MAX
#define NIU_VPD_PHY_TYPE_MAX

struct niu_vpd {};

struct niu_altmac_rdc {};

struct niu_vlan_rdc {};

struct niu_classifier {};

#define NIU_NUM_RDC_TABLES
#define NIU_RDC_TABLE_SLOTS

struct rdc_table {};

struct niu_rdc_tables {};

#define PHY_TYPE_PMA_PMD
#define PHY_TYPE_PCS
#define PHY_TYPE_MII
#define PHY_TYPE_MAX

struct phy_probe_info {};

struct niu_tcam_entry {};

struct device_node;
niu_parent_id;

struct niu;
struct niu_parent {};

struct niu_ops {};

struct niu_link_config {};

struct niu_ldg {};

struct niu_xmac_stats {};

struct niu_bmac_stats {};

niu_mac_stats;

struct niu_phy_ops {};

struct platform_device;
struct niu {};

#endif /* _NIU_H */