linux/drivers/net/usb/smsc75xx.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
 /***************************************************************************
 *
 * Copyright (C) 2007-2010 SMSC
 *
 *****************************************************************************/

#ifndef _SMSC75XX_H
#define _SMSC75XX_H

/* Tx command words */
#define TX_CMD_A_LSO
#define TX_CMD_A_IPE
#define TX_CMD_A_TPE
#define TX_CMD_A_IVTG
#define TX_CMD_A_RVTG
#define TX_CMD_A_FCS
#define TX_CMD_A_LEN

#define TX_CMD_B_MSS
#define TX_CMD_B_MSS_SHIFT
#define TX_MSS_MIN
#define TX_CMD_B_VTAG

/* Rx command words */
#define RX_CMD_A_ICE
#define RX_CMD_A_TCE
#define RX_CMD_A_IPV
#define RX_CMD_A_PID
#define RX_CMD_A_PID_NIP
#define RX_CMD_A_PID_TCP
#define RX_CMD_A_PID_UDP
#define RX_CMD_A_PID_PP
#define RX_CMD_A_PFF
#define RX_CMD_A_BAM
#define RX_CMD_A_MAM
#define RX_CMD_A_FVTG
#define RX_CMD_A_RED
#define RX_CMD_A_RWT
#define RX_CMD_A_RUNT
#define RX_CMD_A_LONG
#define RX_CMD_A_RXE
#define RX_CMD_A_DRB
#define RX_CMD_A_FCS
#define RX_CMD_A_UAM
#define RX_CMD_A_LCSM
#define RX_CMD_A_LEN

#define RX_CMD_B_CSUM
#define RX_CMD_B_CSUM_SHIFT
#define RX_CMD_B_VTAG

/* SCSRs */
#define ID_REV

#define FPGA_REV

#define BOND_CTL

#define INT_STS
#define INT_STS_RDFO_INT
#define INT_STS_TXE_INT
#define INT_STS_MACRTO_INT
#define INT_STS_TX_DIS_INT
#define INT_STS_RX_DIS_INT
#define INT_STS_PHY_INT_
#define INT_STS_MAC_ERR_INT
#define INT_STS_TDFU
#define INT_STS_TDFO
#define INT_STS_GPIOS
#define INT_STS_CLEAR_ALL

#define HW_CFG
#define HW_CFG_SMDET_STS
#define HW_CFG_SMDET_EN
#define HW_CFG_EEM
#define HW_CFG_RST_PROTECT
#define HW_CFG_PORT_SWAP
#define HW_CFG_PHY_BOOST
#define HW_CFG_PHY_BOOST_NORMAL
#define HW_CFG_PHY_BOOST_4
#define HW_CFG_PHY_BOOST_8
#define HW_CFG_PHY_BOOST_12
#define HW_CFG_LEDB
#define HW_CFG_BIR
#define HW_CFG_SBP
#define HW_CFG_IME
#define HW_CFG_MEF
#define HW_CFG_ETC
#define HW_CFG_BCE
#define HW_CFG_LRST
#define HW_CFG_SRST

#define PMT_CTL
#define PMT_CTL_PHY_PWRUP
#define PMT_CTL_RES_CLR_WKP_EN
#define PMT_CTL_DEV_RDY
#define PMT_CTL_SUS_MODE
#define PMT_CTL_SUS_MODE_0
#define PMT_CTL_SUS_MODE_1
#define PMT_CTL_SUS_MODE_2
#define PMT_CTL_SUS_MODE_3
#define PMT_CTL_PHY_RST
#define PMT_CTL_WOL_EN
#define PMT_CTL_ED_EN
#define PMT_CTL_WUPS
#define PMT_CTL_WUPS_NO
#define PMT_CTL_WUPS_ED
#define PMT_CTL_WUPS_WOL
#define PMT_CTL_WUPS_MULTI

#define LED_GPIO_CFG
#define LED_GPIO_CFG_LED2_FUN_SEL
#define LED_GPIO_CFG_LED10_FUN_SEL
#define LED_GPIO_CFG_LEDGPIO_EN
#define LED_GPIO_CFG_LEDGPIO_EN_0
#define LED_GPIO_CFG_LEDGPIO_EN_1
#define LED_GPIO_CFG_LEDGPIO_EN_2
#define LED_GPIO_CFG_LEDGPIO_EN_3
#define LED_GPIO_CFG_GPBUF
#define LED_GPIO_CFG_GPBUF_0
#define LED_GPIO_CFG_GPBUF_1
#define LED_GPIO_CFG_GPBUF_2
#define LED_GPIO_CFG_GPBUF_3
#define LED_GPIO_CFG_GPDIR
#define LED_GPIO_CFG_GPDIR_0
#define LED_GPIO_CFG_GPDIR_1
#define LED_GPIO_CFG_GPDIR_2
#define LED_GPIO_CFG_GPDIR_3
#define LED_GPIO_CFG_GPDATA
#define LED_GPIO_CFG_GPDATA_0
#define LED_GPIO_CFG_GPDATA_1
#define LED_GPIO_CFG_GPDATA_2
#define LED_GPIO_CFG_GPDATA_3

