linux/drivers/net/ethernet/smsc/smsc9420.h

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

#ifndef _SMSC9420_H
#define _SMSC9420_H

#define TX_RING_SIZE
#define RX_RING_SIZE

/* interrupt deassertion in multiples of 10us */
#define INT_DEAS_TIME

#define SMSC_BAR

#ifdef __BIG_ENDIAN
/* Register set is duplicated for BE at an offset of 0x200 */
#define LAN9420_CPSR_ENDIAN_OFFSET
#else
#define LAN9420_CPSR_ENDIAN_OFFSET
#endif

#define PCI_VENDOR_ID_9420
#define PCI_DEVICE_ID_9420

#define LAN_REGISTER_EXTENT

#define SMSC9420_EEPROM_SIZE
#define SMSC9420_EEPROM_MAGIC

#define PKT_BUF_SZ

/***********************************************/
/* DMA Controller Control and Status Registers */
/***********************************************/
#define BUS_MODE
#define BUS_MODE_SWR_
#define BUS_MODE_DMA_BURST_LENGTH_1
#define BUS_MODE_DMA_BURST_LENGTH_2
#define BUS_MODE_DMA_BURST_LENGTH_4
#define BUS_MODE_DMA_BURST_LENGTH_8
#define BUS_MODE_DMA_BURST_LENGTH_16
#define BUS_MODE_DMA_BURST_LENGTH_32
#define BUS_MODE_DBO_

#define TX_POLL_DEMAND

#define RX_POLL_DEMAND

#define RX_BASE_ADDR

#define TX_BASE_ADDR

#define DMAC_STATUS
#define DMAC_STS_TS_
#define DMAC_STS_RS_
#define DMAC_STS_NIS_
#define DMAC_STS_AIS_
#define DMAC_STS_RWT_
#define DMAC_STS_RXPS_
#define DMAC_STS_RXBU_
#define DMAC_STS_RX_
#define DMAC_STS_TXUNF_
#define DMAC_STS_TXBU_
#define DMAC_STS_TXPS_
#define DMAC_STS_TX_

#define DMAC_CONTROL
#define DMAC_CONTROL_TTM_
#define DMAC_CONTROL_SF_
#define DMAC_CONTROL_ST_
#define DMAC_CONTROL_OSF_
#define DMAC_CONTROL_SR_

#define DMAC_INTR_ENA
#define DMAC_INTR_ENA_NIS_
#define DMAC_INTR_ENA_AIS_
#define DMAC_INTR_ENA_RWT_
#define DMAC_INTR_ENA_RXPS_
#define DMAC_INTR_ENA_RXBU_
#define DMAC_INTR_ENA_RX_
#define DMAC_INTR_ENA_TXBU_
#define DMAC_INTR_ENA_TXPS_
#define DMAC_INTR_ENA_TX_

#define MISS_FRAME_CNTR

#define TX_BUFF_ADDR

#define RX_BUFF_ADDR

/* Transmit Descriptor Bit Defs */
#define TDES0_OWN_
#define TDES0_ERROR_SUMMARY_
#define TDES0_LOSS_OF_CARRIER_
#define TDES0_NO_CARRIER_
#define TDES0_LATE_COLLISION_
#define TDES0_EXCESSIVE_COLLISIONS_
#define TDES0_HEARTBEAT_FAIL_
#define TDES0_COLLISION_COUNT_MASK_
#define TDES0_COLLISION_COUNT_SHFT_
#define TDES0_EXCESSIVE_DEFERRAL_
#define TDES0_DEFERRED_

#define TDES1_IC_
#define TDES1_LS_
#define TDES1_FS_
#define TDES1_TXCSEN_
#define TDES1_TER_
#define TDES1_TCH_

/* Receive Descriptor 0 Bit Defs */
#define RDES0_OWN_
#define RDES0_FRAME_LENGTH_MASK_
#define RDES0_FRAME_LENGTH_SHFT_
#define RDES0_ERROR_SUMMARY_
#define RDES0_DESCRIPTOR_ERROR_
#define RDES0_LENGTH_ERROR_
#define RDES0_RUNT_FRAME_
#define RDES0_MULTICAST_FRAME_
#define RDES0_FIRST_DESCRIPTOR_
#define RDES0_LAST_DESCRIPTOR_
#define RDES0_FRAME_TOO_LONG_
#define RDES0_COLLISION_SEEN_
#define RDES0_FRAME_TYPE_
#define RDES0_WATCHDOG_TIMEOUT_
#define RDES0_MII_ERROR_
#define RDES0_DRIBBLING_BIT_
#define RDES0_CRC_ERROR_

