linux/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h

/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */
/*
 * Copyright (c) 2018 Synopsys, Inc. and/or its affiliates.
 * stmmac XGMAC definitions.
 */

#ifndef __STMMAC_DWXGMAC2_H__
#define __STMMAC_DWXGMAC2_H__

#include "common.h"

/* Misc */
#define XGMAC_JUMBO_LEN

/* MAC Registers */
#define XGMAC_TX_CONFIG
#define XGMAC_CONFIG_SS_OFF
#define XGMAC_CONFIG_SS_MASK
#define XGMAC_CONFIG_SS_10000
#define XGMAC_CONFIG_SS_2500_GMII
#define XGMAC_CONFIG_SS_1000_GMII
#define XGMAC_CONFIG_SS_100_MII
#define XGMAC_CONFIG_SS_5000
#define XGMAC_CONFIG_SS_2500
#define XGMAC_CONFIG_SS_10_MII
#define XGMAC_CONFIG_SARC
#define XGMAC_CONFIG_SARC_SHIFT
#define XGMAC_CONFIG_JD
#define XGMAC_CONFIG_TE
#define XGMAC_CORE_INIT_TX
#define XGMAC_RX_CONFIG
#define XGMAC_CONFIG_ARPEN
#define XGMAC_CONFIG_GPSL
#define XGMAC_CONFIG_GPSL_SHIFT
#define XGMAC_CONFIG_HDSMS
#define XGMAC_CONFIG_HDSMS_SHIFT
#define XGMAC_CONFIG_HDSMS_256
#define XGMAC_CONFIG_S2KP
#define XGMAC_CONFIG_LM
#define XGMAC_CONFIG_IPC
#define XGMAC_CONFIG_JE
#define XGMAC_CONFIG_WD
#define XGMAC_CONFIG_GPSLCE
#define XGMAC_CONFIG_CST
#define XGMAC_CONFIG_ACS
#define XGMAC_CONFIG_RE
#define XGMAC_CORE_INIT_RX
#define XGMAC_PACKET_FILTER
#define XGMAC_FILTER_RA
#define XGMAC_FILTER_IPFE
#define XGMAC_FILTER_VTFE
#define XGMAC_FILTER_HPF
#define XGMAC_FILTER_PCF
#define XGMAC_FILTER_PM
#define XGMAC_FILTER_HMC
#define XGMAC_FILTER_PR
#define XGMAC_HASH_TABLE(x)
#define XGMAC_MAX_HASH_TABLE
#define XGMAC_VLAN_TAG
#define XGMAC_VLAN_EDVLP
#define XGMAC_VLAN_VTHM
#define XGMAC_VLAN_DOVLTC
#define XGMAC_VLAN_ESVL
#define XGMAC_VLAN_ETV
#define XGMAC_VLAN_VID
#define XGMAC_VLAN_HASH_TABLE
#define XGMAC_VLAN_INCL
#define XGMAC_VLAN_VLTI
#define XGMAC_VLAN_CSVL
#define XGMAC_VLAN_VLC
#define XGMAC_VLAN_VLC_SHIFT
#define XGMAC_RXQ_CTRL0
#define XGMAC_RXQEN(x)
#define XGMAC_RXQEN_SHIFT(x)
#define XGMAC_RXQ_CTRL1
#define XGMAC_AVCPQ
#define XGMAC_AVCPQ_SHIFT
#define XGMAC_PTPQ
#define XGMAC_PTPQ_SHIFT
#define XGMAC_TACPQE
#define XGMAC_DCBCPQ
#define XGMAC_DCBCPQ_SHIFT
#define XGMAC_MCBCQEN
#define XGMAC_MCBCQ
#define XGMAC_MCBCQ_SHIFT
#define XGMAC_RQ
#define XGMAC_RQ_SHIFT
#define XGMAC_UPQ
#define XGMAC_UPQ_SHIFT
#define XGMAC_RXQ_CTRL2
#define XGMAC_RXQ_CTRL3
#define XGMAC_PSRQ(x)
#define XGMAC_PSRQ_SHIFT(x)
#define XGMAC_INT_STATUS
#define XGMAC_LPIIS
#define XGMAC_PMTIS
#define XGMAC_INT_EN
#define XGMAC_TSIE
#define XGMAC_LPIIE
#define XGMAC_PMTIE
#define XGMAC_INT_DEFAULT_EN
#define XGMAC_Qx_TX_FLOW_CTRL(x)
#define XGMAC_PT
#define XGMAC_PT_SHIFT
#define XGMAC_TFE
#define XGMAC_RX_FLOW_CTRL
#define XGMAC_RFE
#define XGMAC_PMT
#define XGMAC_GLBLUCAST
#define XGMAC_RWKPKTEN
#define XGMAC_MGKPKTEN
#define XGMAC_PWRDWN
#define XGMAC_LPI_CTRL
#define XGMAC_TXCGE
#define XGMAC_LPITXA
#define XGMAC_PLS
#define XGMAC_LPITXEN
#define XGMAC_RLPIEX
#define XGMAC_RLPIEN
#define XGMAC_TLPIEX
#define XGMAC_TLPIEN
#define XGMAC_LPI_TIMER_CTRL
#define XGMAC_HW_FEATURE0
#define XGMAC_HWFEAT_EDMA
#define XGMAC_HWFEAT_EDIFFC
#define XGMAC_HWFEAT_VXN
#define XGMAC_HWFEAT_SAVLANINS
#define XGMAC_HWFEAT_TSSTSSEL
#define XGMAC_HWFEAT_ADDMACADRSEL
#define XGMAC_HWFEAT_RXCOESEL
#define XGMAC_HWFEAT_TXCOESEL
#define XGMAC_HWFEAT_EEESEL
#define XGMAC_HWFEAT_TSSEL
#define XGMAC_HWFEAT_AVSEL
#define XGMAC_HWFEAT_RAVSEL
#define XGMAC_HWFEAT_ARPOFFSEL
#define XGMAC_HWFEAT_MMCSEL
#define XGMAC_HWFEAT_MGKSEL
#define XGMAC_HWFEAT_RWKSEL
#define XGMAC_HWFEAT_SMASEL
#define XGMAC_HWFEAT_VLHASH
#define XGMAC_HWFEAT_HDSEL
#define XGMAC_HWFEAT_GMIISEL
#define XGMAC_HW_FEATURE1
#define XGMAC_HWFEAT_L3L4FNUM
#define XGMAC_HWFEAT_HASHTBLSZ
#define XGMAC_HWFEAT_NUMTC
#define XGMAC_HWFEAT_RSSEN
#define XGMAC_HWFEAT_DBGMEMA
#define XGMAC_HWFEAT_TSOEN
#define XGMAC_HWFEAT_SPHEN
#define XGMAC_HWFEAT_DCBEN
#define XGMAC_HWFEAT_ADDR64
#define XGMAC_HWFEAT_ADVTHWORD
#define XGMAC_HWFEAT_PTOEN
#define XGMAC_HWFEAT_OSTEN
#define XGMAC_HWFEAT_TXFIFOSIZE
#define XGMAC_HWFEAT_PFCEN
#define XGMAC_HWFEAT_RXFIFOSIZE
#define XGMAC_HW_FEATURE2
#define XGMAC_HWFEAT_AUXSNAPNUM
#define XGMAC_HWFEAT_PPSOUTNUM
#define XGMAC_HWFEAT_TXCHCNT
#define XGMAC_HWFEAT_RXCHCNT
#define XGMAC_HWFEAT_TXQCNT
#define XGMAC_HWFEAT_RXQCNT
#define XGMAC_HW_FEATURE3
#define XGMAC_HWFEAT_TBSCH
#define XGMAC_HWFEAT_TBSSEL
#define XGMAC_HWFEAT_FPESEL
#define XGMAC_HWFEAT_SGFSEL
#define XGMAC_HWFEAT_ESTWID
#define XGMAC_HWFEAT_ESTDEP
#define XGMAC_HWFEAT_ESTSEL
#define XGMAC_HWFEAT_TTSFD
#define XGMAC_HWFEAT_ASP
#define XGMAC_HWFEAT_DVLAN
#define XGMAC_HWFEAT_FRPES
#define XGMAC_HWFEAT_FRPPB
#define XGMAC_HWFEAT_POUOST
#define XGMAC_HWFEAT_FRPPIPE
#define XGMAC_HWFEAT_CBTISEL
#define XGMAC_HWFEAT_FRPSEL
#define XGMAC_HWFEAT_NRVF
#define XGMAC_HW_FEATURE4
#define XGMAC_HWFEAT_EASP
#define XGMAC_HWFEAT_PCSEL
#define XGMAC_MAC_DPP_FSM_INT_STATUS
#define XGMAC_MAC_FSM_CONTROL
#define XGMAC_PRTYEN
#define XGMAC_TMOUTEN
#define XGMAC_MDIO_ADDR
#define XGMAC_MDIO_DATA
#define XGMAC_MDIO_C22P
#define XGMAC_FPE_CTRL_STS
#define XGMAC_EFPE
#define XGMAC_ADDRx_HIGH(x)
#define XGMAC_ADDR_MAX
#define XGMAC_AE
#define XGMAC_DCS
#define XGMAC_DCS_SHIFT
#define XGMAC_ADDRx_LOW(x)
#define XGMAC_L3L4_ADDR_CTRL
#define XGMAC_IDDR
#define XGMAC_IDDR_SHIFT
#define XGMAC_IDDR_FNUM
#define XGMAC_TT
#define XGMAC_XB
#define XGMAC_L3L4_DATA
#define XGMAC_L3L4_CTRL
#define XGMAC_L4DPIM0
#define XGMAC_L4DPM0
#define XGMAC_L4SPIM0
#define XGMAC_L4SPM0
#define XGMAC_L4PEN0
#define XGMAC_L3HDBM0
#define XGMAC_L3HSBM0
#define XGMAC_L3DAIM0
#define XGMAC_L3DAM0
#define XGMAC_L3SAIM0
#define XGMAC_L3SAM0
#define XGMAC_L3PEN0
#define XGMAC_L4_ADDR
#define XGMAC_L4DP0
#define XGMAC_L4DP0_SHIFT
#define XGMAC_L4SP0
#define XGMAC_L3_ADDR0
#define XGMAC_L3_ADDR1
#define XGMAC_L3_ADDR2
#define XMGAC_L3_ADDR3
#define XGMAC_ARP_ADDR
#define XGMAC_RSS_CTRL
#define XGMAC_UDP4TE
#define XGMAC_TCP4TE
#define XGMAC_IP2TE
#define XGMAC_RSSE
#define XGMAC_RSS_ADDR
#define XGMAC_RSSIA_SHIFT
#define XGMAC_ADDRT
#define XGMAC_CT
#define XGMAC_OB
#define XGMAC_RSS_DATA
#define XGMAC_TIMESTAMP_STATUS
#define XGMAC_TXTSC
#define XGMAC_TXTIMESTAMP_NSEC
#define XGMAC_TXTSSTSLO
#define XGMAC_TXTIMESTAMP_SEC
#define XGMAC_PPS_CONTROL
#define XGMAC_PPS_MAXIDX(x)
#define XGMAC_PPS_MINIDX(x)
#define XGMAC_PPSx_MASK(x)
#define XGMAC_TRGTMODSELx(x, val)
#define XGMAC_PPSCMDx(x, val)
#define XGMAC_PPSCMD_START
#define XGMAC_PPSCMD_STOP
#define XGMAC_PPSENx(x)
#define XGMAC_PPSx_TARGET_TIME_SEC(x)
#define XGMAC_PPSx_TARGET_TIME_NSEC(x)
#define XGMAC_TRGTBUSY0
#define XGMAC_PPSx_INTERVAL(x)
#define XGMAC_PPSx_WIDTH(x)

