linux/drivers/net/ethernet/via/via-velocity.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
 * All rights reserved.
 *
 * File: via-velocity.h
 *
 * Purpose: Header file to define driver's private structures.
 *
 * Author: Chuang Liang-Shing, AJ Jiang
 *
 * Date: Jan 24, 2003
 */


#ifndef VELOCITY_H
#define VELOCITY_H

#define VELOCITY_TX_CSUM_SUPPORT

#define VELOCITY_NAME
#define VELOCITY_FULL_DRV_NAM
#define VELOCITY_VERSION

#define VELOCITY_IO_SIZE

#define PKT_BUF_SZ

#define MAX_UNITS
#define OPTION_DEFAULT

#define REV_ID_VT6110

#define BYTE_REG_BITS_ON(x,p)
#define WORD_REG_BITS_ON(x,p)
#define DWORD_REG_BITS_ON(x,p)

#define BYTE_REG_BITS_IS_ON(x,p)
#define WORD_REG_BITS_IS_ON(x,p)
#define DWORD_REG_BITS_IS_ON(x,p)

#define BYTE_REG_BITS_OFF(x,p)
#define WORD_REG_BITS_OFF(x,p)
#define DWORD_REG_BITS_OFF(x,p)

#define BYTE_REG_BITS_SET(x,m,p)
#define WORD_REG_BITS_SET(x,m,p)
#define DWORD_REG_BITS_SET(x,m,p)

#define VAR_USED(p)

/*
 * Purpose: Structures for MAX RX/TX descriptors.
 */


#define B_OWNED_BY_CHIP
#define B_OWNED_BY_HOST

/*
 * Bits in the RSR0 register
 */

#define RSR_DETAG
#define RSR_SNTAG
#define RSR_RXER
#define RSR_RL
#define RSR_CE
#define RSR_FAE
#define RSR_CRC
#define RSR_VIDM

/*
 * Bits in the RSR1 register
 */

#define RSR_RXOK
#define RSR_PFT
#define RSR_MAR
#define RSR_BAR
#define RSR_PHY
#define RSR_VTAG
#define RSR_STP
#define RSR_EDP

/*
 * Bits in the CSM register
 */

#define CSM_IPOK
#define CSM_TUPOK
#define CSM_FRAG
#define CSM_IPKT
#define CSM_TCPKT
#define CSM_UDPKT

/*
 * Bits in the TSR0 register
 */

#define TSR0_ABT
#define TSR0_OWT
#define TSR0_OWC
#define TSR0_COLS
#define TSR0_NCR3
#define TSR0_NCR2
#define TSR0_NCR1
#define TSR0_NCR0
#define TSR0_TERR
#define TSR0_FDX
#define TSR0_GMII
#define TSR0_LNKFL
#define TSR0_SHDN
#define TSR0_CRS
#define TSR0_CDH

//
// Bits in the TCR0 register
//
#define TCR0_TIC
#define TCR0_PIC
#define TCR0_VETAG
#define TCR0_IPCK
#define TCR0_UDPCK
#define TCR0_TCPCK
#define TCR0_JMBO
#define TCR0_CRC

#define TCPLS_NORMAL
#define TCPLS_START
#define TCPLS_END
#define TCPLS_MED


// max transmit or receive buffer size
#define CB_RX_BUF_SIZE
					// NOTE: must be multiple of 4

#define CB_MAX_RD_NUM
#define CB_MAX_TD_NUM

#define CB_INIT_RD_NUM_3119
#define CB_INIT_TD_NUM_3119

#define CB_INIT_RD_NUM
#define CB_INIT_TD_NUM

// for 3119
#define CB_TD_RING_NUM
#define CB_MAX_SEG_PER_PKT


/*
 *	If collisions excess 15 times , tx will abort, and
 *	if tx fifo underflow, tx will fail
 *	we should try to resend it
 */

#define CB_MAX_TX_ABORT_RETRY

/*
 *	Receive descriptor
 */

struct rdesc0 {};

struct rdesc1 {};

enum {};

struct rx_desc {} __packed;

/*
 *	Transmit descriptor
 */

