linux/drivers/net/ethernet/chelsio/cxgb/fpga_defs.h

/* SPDX-License-Identifier: GPL-2.0 */
/* $Date: 2005/03/07 23:59:05 $ $RCSfile: fpga_defs.h,v $ $Revision: 1.4 $ */

/*
 * FPGA specific definitions
 */

#ifndef __CHELSIO_FPGA_DEFS_H__
#define __CHELSIO_FPGA_DEFS_H__

#define FPGA_PCIX_ADDR_VERSION
#define FPGA_PCIX_ADDR_STAT

/* FPGA master interrupt Cause/Enable bits */
#define FPGA_PCIX_INTERRUPT_SGE_ERROR
#define FPGA_PCIX_INTERRUPT_SGE_DATA
#define FPGA_PCIX_INTERRUPT_TP
#define FPGA_PCIX_INTERRUPT_MC3
#define FPGA_PCIX_INTERRUPT_GMAC
#define FPGA_PCIX_INTERRUPT_PCIX

/* TP interrupt register addresses */
#define FPGA_TP_ADDR_INTERRUPT_ENABLE
#define FPGA_TP_ADDR_INTERRUPT_CAUSE
#define FPGA_TP_ADDR_VERSION

/* TP interrupt Cause/Enable bits */
#define FPGA_TP_INTERRUPT_MC4
#define FPGA_TP_INTERRUPT_MC5

/*
 * PM interrupt register addresses
 */
#define FPGA_MC3_REG_INTRENABLE
#define FPGA_MC3_REG_INTRCAUSE
#define FPGA_MC3_REG_VERSION

/*
 * GMAC interrupt register addresses
 */
#define FPGA_GMAC_ADDR_INTERRUPT_ENABLE
#define FPGA_GMAC_ADDR_INTERRUPT_CAUSE
#define FPGA_GMAC_ADDR_VERSION

/* GMAC Cause/Enable bits */
#define FPGA_GMAC_INTERRUPT_PORT0
#define FPGA_GMAC_INTERRUPT_PORT1
#define FPGA_GMAC_INTERRUPT_PORT2
#define FPGA_GMAC_INTERRUPT_PORT3

/* MI0 registers */
#define A_MI0_CLK

#define S_MI0_CLK_DIV
#define M_MI0_CLK_DIV
#define V_MI0_CLK_DIV(x)
#define G_MI0_CLK_DIV(x)

#define S_MI0_CLK_CNT
#define M_MI0_CLK_CNT
#define V_MI0_CLK_CNT(x)
#define G_MI0_CLK_CNT(x)

#define A_MI0_CSR

#define S_MI0_CSR_POLL
#define V_MI0_CSR_POLL(x)
#define F_MI0_CSR_POLL

#define S_MI0_PREAMBLE
#define V_MI0_PREAMBLE(x)
#define F_MI0_PREAMBLE

#define S_MI0_INTR_ENABLE
#define V_MI0_INTR_ENABLE(x)
#define F_MI0_INTR_ENABLE

#define S_MI0_BUSY
#define V_MI0_BUSY(x)
#define F_MI0_BUSY

#define S_MI0_MDIO
#define V_MI0_MDIO(x)
#define F_MI0_MDIO

#define A_MI0_ADDR

#define S_MI0_PHY_REG_ADDR
#define M_MI0_PHY_REG_ADDR
#define V_MI0_PHY_REG_ADDR(x)
#define G_MI0_PHY_REG_ADDR(x)

#define S_MI0_PHY_ADDR
#define M_MI0_PHY_ADDR
#define V_MI0_PHY_ADDR(x)
#define G_MI0_PHY_ADDR(x)

#define A_MI0_DATA_EXT
#define A_MI0_DATA_INT

/* GMAC registers */
#define A_GMAC_MACID_LO
#define A_GMAC_MACID_HI
#define A_GMAC_CSR

#define S_INTERFACE
#define M_INTERFACE
#define V_INTERFACE(x)
#define G_INTERFACE(x)

#define S_MAC_TX_ENABLE
#define V_MAC_TX_ENABLE(x)
#define F_MAC_TX_ENABLE

#define S_MAC_RX_ENABLE
#define V_MAC_RX_ENABLE(x)
#define F_MAC_RX_ENABLE

#define S_MAC_LB_ENABLE
#define V_MAC_LB_ENABLE(x)
#define F_MAC_LB_ENABLE