/* MTL Registers */
#define XGMAC_MTL_OPMODE
#define XGMAC_FRPE
#define XGMAC_ETSALG
#define XGMAC_WRR
#define XGMAC_WFQ
#define XGMAC_DWRR
#define XGMAC_RAA
#define XGMAC_MTL_INT_STATUS
#define XGMAC_MTL_RXQ_DMA_MAP0
#define XGMAC_MTL_RXQ_DMA_MAP1
#define XGMAC_QxMDMACH(x)
#define XGMAC_QxMDMACH_SHIFT(x)
#define XGMAC_QDDMACH
#define XGMAC_TC_PRTY_MAP0
#define XGMAC_TC_PRTY_MAP1
#define XGMAC_PSTC(x)
#define XGMAC_PSTC_SHIFT(x)
#define XGMAC_MTL_RXP_CONTROL_STATUS
#define XGMAC_RXPI
#define XGMAC_NPE
#define XGMAC_NVE
#define XGMAC_MTL_RXP_IACC_CTRL_ST
#define XGMAC_STARTBUSY
#define XGMAC_WRRDN
#define XGMAC_ADDR
#define XGMAC_MTL_RXP_IACC_DATA
#define XGMAC_MTL_ECC_CONTROL
#define XGMAC_MTL_SAFETY_INT_STATUS
#define XGMAC_MEUIS
#define XGMAC_MECIS
#define XGMAC_MTL_ECC_INT_ENABLE
#define XGMAC_RPCEIE
#define XGMAC_ECEIE
#define XGMAC_RXCEIE
#define XGMAC_TXCEIE
#define XGMAC_MTL_ECC_INT_STATUS
#define XGMAC_MTL_DPP_CONTROL
#define XGMAC_DPP_DISABLE
#define XGMAC_MTL_TXQ_OPMODE(x)
#define XGMAC_TQS
#define XGMAC_TQS_SHIFT
#define XGMAC_Q2TCMAP
#define XGMAC_Q2TCMAP_SHIFT
#define XGMAC_TTC
#define XGMAC_TTC_SHIFT
#define XGMAC_TXQEN
#define XGMAC_TXQEN_SHIFT
#define XGMAC_TSF
#define XGMAC_MTL_TCx_ETS_CONTROL(x)
#define XGMAC_MTL_TCx_QUANTUM_WEIGHT(x)
#define XGMAC_MTL_TCx_SENDSLOPE(x)
#define XGMAC_MTL_TCx_HICREDIT(x)
#define XGMAC_MTL_TCx_LOCREDIT(x)
#define XGMAC_CC
#define XGMAC_TSA
#define XGMAC_SP
#define XGMAC_CBS
#define XGMAC_ETS
#define XGMAC_MTL_RXQ_OPMODE(x)
#define XGMAC_RQS
#define XGMAC_RQS_SHIFT
#define XGMAC_EHFC
#define XGMAC_RSF
#define XGMAC_RTC
#define XGMAC_RTC_SHIFT
#define XGMAC_MTL_RXQ_FLOW_CONTROL(x)
#define XGMAC_RFD
#define XGMAC_RFD_SHIFT
#define XGMAC_RFA
#define XGMAC_RFA_SHIFT
#define XGMAC_MTL_QINTEN(x)
#define XGMAC_RXOIE
#define XGMAC_MTL_QINT_STATUS(x)
#define XGMAC_RXOVFIS
#define XGMAC_ABPSIS
#define XGMAC_TXUNFIS
#define XGMAC_MAC_REGSIZE