struct tdesc0 {};

struct tdesc1 {} __packed;

enum {};

struct td_buf {} __packed;

struct tx_desc {};

struct velocity_rd_info {};

/*
 *	Used to track transmit side buffers.
 */

struct velocity_td_info {};

enum  velocity_owner {};


/*
 *	MAC registers and macros.
 */


#define MCAM_SIZE
#define VCAM_SIZE
#define TX_QUEUE_NO

#define MAX_HW_MIB_COUNTER
#define VELOCITY_MIN_MTU
#define VELOCITY_MAX_MTU

/*
 *	Registers in the MAC
 */

#define MAC_REG_PAR
#define MAC_REG_RCR
#define MAC_REG_TCR
#define MAC_REG_CR0_SET
#define MAC_REG_CR1_SET
#define MAC_REG_CR2_SET
#define MAC_REG_CR3_SET
#define MAC_REG_CR0_CLR
#define MAC_REG_CR1_CLR
#define MAC_REG_CR2_CLR
#define MAC_REG_CR3_CLR
#define MAC_REG_MAR
#define MAC_REG_CAM
#define MAC_REG_DEC_BASE_HI
#define MAC_REG_DBF_BASE_HI
#define MAC_REG_ISR_CTL
#define MAC_REG_ISR_HOTMR
#define MAC_REG_ISR_TSUPTHR
#define MAC_REG_ISR_RSUPTHR
#define MAC_REG_ISR_CTL1
#define MAC_REG_TXE_SR
#define MAC_REG_RXE_SR
#define MAC_REG_ISR
#define MAC_REG_ISR0
#define MAC_REG_ISR1
#define MAC_REG_ISR2
#define MAC_REG_ISR3
#define MAC_REG_IMR
#define MAC_REG_IMR0
#define MAC_REG_IMR1
#define MAC_REG_IMR2
#define MAC_REG_IMR3
#define MAC_REG_TDCSR_SET
#define MAC_REG_RDCSR_SET
#define MAC_REG_TDCSR_CLR
#define MAC_REG_RDCSR_CLR
#define MAC_REG_RDBASE_LO
#define MAC_REG_RDINDX
#define MAC_REG_TDBASE_LO
#define MAC_REG_RDCSIZE
#define MAC_REG_TDCSIZE
#define MAC_REG_TDINDX
#define MAC_REG_TDIDX0
#define MAC_REG_TDIDX1
#define MAC_REG_TDIDX2
#define MAC_REG_TDIDX3
#define MAC_REG_PAUSE_TIMER
#define MAC_REG_RBRDU
#define MAC_REG_FIFO_TEST0
#define MAC_REG_FIFO_TEST1
#define MAC_REG_CAMADDR
#define MAC_REG_CAMCR
#define MAC_REG_GFTEST
#define MAC_REG_FTSTCMD
#define MAC_REG_MIICFG
#define MAC_REG_MIISR
#define MAC_REG_PHYSR0
#define MAC_REG_PHYSR1
#define MAC_REG_MIICR
#define MAC_REG_MIIADR
#define MAC_REG_MIIDATA
#define MAC_REG_SOFT_TIMER0
#define MAC_REG_SOFT_TIMER1
#define MAC_REG_CFGA
#define MAC_REG_CFGB
#define MAC_REG_CFGC
#define MAC_REG_CFGD
#define MAC_REG_DCFG0
#define MAC_REG_DCFG1
#define MAC_REG_MCFG0
#define MAC_REG_MCFG1