/* Receive Descriptor 1 Bit Defs */
#define RDES1_RER_

/***********************************************/
/*       MAC Control and Status Registers      */
/***********************************************/
#define MAC_CR
#define MAC_CR_RXALL_
#define MAC_CR_DIS_RXOWN_
#define MAC_CR_LOOPBK_
#define MAC_CR_FDPX_
#define MAC_CR_MCPAS_
#define MAC_CR_PRMS_
#define MAC_CR_INVFILT_
#define MAC_CR_PASSBAD_
#define MAC_CR_HFILT_
#define MAC_CR_HPFILT_
#define MAC_CR_LCOLL_
#define MAC_CR_DIS_BCAST_
#define MAC_CR_DIS_RTRY_
#define MAC_CR_PADSTR_
#define MAC_CR_BOLMT_MSK
#define MAC_CR_MFCHK_
#define MAC_CR_TXEN_
#define MAC_CR_RXEN_

#define ADDRH

#define ADDRL

#define HASHH

#define HASHL

#define MII_ACCESS
#define MII_ACCESS_MII_BUSY_
#define MII_ACCESS_MII_WRITE_
#define MII_ACCESS_MII_READ_
#define MII_ACCESS_INDX_MSK_
#define MII_ACCESS_PHYADDR_MSK_
#define MII_ACCESS_INDX_SHFT_CNT
#define MII_ACCESS_PHYADDR_SHFT_CNT

#define MII_DATA

#define FLOW

#define VLAN1

#define VLAN2

#define WUFF

#define WUCSR

#define COE_CR
#define TX_COE_EN
#define RX_COE_MODE
#define RX_COE_EN

/***********************************************/
/*     System Control and Status Registers     */
/***********************************************/
#define ID_REV

#define INT_CTL
#define INT_CTL_SW_INT_EN_
#define INT_CTL_SBERR_INT_EN_
#define INT_CTL_MBERR_INT_EN_
#define INT_CTL_GPT_INT_EN_
#define INT_CTL_PHY_INT_EN_
#define INT_CTL_WAKE_INT_EN_

#define INT_STAT
#define INT_STAT_SW_INT_
#define INT_STAT_MBERR_INT_
#define INT_STAT_SBERR_INT_
#define INT_STAT_GPT_INT_
#define INT_STAT_PHY_INT_
#define INT_STAT_WAKE_INT_
#define INT_STAT_DMAC_INT_

#define INT_CFG
#define INT_CFG_IRQ_INT_
#define INT_CFG_IRQ_EN_
#define INT_CFG_INT_DEAS_CLR_
#define INT_CFG_INT_DEAS_MASK

#define GPIO_CFG
#define GPIO_CFG_LED_3_
#define GPIO_CFG_LED_2_
#define GPIO_CFG_LED_1_
#define GPIO_CFG_EEPR_EN_

#define GPT_CFG
#define GPT_CFG_TIMER_EN_

#define GPT_CNT

#define BUS_CFG
#define BUS_CFG_RXTXWEIGHT_1_1
#define BUS_CFG_RXTXWEIGHT_2_1
#define BUS_CFG_RXTXWEIGHT_3_1
#define BUS_CFG_RXTXWEIGHT_4_1

#define PMT_CTRL

#define FREE_RUN

#define E2P_CMD
#define E2P_CMD_EPC_BUSY_
#define E2P_CMD_EPC_CMD_
#define E2P_CMD_EPC_CMD_READ_
#define E2P_CMD_EPC_CMD_EWDS_
#define E2P_CMD_EPC_CMD_EWEN_
#define E2P_CMD_EPC_CMD_WRITE_
#define E2P_CMD_EPC_CMD_WRAL_
#define E2P_CMD_EPC_CMD_ERASE_
#define E2P_CMD_EPC_CMD_ERAL_
#define E2P_CMD_EPC_CMD_RELOAD_
#define E2P_CMD_EPC_TIMEOUT_
#define E2P_CMD_MAC_ADDR_LOADED_
#define E2P_CMD_EPC_ADDR_

#define E2P_DATA
#define E2P_DATA_EEPROM_DATA_

#endif /* _SMSC9420_H */