/* DMA Registers */
#define XGMAC_DMA_MODE
#define XGMAC_SWR
#define XGMAC_DMA_SYSBUS_MODE
#define XGMAC_WR_OSR_LMT
#define XGMAC_WR_OSR_LMT_SHIFT
#define XGMAC_RD_OSR_LMT
#define XGMAC_RD_OSR_LMT_SHIFT
#define XGMAC_EN_LPI
#define XGMAC_LPI_XIT_PKT
#define XGMAC_AAL
#define XGMAC_EAME
#define XGMAC_BLEN
#define XGMAC_BLEN256
#define XGMAC_BLEN128
#define XGMAC_BLEN64
#define XGMAC_BLEN32
#define XGMAC_BLEN16
#define XGMAC_BLEN8
#define XGMAC_BLEN4
#define XGMAC_UNDEF
#define XGMAC_TX_EDMA_CTRL
#define XGMAC_TDPS
#define XGMAC_RX_EDMA_CTRL
#define XGMAC_RDPS
#define XGMAC_DMA_TBS_CTRL0
#define XGMAC_DMA_TBS_CTRL1
#define XGMAC_DMA_TBS_CTRL2
#define XGMAC_DMA_TBS_CTRL3
#define XGMAC_FTOS
#define XGMAC_FTOV
#define XGMAC_DEF_FTOS
#define XGMAC_DMA_SAFETY_INT_STATUS
#define XGMAC_MCSIS
#define XGMAC_MSUIS
#define XGMAC_MSCIS
#define XGMAC_DEUIS
#define XGMAC_DECIS
#define XGMAC_DMA_ECC_INT_ENABLE
#define XGMAC_DCEIE
#define XGMAC_TCEIE
#define XGMAC_DMA_ECC_INT_STATUS
#define XGMAC_DMA_DPP_INT_STATUS
#define XGMAC_DMA_CH_CONTROL(x)
#define XGMAC_SPH
#define XGMAC_PBLx8
#define XGMAC_DMA_CH_TX_CONTROL(x)
#define XGMAC_EDSE
#define XGMAC_TxPBL
#define XGMAC_TxPBL_SHIFT
#define XGMAC_TSE
#define XGMAC_OSP
#define XGMAC_TXST
#define XGMAC_DMA_CH_RX_CONTROL(x)
#define XGMAC_RxPBL
#define XGMAC_RxPBL_SHIFT
#define XGMAC_RBSZ
#define XGMAC_RBSZ_SHIFT
#define XGMAC_RXST
#define XGMAC_DMA_CH_TxDESC_HADDR(x)
#define XGMAC_DMA_CH_TxDESC_LADDR(x)
#define XGMAC_DMA_CH_RxDESC_HADDR(x)
#define XGMAC_DMA_CH_RxDESC_LADDR(x)
#define XGMAC_DMA_CH_TxDESC_TAIL_LPTR(x)
#define XGMAC_DMA_CH_RxDESC_TAIL_LPTR(x)
#define XGMAC_DMA_CH_TxDESC_RING_LEN(x)
#define XGMAC_DMA_CH_RxDESC_RING_LEN(x)
#define XGMAC_DMA_CH_INT_EN(x)
#define XGMAC_NIE
#define XGMAC_AIE
#define XGMAC_RBUE
#define XGMAC_RIE
#define XGMAC_TBUE
#define XGMAC_TIE
#define XGMAC_DMA_INT_DEFAULT_EN
#define XGMAC_DMA_INT_DEFAULT_RX
#define XGMAC_DMA_INT_DEFAULT_TX
#define XGMAC_DMA_CH_Rx_WATCHDOG(x)
#define XGMAC_RWT
#define XGMAC_DMA_CH_STATUS(x)
#define XGMAC_NIS
#define XGMAC_AIS
#define XGMAC_FBE
#define XGMAC_RBU
#define XGMAC_RI
#define XGMAC_TBU
#define XGMAC_TPS
#define XGMAC_TI
#define XGMAC_REGSIZE