#define MAC_REG_TBIST
#define MAC_REG_RBIST
#define MAC_REG_PMCC
#define MAC_REG_STICKHW
#define MAC_REG_MIBCR
#define MAC_REG_EERSV
#define MAC_REG_REVID
#define MAC_REG_MIBREAD
#define MAC_REG_BPMA
#define MAC_REG_EEWR_DATA
#define MAC_REG_BPMD_WR
#define MAC_REG_BPCMD
#define MAC_REG_BPMD_RD
#define MAC_REG_EECHKSUM
#define MAC_REG_EECSR
#define MAC_REG_EERD_DATA
#define MAC_REG_EADDR
#define MAC_REG_EMBCMD
#define MAC_REG_JMPSR0
#define MAC_REG_JMPSR1
#define MAC_REG_JMPSR2
#define MAC_REG_JMPSR3
#define MAC_REG_CHIPGSR
#define MAC_REG_TESTCFG
#define MAC_REG_DEBUG
#define MAC_REG_CHIPGCR
#define MAC_REG_WOLCR0_SET
#define MAC_REG_WOLCR1_SET
#define MAC_REG_PWCFG_SET
#define MAC_REG_WOLCFG_SET
#define MAC_REG_WOLCR0_CLR
#define MAC_REG_WOLCR1_CLR
#define MAC_REG_PWCFG_CLR
#define MAC_REG_WOLCFG_CLR
#define MAC_REG_WOLSR0_SET
#define MAC_REG_WOLSR1_SET
#define MAC_REG_WOLSR0_CLR
#define MAC_REG_WOLSR1_CLR
#define MAC_REG_PATRN_CRC0
#define MAC_REG_PATRN_CRC1
#define MAC_REG_PATRN_CRC2
#define MAC_REG_PATRN_CRC3
#define MAC_REG_PATRN_CRC4
#define MAC_REG_PATRN_CRC5
#define MAC_REG_PATRN_CRC6
#define MAC_REG_PATRN_CRC7
#define MAC_REG_BYTEMSK0_0
#define MAC_REG_BYTEMSK0_1
#define MAC_REG_BYTEMSK0_2
#define MAC_REG_BYTEMSK0_3
#define MAC_REG_BYTEMSK1_0
#define MAC_REG_BYTEMSK1_1
#define MAC_REG_BYTEMSK1_2
#define MAC_REG_BYTEMSK1_3
#define MAC_REG_BYTEMSK2_0
#define MAC_REG_BYTEMSK2_1
#define MAC_REG_BYTEMSK2_2
#define MAC_REG_BYTEMSK2_3
#define MAC_REG_BYTEMSK3_0
#define MAC_REG_BYTEMSK3_1
#define MAC_REG_BYTEMSK3_2
#define MAC_REG_BYTEMSK3_3

/*
 *	Bits in the RCR register
 */

#define RCR_AS
#define RCR_AP
#define RCR_AL
#define RCR_PROM
#define RCR_AB
#define RCR_AM
#define RCR_AR
#define RCR_SEP

/*
 *	Bits in the TCR register
 */

#define TCR_TB2BDIS
#define TCR_COLTMC1
#define TCR_COLTMC0
#define TCR_LB1
#define TCR_LB0

/*
 *	Bits in the CR0 register
 */

#define CR0_TXON
#define CR0_RXON
#define CR0_STOP
#define CR0_STRT
#define CR0_SFRST
#define CR0_TM1EN
#define CR0_TM0EN
#define CR0_DPOLL
#define CR0_DISAU
#define CR0_XONEN
#define CR0_FDXTFCEN
#define CR0_FDXRFCEN
#define CR0_HDXFCEN
#define CR0_XHITH1
#define CR0_XHITH0
#define CR0_XLTH1
#define CR0_XLTH0
#define CR0_GSPRST
#define CR0_FORSRST
#define CR0_FPHYRST
#define CR0_DIAG
#define CR0_INTPCTL
#define CR0_GINTMSK1
#define CR0_GINTMSK0

/*
 *	Bits in the CR1 register
 */

#define CR1_SFRST
#define CR1_TM1EN
#define CR1_TM0EN
#define CR1_DPOLL
#define CR1_DISAU

/*
 *	Bits in the CR2 register
 */

#define CR2_XONEN
#define CR2_FDXTFCEN
#define CR2_FDXRFCEN
#define CR2_HDXFCEN
#define CR2_XHITH1
#define CR2_XHITH0
#define CR2_XLTH1
#define CR2_XLTH0

/*
 *	Bits in the CR3 register
 */

#define CR3_GSPRST
#define CR3_FORSRST
#define CR3_FPHYRST
#define CR3_DIAG
#define CR3_INTPCTL
#define CR3_GINTMSK1
#define CR3_GINTMSK0

