#ifndef __COMMON_H__
#define __COMMON_H__
#include <linux/etherdevice.h>
#include <linux/netdevice.h>
#include <linux/stmmac.h>
#include <linux/phy.h>
#include <linux/pcs/pcs-xpcs.h>
#include <linux/module.h>
#if IS_ENABLED(CONFIG_VLAN_8021Q)
#define STMMAC_VLAN_TAG_USED
#include <linux/if_vlan.h>
#endif
#include "descs.h"
#include "hwif.h"
#include "mmc.h"
#define DWMAC_CORE_3_40 …
#define DWMAC_CORE_3_50 …
#define DWMAC_CORE_4_00 …
#define DWMAC_CORE_4_10 …
#define DWMAC_CORE_5_00 …
#define DWMAC_CORE_5_10 …
#define DWMAC_CORE_5_20 …
#define DWXGMAC_CORE_2_10 …
#define DWXGMAC_CORE_2_20 …
#define DWXLGMAC_CORE_2_00 …
#define DWXGMAC_ID …
#define DWXLGMAC_ID …
#define STMMAC_CHAN0 …
#define DMA_MIN_TX_SIZE …
#define DMA_MAX_TX_SIZE …
#define DMA_DEFAULT_TX_SIZE …
#define DMA_MIN_RX_SIZE …
#define DMA_MAX_RX_SIZE …
#define DMA_DEFAULT_RX_SIZE …
#define STMMAC_GET_ENTRY(x, size) …
#undef FRAME_FILTER_DEBUG
struct stmmac_q_tx_stats { … };
struct stmmac_napi_tx_stats { … };
struct stmmac_txq_stats { … } ____cacheline_aligned_in_smp;
struct stmmac_napi_rx_stats { … };
struct stmmac_rxq_stats { … } ____cacheline_aligned_in_smp;
struct stmmac_pcpu_stats { … };
struct stmmac_extra_stats { … };
struct stmmac_safety_stats { … };
#define STMMAC_SAFETY_FEAT_SIZE …
#define CSR_F_35M …
#define CSR_F_60M …
#define CSR_F_100M …
#define CSR_F_150M …
#define CSR_F_250M …
#define CSR_F_300M …
#define MAC_CSR_H_FRQ_MASK …
#define HASH_TABLE_SIZE …
#define PAUSE_TIME …
#define FLOW_OFF …
#define FLOW_RX …
#define FLOW_TX …
#define FLOW_AUTO …
#define STMMAC_PCS_RGMII …
#define STMMAC_PCS_SGMII …
#define SF_DMA_MODE …
#define DMA_HW_FEAT_MIISEL …
#define DMA_HW_FEAT_GMIISEL …
#define DMA_HW_FEAT_HDSEL …
#define DMA_HW_FEAT_EXTHASHEN …
#define DMA_HW_FEAT_HASHSEL …
#define DMA_HW_FEAT_ADDMAC …
#define DMA_HW_FEAT_PCSSEL …
#define DMA_HW_FEAT_L3L4FLTREN …
#define DMA_HW_FEAT_SMASEL …
#define DMA_HW_FEAT_RWKSEL …
#define DMA_HW_FEAT_MGKSEL …
#define DMA_HW_FEAT_MMCSEL …
#define DMA_HW_FEAT_TSVER1SEL …
#define DMA_HW_FEAT_TSVER2SEL …
#define DMA_HW_FEAT_EEESEL …
#define DMA_HW_FEAT_AVSEL …
#define DMA_HW_FEAT_TXCOESEL …
#define DMA_HW_FEAT_RXTYP1COE …
#define DMA_HW_FEAT_RXTYP2COE …
#define DMA_HW_FEAT_RXFIFOSIZE …
#define DMA_HW_FEAT_RXCHCNT …
#define DMA_HW_FEAT_TXCHCNT …
#define DMA_HW_FEAT_ENHDESSEL …
#define DMA_HW_FEAT_INTTSEN …
#define DMA_HW_FEAT_FLEXIPPSEN …
#define DMA_HW_FEAT_SAVLANINS …
#define DMA_HW_FEAT_ACTPHYIF …
#define DEFAULT_DMA_PBL …
#define STMMAC_MSI_VEC_MAX …
#define PCS_ANE_IRQ …
#define PCS_LINK_IRQ …
#define PCS_RGSMIIIS_IRQ …
#define MAX_DMA_RIWT …
#define MIN_DMA_RIWT …
#define DEF_DMA_RIWT …
#define STMMAC_COAL_TX_TIMER …
#define STMMAC_MAX_COAL_TX_TICK …
#define STMMAC_TX_MAX_FRAMES …
#define STMMAC_TX_FRAMES …
#define STMMAC_RX_FRAMES …
enum packets_types { … };
enum rx_frame_status { … };
enum tx_frame_status { … };
enum dma_irq_status { … };
enum dma_irq_dir { … };
enum request_irq_err { … };
#define CORE_IRQ_TX_PATH_IN_LPI_MODE …
#define CORE_IRQ_TX_PATH_EXIT_LPI_MODE …
#define CORE_IRQ_RX_PATH_IN_LPI_MODE …
#define CORE_IRQ_RX_PATH_EXIT_LPI_MODE …
#define FPE_EVENT_UNKNOWN …
#define FPE_EVENT_TRSP …
#define FPE_EVENT_TVER …
#define FPE_EVENT_RRSP …
#define FPE_EVENT_RVER …
#define CORE_IRQ_MTL_RX_OVERFLOW …
struct rgmii_adv { … };
#define STMMAC_PCS_PAUSE …
#define STMMAC_PCS_ASYM_PAUSE …
struct dma_features { … };
#define BUF_SIZE_16KiB …
#define BUF_SIZE_8KiB …
#define BUF_SIZE_4KiB …
#define BUF_SIZE_2KiB …
#define PMT_NOT_SUPPORTED …
#define PMT_SUPPORTED …
#define MAC_CTRL_REG …
#define MAC_ENABLE_TX …
#define MAC_ENABLE_RX …
#define STMMAC_DEFAULT_LIT_LS …
#define STMMAC_DEFAULT_TWT_LS …
#define STMMAC_ET_MAX …
#define STMMAC_CHAIN_MODE …
#define STMMAC_RING_MODE …
#define JUMBO_LEN …
#define STMMAC_RSS_HASH_KEY_SIZE …
#define STMMAC_RSS_MAX_TABLE_SIZE …
#define STMMAC_VLAN_NONE …
#define STMMAC_VLAN_REMOVE …
#define STMMAC_VLAN_INSERT …
#define STMMAC_VLAN_REPLACE …
extern const struct stmmac_desc_ops enh_desc_ops;
extern const struct stmmac_desc_ops ndesc_ops;
struct mac_device_info;
extern const struct stmmac_hwtimestamp stmmac_ptp;
extern const struct stmmac_mode_ops dwmac4_ring_mode_ops;
struct mac_link { … };
struct mii_regs { … };
struct mac_device_info { … };
struct stmmac_rx_routing { … };
int dwmac100_setup(struct stmmac_priv *priv);
int dwmac1000_setup(struct stmmac_priv *priv);
int dwmac4_setup(struct stmmac_priv *priv);
int dwxgmac2_setup(struct stmmac_priv *priv);
int dwxlgmac2_setup(struct stmmac_priv *priv);
void stmmac_set_mac_addr(void __iomem *ioaddr, const u8 addr[6],
unsigned int high, unsigned int low);
void stmmac_get_mac_addr(void __iomem *ioaddr, unsigned char *addr,
unsigned int high, unsigned int low);
void stmmac_set_mac(void __iomem *ioaddr, bool enable);
void stmmac_dwmac4_set_mac_addr(void __iomem *ioaddr, const u8 addr[6],
unsigned int high, unsigned int low);
void stmmac_dwmac4_get_mac_addr(void __iomem *ioaddr, unsigned char *addr,
unsigned int high, unsigned int low);
void stmmac_dwmac4_set_mac(void __iomem *ioaddr, bool enable);
void dwmac_dma_flush_tx_fifo(void __iomem *ioaddr);
extern const struct stmmac_mode_ops ring_mode_ops;
extern const struct stmmac_mode_ops chain_mode_ops;
extern const struct stmmac_desc_ops dwmac4_desc_ops;
#endif