#define XGMAC_DMA_STATUS_MSK_COMMON
#define XGMAC_DMA_STATUS_MSK_RX
#define XGMAC_DMA_STATUS_MSK_TX

/* Descriptors */
#define XGMAC_TDES0_LTV
#define XGMAC_TDES0_LT
#define XGMAC_TDES1_LT
#define XGMAC_TDES2_IVT
#define XGMAC_TDES2_IVT_SHIFT
#define XGMAC_TDES2_IOC
#define XGMAC_TDES2_TTSE
#define XGMAC_TDES2_B2L
#define XGMAC_TDES2_B2L_SHIFT
#define XGMAC_TDES2_VTIR
#define XGMAC_TDES2_VTIR_SHIFT
#define XGMAC_TDES2_B1L
#define XGMAC_TDES3_OWN
#define XGMAC_TDES3_CTXT
#define XGMAC_TDES3_FD
#define XGMAC_TDES3_LD
#define XGMAC_TDES3_CPC
#define XGMAC_TDES3_CPC_SHIFT
#define XGMAC_TDES3_TCMSSV
#define XGMAC_TDES3_SAIC
#define XGMAC_TDES3_SAIC_SHIFT
#define XGMAC_TDES3_TBSV
#define XGMAC_TDES3_THL
#define XGMAC_TDES3_THL_SHIFT
#define XGMAC_TDES3_IVTIR
#define XGMAC_TDES3_IVTIR_SHIFT
#define XGMAC_TDES3_TSE
#define XGMAC_TDES3_IVLTV
#define XGMAC_TDES3_CIC
#define XGMAC_TDES3_CIC_SHIFT
#define XGMAC_TDES3_TPL
#define XGMAC_TDES3_VLTV
#define XGMAC_TDES3_VT
#define XGMAC_TDES3_FL
#define XGMAC_RDES2_HL
#define XGMAC_RDES3_OWN
#define XGMAC_RDES3_CTXT
#define XGMAC_RDES3_IOC
#define XGMAC_RDES3_LD
#define XGMAC_RDES3_CDA
#define XGMAC_RDES3_RSV
#define XGMAC_RDES3_L34T
#define XGMAC_RDES3_L34T_SHIFT
#define XGMAC_L34T_IP4TCP
#define XGMAC_L34T_IP4UDP
#define XGMAC_L34T_IP6TCP
#define XGMAC_L34T_IP6UDP
#define XGMAC_RDES3_ES
#define XGMAC_RDES3_PL
#define XGMAC_RDES3_TSD
#define XGMAC_RDES3_TSA

#endif /* __STMMAC_DWXGMAC2_H__ */