#define ISRCTL_UDPINT
#define ISRCTL_TSUPDIS
#define ISRCTL_RSUPDIS
#define ISRCTL_PMSK1
#define ISRCTL_PMSK0
#define ISRCTL_INTPD
#define ISRCTL_HCRLD
#define ISRCTL_SCRLD

/*
 *	Bits in the ISR_CTL1 register
 */

#define ISRCTL1_UDPINT
#define ISRCTL1_TSUPDIS
#define ISRCTL1_RSUPDIS
#define ISRCTL1_PMSK1
#define ISRCTL1_PMSK0
#define ISRCTL1_INTPD
#define ISRCTL1_HCRLD
#define ISRCTL1_SCRLD

/*
 *	Bits in the TXE_SR register
 */

#define TXESR_TFDBS
#define TXESR_TDWBS
#define TXESR_TDRBS
#define TXESR_TDSTR

/*
 *	Bits in the RXE_SR register
 */

#define RXESR_RFDBS
#define RXESR_RDWBS
#define RXESR_RDRBS
#define RXESR_RDSTR

/*
 *	Bits in the ISR register
 */

#define ISR_ISR3
#define ISR_ISR2
#define ISR_ISR1
#define ISR_ISR0
#define ISR_TXSTLI
#define ISR_RXSTLI
#define ISR_HFLD
#define ISR_UDPI
#define ISR_MIBFI
#define ISR_SHDNI
#define ISR_PHYI
#define ISR_PWEI
#define ISR_TMR1I
#define ISR_TMR0I
#define ISR_SRCI
#define ISR_LSTPEI
#define ISR_LSTEI
#define ISR_OVFI
#define ISR_FLONI
#define ISR_RACEI
#define ISR_TXWB1I
#define ISR_TXWB0I
#define ISR_PTX3I
#define ISR_PTX2I
#define ISR_PTX1I
#define ISR_PTX0I
#define ISR_PTXI
#define ISR_PRXI
#define ISR_PPTXI
#define ISR_PPRXI

/*
 *	Bits in the IMR register
 */

#define IMR_TXSTLM
#define IMR_UDPIM
#define IMR_MIBFIM
#define IMR_SHDNIM
#define IMR_PHYIM
#define IMR_PWEIM
#define IMR_TMR1IM
#define IMR_TMR0IM

#define IMR_SRCIM
#define IMR_LSTPEIM
#define IMR_LSTEIM
#define IMR_OVFIM
#define IMR_FLONIM
#define IMR_RACEIM
#define IMR_TXWB1IM
#define IMR_TXWB0IM

#define IMR_PTX3IM
#define IMR_PTX2IM
#define IMR_PTX1IM
#define IMR_PTX0IM
#define IMR_PTXIM
#define IMR_PRXIM
#define IMR_PPTXIM
#define IMR_PPRXIM

/* 0x0013FB0FUL  =  initial value of IMR */

#define INT_MASK_DEF

/*
 *	Bits in the TDCSR0/1, RDCSR0 register
 */

#define TRDCSR_DEAD
#define TRDCSR_WAK
#define TRDCSR_ACT
#define TRDCSR_RUN

/*
 *	Bits in the CAMADDR register
 */

#define CAMADDR_CAMEN
#define CAMADDR_VCAMSL

/*
 *	Bits in the CAMCR register
 */

#define CAMCR_PS1
#define CAMCR_PS0
#define CAMCR_AITRPKT
#define CAMCR_AITR16
#define CAMCR_CAMRD
#define CAMCR_CAMWR
#define CAMCR_PS_CAM_MASK
#define CAMCR_PS_CAM_DATA
#define CAMCR_PS_MAR

/*
 *	Bits in the MIICFG register
 */

#define MIICFG_MPO1
#define MIICFG_MPO0
#define MIICFG_MFDC

/*
 *	Bits in the MIISR register
 */

#define MIISR_MIDLE

/*
 *	 Bits in the PHYSR0 register
 */

