linux/drivers/net/ethernet/sunplus/spl2sw_define.h

/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright Sunplus Technology Co., Ltd.
 *       All rights reserved.
 */

#ifndef __SPL2SW_DEFINE_H__
#define __SPL2SW_DEFINE_H__

#define MAX_NETDEV_NUM

/* Interrupt status */
#define MAC_INT_DAISY_MODE_CHG
#define MAC_INT_IP_CHKSUM_ERR
#define MAC_INT_WDOG_TIMER1_EXP
#define MAC_INT_WDOG_TIMER0_EXP
#define MAC_INT_INTRUDER_ALERT
#define MAC_INT_PORT_ST_CHG
#define MAC_INT_BC_STORM
#define MAC_INT_MUST_DROP_LAN
#define MAC_INT_GLOBAL_QUE_FULL
#define MAC_INT_TX_SOC_PAUSE_ON
#define MAC_INT_RX_SOC_QUE_FULL
#define MAC_INT_TX_LAN1_QUE_FULL
#define MAC_INT_TX_LAN0_QUE_FULL
#define MAC_INT_RX_L_DESCF
#define MAC_INT_RX_H_DESCF
#define MAC_INT_RX_DONE_L
#define MAC_INT_RX_DONE_H
#define MAC_INT_TX_DONE_L
#define MAC_INT_TX_DONE_H
#define MAC_INT_TX_DES_ERR
#define MAC_INT_RX_DES_ERR

#define MAC_INT_RX
#define MAC_INT_TX
#define MAC_INT_MASK_DEF

/* Address table search */
#define MAC_ADDR_LOOKUP_IDLE
#define MAC_SEARCH_NEXT_ADDR
#define MAC_BEGIN_SEARCH_ADDR

/* Address table status */
#define MAC_HASH_LOOKUP_ADDR
#define MAC_R_PORT_MAP
#define MAC_R_CPU_PORT
#define MAC_R_VID
#define MAC_R_AGE
#define MAC_R_PROXY
#define MAC_R_MC_INGRESS
#define MAC_AT_TABLE_END
#define MAC_AT_DATA_READY

/* Wt mac ad0 */
#define MAC_W_PORT_MAP
#define MAC_W_LAN_PORT_1
#define MAC_W_LAN_PORT_0
#define MAC_W_CPU_PORT
#define MAC_W_CPU_PORT_1
#define MAC_W_CPU_PORT_0
#define MAC_W_VID
#define MAC_W_AGE
#define MAC_W_PROXY
#define MAC_W_MC_INGRESS
#define MAC_W_MAC_DONE
#define MAC_W_MAC_CMD

/* W mac 15_0 bus */
#define MAC_W_MAC_15_0

/* W mac 47_16 bus */
#define MAC_W_MAC_47_16

/* PVID config 0 */
#define MAC_P1_PVID
#define MAC_P0_PVID

/* VLAN member config 0 */
#define MAC_VLAN_MEMSET_3
#define MAC_VLAN_MEMSET_2
#define MAC_VLAN_MEMSET_1
#define MAC_VLAN_MEMSET_0

/* VLAN member config 1 */
#define MAC_VLAN_MEMSET_5
#define MAC_VLAN_MEMSET_4

/* Port ability */
#define MAC_PORT_ABILITY_LINK_ST

/* CPU control */
#define MAC_EN_SOC1_AGING
#define MAC_EN_SOC0_AGING
#define MAC_DIS_LRN_SOC1
#define MAC_DIS_LRN_SOC0
#define MAC_EN_CRC_SOC1
#define MAC_EN_CRC_SOC0
#define MAC_DIS_SOC1_CPU
#define MAC_DIS_SOC0_CPU
#define MAC_DIS_BC2CPU_P1
#define MAC_DIS_BC2CPU_P0
#define MAC_DIS_MC2CPU
#define MAC_DIS_MC2CPU_P1
#define MAC_DIS_MC2CPU_P0
#define MAC_DIS_UN2CPU

/* Port control 0 */
#define MAC_DIS_PORT
#define MAC_DIS_PORT1
#define MAC_DIS_PORT0
#define MAC_DIS_RMC2CPU_P1
#define MAC_DIS_RMC2CPU_P0
#define MAC_EN_FLOW_CTL_P1
#define MAC_EN_FLOW_CTL_P0
#define MAC_EN_BACK_PRESS_P1
#define MAC_EN_BACK_PRESS_P0

/* Port control 1 */
#define MAC_DIS_SA_LRN_P1
#define MAC_DIS_SA_LRN_P0

/* Port control 2 */
#define MAC_EN_AGING_P1
#define MAC_EN_AGING_P0

/* Switch Global control */
#define MAC_RMC_TB_FAULT_RULE
#define MAC_LED_FLASH_TIME
#define MAC_BC_STORM_PREV

/* LED port 0 */
#define MAC_LED_ACT_HI

/* PHY control register 0  */
#define MAC_CPU_PHY_WT_DATA
#define MAC_CPU_PHY_CMD
#define MAC_CPU_PHY_REG_ADDR
#define MAC_CPU_PHY_ADDR

/* PHY control register 1 */
#define MAC_CPU_PHY_RD_DATA
#define MAC_PHY_RD_RDY
#define MAC_PHY_WT_DONE

/* MAC force mode */
#define MAC_EXT_PHY1_ADDR
#define MAC_EXT_PHY0_ADDR
#define MAC_FORCE_RMII_LINK
#define MAC_FORCE_RMII_EN_1
#define MAC_FORCE_RMII_EN_0
#define MAC_FORCE_RMII_FC
#define MAC_FORCE_RMII_DPX
#define MAC_FORCE_RMII_SPD

/* CPU transmit trigger */
#define MAC_TRIG_L_SOC0
#define MAC_TRIG_H_SOC0

/* Config descriptor queue */
#define TX_DESC_NUM
#define MAC_GUARD_DESC_NUM
#define RX_QUEUE0_DESC_NUM
#define RX_QUEUE1_DESC_NUM
#define TX_DESC_QUEUE_NUM
#define RX_DESC_QUEUE_NUM

#define MAC_RX_LEN_MAX

/* Tx descriptor */
/* cmd1 */
#define TXD_OWN
#define TXD_ERR_CODE
#define TXD_SOP
#define TXD_EOP
#define TXD_VLAN
#define TXD_PKT_LEN
/* cmd2 */
#define TXD_EOR
#define TXD_BUF_LEN2
#define TXD_BUF_LEN1

/* Rx descriptor */
/* cmd1 */
#define RXD_OWN
#define RXD_ERR_CODE
#define RXD_TCP_UDP_CHKSUM
#define RXD_PROXY
#define RXD_PROTOCOL
#define RXD_VLAN_TAG
#define RXD_IP_CHKSUM
#define RXD_ROUTE_TYPE
#define RXD_PKT_SP
#define RXD_PKT_LEN
/* cmd2 */
#define RXD_EOR
#define RXD_BUF_LEN2
#define RXD_BUF_LEN1

/* structure of descriptor */
struct spl2sw_mac_desc {};

struct spl2sw_skb_info {};

struct spl2sw_common {};

struct spl2sw_mac {};

#endif