#define GPIO_CFG
#define GPIO_CFG_SHIFT
#define GPIO_CFG_GPEN
#define GPIO_CFG_GPBUF
#define GPIO_CFG_GPDIR
#define GPIO_CFG_GPDATA

#define GPIO_WAKE
#define GPIO_WAKE_PHY_LINKUP_EN
#define GPIO_WAKE_POL
#define GPIO_WAKE_POL_SHIFT
#define GPIO_WAKE_WK

#define DP_SEL
#define DP_SEL_DPRDY
#define DP_SEL_RSEL
#define DP_SEL_URX
#define DP_SEL_VHF
#define DP_SEL_VHF_HASH_LEN
#define DP_SEL_VHF_VLAN_LEN
#define DP_SEL_LSO_HEAD
#define DP_SEL_FCT_RX
#define DP_SEL_FCT_TX
#define DP_SEL_DESCRIPTOR
#define DP_SEL_WOL

#define DP_CMD
#define DP_CMD_WRITE
#define DP_CMD_READ

#define DP_ADDR

#define DP_DATA

#define BURST_CAP
#define BURST_CAP_MASK

#define INT_EP_CTL
#define INT_EP_CTL_INTEP_ON
#define INT_EP_CTL_RDFO_EN
#define INT_EP_CTL_TXE_EN
#define INT_EP_CTL_MACROTO_EN
#define INT_EP_CTL_TX_DIS_EN
#define INT_EP_CTL_RX_DIS_EN
#define INT_EP_CTL_PHY_EN_
#define INT_EP_CTL_MAC_ERR_EN
#define INT_EP_CTL_TDFU_EN
#define INT_EP_CTL_TDFO_EN
#define INT_EP_CTL_RX_FIFO_EN
#define INT_EP_CTL_GPIOX_EN

#define BULK_IN_DLY
#define BULK_IN_DLY_MASK

#define E2P_CMD
#define E2P_CMD_BUSY
#define E2P_CMD_MASK
#define E2P_CMD_READ
#define E2P_CMD_EWDS
#define E2P_CMD_EWEN
#define E2P_CMD_WRITE
#define E2P_CMD_WRAL
#define E2P_CMD_ERASE
#define E2P_CMD_ERAL
#define E2P_CMD_RELOAD
#define E2P_CMD_TIMEOUT
#define E2P_CMD_LOADED
#define E2P_CMD_ADDR

#define MAX_EEPROM_SIZE

#define E2P_DATA
#define E2P_DATA_MASK_

#define RFE_CTL
#define RFE_CTL_TCPUDP_CKM
#define RFE_CTL_IP_CKM
#define RFE_CTL_AB
#define RFE_CTL_AM
#define RFE_CTL_AU
#define RFE_CTL_VS
#define RFE_CTL_UF
#define RFE_CTL_VF
#define RFE_CTL_SPF
#define RFE_CTL_MHF
#define RFE_CTL_DHF
#define RFE_CTL_DPF
#define RFE_CTL_RST_RF

#define VLAN_TYPE
#define VLAN_TYPE_MASK

#define FCT_RX_CTL
#define FCT_RX_CTL_EN
#define FCT_RX_CTL_RST
#define FCT_RX_CTL_SBF
#define FCT_RX_CTL_OVERFLOW
#define FCT_RX_CTL_FRM_DROP
#define FCT_RX_CTL_RX_NOT_EMPTY
#define FCT_RX_CTL_RX_EMPTY
#define FCT_RX_CTL_RX_DISABLED
#define FCT_RX_CTL_RXUSED

#define FCT_TX_CTL
#define FCT_TX_CTL_EN
#define FCT_TX_CTL_RST
#define FCT_TX_CTL_TX_NOT_EMPTY
#define FCT_TX_CTL_TX_EMPTY
#define FCT_TX_CTL_TX_DISABLED
#define FCT_TX_CTL_TXUSED

#define FCT_RX_FIFO_END
#define FCT_RX_FIFO_END_MASK

#define FCT_TX_FIFO_END
#define FCT_TX_FIFO_END_MASK

#define FCT_FLOW
#define FCT_FLOW_THRESHOLD_OFF
#define FCT_FLOW_THRESHOLD_OFF_SHIFT
#define FCT_FLOW_THRESHOLD_ON

/* MAC CSRs */
#define MAC_CR
#define MAC_CR_ADP
#define MAC_CR_ADD
#define MAC_CR_ASD
#define MAC_CR_INT_LOOP
#define MAC_CR_BOLMT
#define MAC_CR_FDPX
#define MAC_CR_CFG
#define MAC_CR_CFG_10
#define MAC_CR_CFG_100
#define MAC_CR_CFG_1000
#define MAC_CR_RST