#define PHYSR0_PHYRST
#define PHYSR0_LINKGD
#define PHYSR0_FDPX
#define PHYSR0_SPDG
#define PHYSR0_SPD10
#define PHYSR0_RXFLC
#define PHYSR0_TXFLC

/*
 *	Bits in the PHYSR1 register
 */

#define PHYSR1_PHYTBI

/*
 *	Bits in the MIICR register
 */

#define MIICR_MAUTO
#define MIICR_RCMD
#define MIICR_WCMD
#define MIICR_MDPM
#define MIICR_MOUT
#define MIICR_MDO
#define MIICR_MDI
#define MIICR_MDC

/*
 *	Bits in the MIIADR register
 */

#define MIIADR_SWMPL

/*
 *	Bits in the CFGA register
 */

#define CFGA_PMHCTG
#define CFGA_GPIO1PD
#define CFGA_ABSHDN
#define CFGA_PACPI

/*
 *	Bits in the CFGB register
 */

#define CFGB_GTCKOPT
#define CFGB_MIIOPT
#define CFGB_CRSEOPT
#define CFGB_OFSET
#define CFGB_CRANDOM
#define CFGB_CAP
#define CFGB_MBA
#define CFGB_BAKOPT

/*
 *	Bits in the CFGC register
 */

#define CFGC_EELOAD
#define CFGC_BROPT
#define CFGC_DLYEN
#define CFGC_DTSEL
#define CFGC_BTSEL
#define CFGC_BPS2
#define CFGC_BPS1
#define CFGC_BPS0

/*
 * Bits in the CFGD register
 */

#define CFGD_IODIS
#define CFGD_MSLVDACEN
#define CFGD_CFGDACEN
#define CFGD_PCI64EN
#define CFGD_HTMRL4

/*
 *	Bits in the DCFG1 register
 */

#define DCFG_XMWI
#define DCFG_XMRM
#define DCFG_XMRL
#define DCFG_PERDIS
#define DCFG_MRWAIT
#define DCFG_MWWAIT
#define DCFG_LATMEN

/*
 *	Bits in the MCFG0 register
 */

#define MCFG_RXARB
#define MCFG_RFT1
#define MCFG_RFT0
#define MCFG_LOWTHOPT
#define MCFG_PQEN
#define MCFG_RTGOPT
#define MCFG_VIDFR

/*
 *	Bits in the MCFG1 register
 */

#define MCFG_TXARB
#define MCFG_TXQBK1
#define MCFG_TXQBK0
#define MCFG_TXQNOBK
#define MCFG_SNAPOPT

/*
 *	Bits in the PMCC  register
 */

#define PMCC_DSI
#define PMCC_D2_DIS
#define PMCC_D1_DIS
#define PMCC_D3C_EN
#define PMCC_D3H_EN
#define PMCC_D2_EN
#define PMCC_D1_EN
#define PMCC_D0_EN

/*
 *	Bits in STICKHW
 */

#define STICKHW_SWPTAG
#define STICKHW_WOLSR
#define STICKHW_WOLEN
#define STICKHW_DS1
#define STICKHW_DS0

/*
 *	Bits in the MIBCR register
 */

#define MIBCR_MIBISTOK
#define MIBCR_MIBISTGO
#define MIBCR_MIBINC
#define MIBCR_MIBHI
#define MIBCR_MIBFRZ
#define MIBCR_MIBFLSH
#define MIBCR_MPTRINI
#define MIBCR_MIBCLR

/*
 *	Bits in the EERSV register
 */

#define EERSV_BOOT_RPL

#define EERSV_BOOT_MASK
#define EERSV_BOOT_INT19
#define EERSV_BOOT_INT18
#define EERSV_BOOT_LOCAL
#define EERSV_BOOT_BEV


/*
 *	Bits in BPCMD
 */

#define BPCMD_BPDNE
#define BPCMD_EBPWR
#define BPCMD_EBPRD

/*
 *	Bits in the EECSR register
 */

#define EECSR_EMBP
#define EECSR_RELOAD
#define EECSR_DPM
#define EECSR_ECS
#define EECSR_ECK
#define EECSR_EDI
#define EECSR_EDO

/*
 *	Bits in the EMBCMD register
 */