#define S_MAC_SPEED
#define M_MAC_SPEED
#define V_MAC_SPEED(x)
#define G_MAC_SPEED(x)

#define S_MAC_HD_FC_ENABLE
#define V_MAC_HD_FC_ENABLE(x)
#define F_MAC_HD_FC_ENABLE

#define S_MAC_HALF_DUPLEX
#define V_MAC_HALF_DUPLEX(x)
#define F_MAC_HALF_DUPLEX

#define S_MAC_PROMISC
#define V_MAC_PROMISC(x)
#define F_MAC_PROMISC

#define S_MAC_MC_ENABLE
#define V_MAC_MC_ENABLE(x)
#define F_MAC_MC_ENABLE

#define S_MAC_RESET
#define V_MAC_RESET(x)
#define F_MAC_RESET

#define S_MAC_RX_PAUSE_ENABLE
#define V_MAC_RX_PAUSE_ENABLE(x)
#define F_MAC_RX_PAUSE_ENABLE

#define S_MAC_TX_PAUSE_ENABLE
#define V_MAC_TX_PAUSE_ENABLE(x)
#define F_MAC_TX_PAUSE_ENABLE

#define S_MAC_LWM_ENABLE
#define V_MAC_LWM_ENABLE(x)
#define F_MAC_LWM_ENABLE

#define S_MAC_MAGIC_PKT_ENABLE
#define V_MAC_MAGIC_PKT_ENABLE(x)
#define F_MAC_MAGIC_PKT_ENABLE

#define S_MAC_ISL_ENABLE
#define V_MAC_ISL_ENABLE(x)
#define F_MAC_ISL_ENABLE

#define S_MAC_JUMBO_ENABLE
#define V_MAC_JUMBO_ENABLE(x)
#define F_MAC_JUMBO_ENABLE

#define S_MAC_RX_PAD_ENABLE
#define V_MAC_RX_PAD_ENABLE(x)
#define F_MAC_RX_PAD_ENABLE

#define S_MAC_RX_CRC_ENABLE
#define V_MAC_RX_CRC_ENABLE(x)
#define F_MAC_RX_CRC_ENABLE

#define A_GMAC_IFS

#define S_MAC_IFS2
#define M_MAC_IFS2
#define V_MAC_IFS2(x)
#define G_MAC_IFS2(x)

#define S_MAC_IFS1
#define M_MAC_IFS1
#define V_MAC_IFS1(x)
#define G_MAC_IFS1(x)

#define A_GMAC_JUMBO_FRAME_LEN
#define A_GMAC_LNK_DLY
#define A_GMAC_PAUSETIME
#define A_GMAC_MCAST_LO
#define A_GMAC_MCAST_HI
#define A_GMAC_MCAST_MASK_LO
#define A_GMAC_MCAST_MASK_HI
#define A_GMAC_RMT_CNT
#define A_GMAC_RMT_DATA
#define A_GMAC_BACKOFF_SEED
#define A_GMAC_TXF_THRES

#define S_TXF_READ_THRESHOLD
#define M_TXF_READ_THRESHOLD
#define V_TXF_READ_THRESHOLD(x)
#define G_TXF_READ_THRESHOLD(x)

#define S_TXF_WRITE_THRESHOLD
#define M_TXF_WRITE_THRESHOLD
#define V_TXF_WRITE_THRESHOLD(x)
#define G_TXF_WRITE_THRESHOLD(x)

#define MAC_REG_BASE
#define MAC_REG_ADDR(idx, reg)

#define MAC_REG_IDLO(idx)
#define MAC_REG_IDHI(idx)
#define MAC_REG_CSR(idx)
#define MAC_REG_IFS(idx)
#define MAC_REG_LARGEFRAMELENGTH(idx)
#define MAC_REG_LINKDLY(idx)
#define MAC_REG_PAUSETIME(idx)
#define MAC_REG_CASTLO(idx)
#define MAC_REG_MCASTHI(idx)
#define MAC_REG_CASTMASKLO(idx)
#define MAC_REG_MCASTMASKHI(idx)
#define MAC_REG_RMCNT(idx)
#define MAC_REG_RMDATA(idx)
#define MAC_REG_GMRANDBACKOFFSEED(idx)
#define MAC_REG_TXFTHRESHOLDS(idx)

#endif