#define MAC_RX
#define MAC_RX_MAX_SIZE
#define MAC_RX_MAX_SIZE_SHIFT
#define MAC_RX_FCS_STRIP
#define MAC_RX_FSE
#define MAC_RX_RXD
#define MAC_RX_RXEN

#define MAC_TX
#define MAC_TX_BFCS
#define MAC_TX_TXD
#define MAC_TX_TXEN

#define FLOW
#define FLOW_FORCE_FC
#define FLOW_TX_FCEN
#define FLOW_RX_FCEN
#define FLOW_FPF
#define FLOW_PAUSE_TIME

#define RAND_SEED
#define RAND_SEED_MASK

#define ERR_STS
#define ERR_STS_FCS_ERR
#define ERR_STS_LFRM_ERR
#define ERR_STS_RUNT_ERR
#define ERR_STS_COLLISION_ERR
#define ERR_STS_ALIGN_ERR
#define ERR_STS_URUN_ERR

#define RX_ADDRH
#define RX_ADDRH_MASK

#define RX_ADDRL

#define MII_ACCESS
#define MII_ACCESS_PHY_ADDR
#define MII_ACCESS_PHY_ADDR_SHIFT
#define MII_ACCESS_REG_ADDR
#define MII_ACCESS_REG_ADDR_SHIFT
#define MII_ACCESS_READ
#define MII_ACCESS_WRITE
#define MII_ACCESS_BUSY

#define MII_DATA
#define MII_DATA_MASK

#define WUCSR
#define WUCSR_PFDA_FR
#define WUCSR_WUFR
#define WUCSR_MPR
#define WUCSR_BCAST_FR
#define WUCSR_PFDA_EN
#define WUCSR_WUEN
#define WUCSR_MPEN
#define WUCSR_BCST_EN

#define WUF_CFGX
#define WUF_CFGX_EN
#define WUF_CFGX_ATYPE
#define WUF_CFGX_ATYPE_UNICAST
#define WUF_CFGX_ATYPE_MULTICAST
#define WUF_CFGX_ATYPE_ALL
#define WUF_CFGX_PATTERN_OFFSET
#define WUF_CFGX_PATTERN_OFFSET_SHIFT
#define WUF_CFGX_CRC16
#define WUF_NUM

#define WUF_MASKX
#define WUF_MASKX_AVALID
#define WUF_MASKX_ATYPE

#define ADDR_FILTX
#define ADDR_FILTX_FB_VALID
#define ADDR_FILTX_FB_TYPE
#define ADDR_FILTX_FB_ADDRHI
#define ADDR_FILTX_SB_ADDRLO

#define WUCSR2
#define WUCSR2_NS_RCD
#define WUCSR2_ARP_RCD
#define WUCSR2_TCPSYN_RCD
#define WUCSR2_NS_OFFLOAD
#define WUCSR2_ARP_OFFLOAD
#define WUCSR2_TCPSYN_OFFLOAD

#define WOL_FIFO_STS

#define IPV6_ADDRX

#define IPV4_ADDRX


/* Vendor-specific PHY Definitions */

/* Mode Control/Status Register */
#define PHY_MODE_CTRL_STS
#define MODE_CTRL_STS_EDPWRDOWN
#define MODE_CTRL_STS_ENERGYON

#define PHY_INT_SRC
#define PHY_INT_SRC_ENERGY_ON
#define PHY_INT_SRC_ANEG_COMP
#define PHY_INT_SRC_REMOTE_FAULT
#define PHY_INT_SRC_LINK_DOWN
#define PHY_INT_SRC_CLEAR_ALL

#define PHY_INT_MASK
#define PHY_INT_MASK_ENERGY_ON
#define PHY_INT_MASK_ANEG_COMP
#define PHY_INT_MASK_REMOTE_FAULT
#define PHY_INT_MASK_LINK_DOWN
#define PHY_INT_MASK_DEFAULT

#define PHY_SPECIAL
#define PHY_SPECIAL_SPD
#define PHY_SPECIAL_SPD_10HALF
#define PHY_SPECIAL_SPD_10FULL
#define PHY_SPECIAL_SPD_100HALF
#define PHY_SPECIAL_SPD_100FULL

/* USB Vendor Requests */
#define USB_VENDOR_REQUEST_WRITE_REGISTER
#define USB_VENDOR_REQUEST_READ_REGISTER
#define USB_VENDOR_REQUEST_GET_STATS

/* Interrupt Endpoint status word bitfields */
#define INT_ENP_RDFO_INT
#define INT_ENP_TXE_INT
#define INT_ENP_TX_DIS_INT
#define INT_ENP_RX_DIS_INT
#define INT_ENP_PHY_INT
#define INT_ENP_MAC_ERR_INT
#define INT_ENP_RX_FIFO_DATA_INT

#endif /* _SMSC75XX_H */