#define EMBCMD_EDONE
#define EMBCMD_EWDIS
#define EMBCMD_EWEN
#define EMBCMD_EWR
#define EMBCMD_ERD

/*
 *	Bits in TESTCFG register
 */

#define TESTCFG_HBDIS

/*
 *	Bits in CHIPGCR register
 */

#define CHIPGCR_FCGMII
#define CHIPGCR_FCFDX
#define CHIPGCR_FCRESV
#define CHIPGCR_FCMODE
#define CHIPGCR_LPSOPT
#define CHIPGCR_TM1US
#define CHIPGCR_TM0US
#define CHIPGCR_PHYINTEN

/*
 *	Bits in WOLCR0
 */

#define WOLCR_MSWOLEN7
#define WOLCR_MSWOLEN6
#define WOLCR_MSWOLEN5
#define WOLCR_MSWOLEN4
#define WOLCR_MSWOLEN3
#define WOLCR_MSWOLEN2
#define WOLCR_MSWOLEN1
#define WOLCR_MSWOLEN0
#define WOLCR_ARP_EN

/*
 *	Bits in WOLCR1
 */

#define WOLCR_LINKOFF_EN
#define WOLCR_LINKON_EN
#define WOLCR_MAGIC_EN
#define WOLCR_UNICAST_EN


/*
 *	Bits in PWCFG
 */

#define PWCFG_PHYPWOPT
#define PWCFG_PCISTICK
#define PWCFG_WOLTYPE
#define PWCFG_LEGCY_WOL
#define PWCFG_PMCSR_PME_SR
#define PWCFG_PMCSR_PME_EN
#define PWCFG_LEGACY_WOLSR
#define PWCFG_LEGACY_WOLEN

/*
 *	Bits in WOLCFG
 */

#define WOLCFG_PMEOVR
#define WOLCFG_SAM
#define WOLCFG_SAB
#define WOLCFG_SMIIACC
#define WOLCFG_SGENWH
#define WOLCFG_PHYINTEN
/*
 *	Bits in WOLSR1
 */

#define WOLSR_LINKOFF_INT
#define WOLSR_LINKON_INT
#define WOLSR_MAGIC_INT
#define WOLSR_UNICAST_INT

/*
 *	Ethernet address filter type
 */

#define PKT_TYPE_NONE
#define PKT_TYPE_DIRECTED
#define PKT_TYPE_MULTICAST
#define PKT_TYPE_ALL_MULTICAST
#define PKT_TYPE_BROADCAST
#define PKT_TYPE_PROMISCUOUS
#define PKT_TYPE_LONG
#define PKT_TYPE_RUNT
#define PKT_TYPE_ERROR

/*
 *	Loopback mode
 */

#define MAC_LB_NONE
#define MAC_LB_INTERNAL
#define MAC_LB_EXTERNAL

/*
 *	Enabled mask value of irq
 */

#if defined(_SIM)
#define IMR_MASK_VALUE

#else
#define IMR_MASK_VALUE
#endif

/*
 *	Revision id
 */

#define REV_ID_VT3119_A0
#define REV_ID_VT3119_A1
#define REV_ID_VT3216_A0

/*
 *	Max time out delay time
 */

#define W_MAX_TIMEOUT


/*
 *	MAC registers as a structure. Cannot be directly accessed this
 *	way but generates offsets for readl/writel() calls
 */

struct mac_regs {};


enum hw_mib {};

enum chip_type {};

struct velocity_info_tbl {};

#define mac_hw_mibs_init(regs)

#define mac_read_isr(regs)
#define mac_write_isr(regs, x)
#define mac_clear_isr(regs)

#define mac_write_int_mask(mask, regs)
#define mac_disable_int(regs)
#define mac_enable_int(regs)

#define mac_set_dma_length(regs, n)

#define mac_set_rx_thresh(regs, n)

#define mac_rx_queue_run(regs)

#define mac_rx_queue_wake(regs)

#define mac_tx_queue_run(regs, n)

#define mac_tx_queue_wake(regs, n)

static inline void mac_eeprom_reload(struct mac_regs __iomem * regs) {}

/*
 * Header for WOL definitions. Used to compute hashes
 */

MCAM_ADDR;

struct arp_packet {} __packed;

struct _magic_packet {} __packed;

/*
 *	Store for chip context when saving and restoring status. Not
 *	all fields are saved/restored currently.
 */

struct velocity_context {};

/*
 *	Registers in the MII (offset unit is WORD)
 */

// Marvell 88E1000/88E1000S
#define MII_REG_PSCR

//
// Bits in the Silicon revision register
//

#define TCSR_ECHODIS
#define AUXCR_MDPPS

// Bits in the PLED register
#define PLED_LALBE

// Marvell 88E1000/88E1000S Bits in the PHY specific control register (10h)
#define PSCR_ACRSTX

#define PHYID_CICADA_CS8201
#define PHYID_VT3216_32BIT
#define PHYID_VT3216_64BIT
#define PHYID_MARVELL_1000
#define PHYID_MARVELL_1000S
#define PHYID_ICPLUS_IP101A
#define PHYID_REV_ID_MASK

#define PHYID_GET_PHY_ID(i)

#define MII_REG_BITS_ON(x,i,p)

#define MII_REG_BITS_OFF(x,i,p)

#define MII_REG_BITS_IS_ON(x,i,p)

#define MII_GET_PHY_ID(p)

#define VELOCITY_WOL_MAGIC
#define VELOCITY_WOL_PHY
#define VELOCITY_WOL_ARP
#define VELOCITY_WOL_UCAST
#define VELOCITY_WOL_BCAST
#define VELOCITY_WOL_MCAST
#define VELOCITY_WOL_MAGIC_SEC

/*
 *	Flags for options
 */

#define VELOCITY_FLAGS_TAGGING
#define VELOCITY_FLAGS_RX_CSUM
#define VELOCITY_FLAGS_IP_ALIGN
#define VELOCITY_FLAGS_VAL_PKT_LEN

#define VELOCITY_FLAGS_FLOW_CTRL

/*
 *	Flags for driver status
 */

#define VELOCITY_FLAGS_OPENED
#define VELOCITY_FLAGS_VMNS_CONNECTED
#define VELOCITY_FLAGS_VMNS_COMMITTED
#define VELOCITY_FLAGS_WOL_ENABLED

/*
 *	Flags for MII status
 */

#define VELOCITY_LINK_FAIL
#define VELOCITY_SPEED_10
#define VELOCITY_SPEED_100
#define VELOCITY_SPEED_1000
#define VELOCITY_DUPLEX_FULL
#define VELOCITY_AUTONEG_ENABLE
#define VELOCITY_FORCED_BY_EEPROM

/*
 *	For velocity_set_media_duplex
 */

#define VELOCITY_LINK_CHANGE

enum speed_opt {};

enum velocity_init_type {};

enum velocity_flow_cntl_type {};

struct velocity_opt {};

#define AVAIL_TD(p,q)

#define GET_RD_BY_IDX(vptr, idx)

struct velocity_info {};

/**
 *	velocity_get_ip		-	find an IP address for the device
 *	@vptr: Velocity to query
 *
 *	Dig out an IP address for this interface so that we can
 *	configure wakeup with WOL for ARP. If there are multiple IP
 *	addresses on this chain then we use the first - multi-IP WOL is not
 *	supported.
 *
 */

static inline int velocity_get_ip(struct velocity_info *vptr)
{}

/**
 *	velocity_update_hw_mibs	-	fetch MIB counters from chip
 *	@vptr: velocity to update
 *
 *	The velocity hardware keeps certain counters in the hardware
 * 	side. We need to read these when the user asks for statistics
 *	or when they overflow (causing an interrupt). The read of the
 *	statistic clears it, so we keep running master counters in user
 *	space.
 */

static inline void velocity_update_hw_mibs(struct velocity_info *vptr)
{}

/**
 *	init_flow_control_register 	-	set up flow control
 *	@vptr: velocity to configure
 *
 *	Configure the flow control registers for this velocity device.
 */

static inline void init_flow_control_register(struct velocity_info *vptr)
{}


#endif