#include <linux/circ_buf.h>
#include <linux/clk.h>
#include <linux/etherdevice.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/of_mdio.h>
#include <linux/of_net.h>
#include <linux/platform_device.h>
#include <linux/reset.h>
#define MAC_PORTSEL …
#define MAC_PORTSEL_STAT_CPU …
#define MAC_PORTSEL_RMII …
#define MAC_PORTSET …
#define MAC_PORTSET_DUPLEX_FULL …
#define MAC_PORTSET_LINKED …
#define MAC_PORTSET_SPEED_100M …
#define MAC_SET …
#define MAX_FRAME_SIZE …
#define MAX_FRAME_SIZE_MASK …
#define BIT_PAUSE_EN …
#define RX_COALESCE_SET …
#define RX_COALESCED_FRAME_OFFSET …
#define RX_COALESCED_FRAMES …
#define RX_COALESCED_TIMER …
#define QLEN_SET …
#define RX_DEPTH_OFFSET …
#define MAX_HW_FIFO_DEPTH …
#define HW_TX_FIFO_DEPTH …
#define HW_RX_FIFO_DEPTH …
#define IQFRM_DES …
#define RX_FRAME_LEN_MASK …
#define IQ_ADDR …
#define EQ_ADDR …
#define EQFRM_LEN …
#define ADDRQ_STAT …
#define TX_CNT_INUSE_MASK …
#define BIT_TX_READY …
#define BIT_RX_READY …
#define GLB_HOSTMAC_L32 …
#define GLB_HOSTMAC_H16 …
#define GLB_SOFT_RESET …
#define SOFT_RESET_ALL …
#define GLB_FWCTRL …
#define FWCTRL_VLAN_ENABLE …
#define FWCTRL_FW2CPU_ENA …
#define FWCTRL_FWALL2CPU …
#define GLB_MACTCTRL …
#define MACTCTRL_UNI2CPU …
#define MACTCTRL_MULTI2CPU …
#define MACTCTRL_BROAD2CPU …
#define MACTCTRL_MACT_ENA …
#define GLB_IRQ_STAT …
#define GLB_IRQ_ENA …
#define IRQ_ENA_PORT0_MASK …
#define IRQ_ENA_PORT0 …
#define IRQ_ENA_ALL …
#define GLB_IRQ_RAW …
#define IRQ_INT_RX_RDY …
#define IRQ_INT_TX_PER_PACKET …
#define IRQ_INT_TX_FIFO_EMPTY …
#define IRQ_INT_MULTI_RXRDY …
#define DEF_INT_MASK …
#define GLB_MAC_L32_BASE …
#define GLB_MAC_H16_BASE …
#define MACFLT_HI16_MASK …
#define BIT_MACFLT_ENA …
#define BIT_MACFLT_FW2CPU …
#define GLB_MAC_H16(reg) …
#define GLB_MAC_L32(reg) …
#define MAX_MAC_FILTER_NUM …
#define MAX_UNICAST_ADDRESSES …
#define MAX_MULTICAST_ADDRESSES …
#define TXQ_NUM …
#define RXQ_NUM …
#define FEMAC_POLL_WEIGHT …
#define PHY_RESET_DELAYS_PROPERTY …
enum phy_reset_delays { … };
struct hisi_femac_queue { … };
struct hisi_femac_priv { … };
static void hisi_femac_irq_enable(struct hisi_femac_priv *priv, int irqs)
{ … }
static void hisi_femac_irq_disable(struct hisi_femac_priv *priv, int irqs)
{ … }
static void hisi_femac_tx_dma_unmap(struct hisi_femac_priv *priv,
struct sk_buff *skb, unsigned int pos)
{ … }
static void hisi_femac_xmit_reclaim(struct net_device *dev)
{ … }
static void hisi_femac_adjust_link(struct net_device *dev)
{ … }
static void hisi_femac_rx_refill(struct hisi_femac_priv *priv)
{ … }
static int hisi_femac_rx(struct net_device *dev, int limit)
{ … }
static int hisi_femac_poll(struct napi_struct *napi, int budget)
{ … }
static irqreturn_t hisi_femac_interrupt(int irq, void *dev_id)
{ … }
static int hisi_femac_init_queue(struct device *dev,
struct hisi_femac_queue *queue,
unsigned int num)
{ … }
static int hisi_femac_init_tx_and_rx_queues(struct hisi_femac_priv *priv)
{ … }
static void hisi_femac_free_skb_rings(struct hisi_femac_priv *priv)
{ … }
static int hisi_femac_set_hw_mac_addr(struct hisi_femac_priv *priv,
const unsigned char *mac)
{ … }
static int hisi_femac_port_reset(struct hisi_femac_priv *priv)
{ … }
static int hisi_femac_net_open(struct net_device *dev)
{ … }
static int hisi_femac_net_close(struct net_device *dev)
{ … }
static netdev_tx_t hisi_femac_net_xmit(struct sk_buff *skb,
struct net_device *dev)
{ … }
static int hisi_femac_set_mac_address(struct net_device *dev, void *p)
{ … }
static void hisi_femac_enable_hw_addr_filter(struct hisi_femac_priv *priv,
unsigned int reg_n, bool enable)
{ … }
static void hisi_femac_set_hw_addr_filter(struct hisi_femac_priv *priv,
unsigned char *addr,
unsigned int reg_n)
{ … }
static void hisi_femac_set_promisc_mode(struct hisi_femac_priv *priv,
bool promisc_mode)
{ … }
static void hisi_femac_set_mc_addr_filter(struct hisi_femac_priv *priv)
{ … }
static void hisi_femac_set_uc_addr_filter(struct hisi_femac_priv *priv)
{ … }
static void hisi_femac_net_set_rx_mode(struct net_device *dev)
{ … }
static const struct ethtool_ops hisi_femac_ethtools_ops = …;
static const struct net_device_ops hisi_femac_netdev_ops = …;
static void hisi_femac_core_reset(struct hisi_femac_priv *priv)
{ … }
static void hisi_femac_sleep_us(u32 time_us)
{ … }
static void hisi_femac_phy_reset(struct hisi_femac_priv *priv)
{ … }
static void hisi_femac_port_init(struct hisi_femac_priv *priv)
{ … }
static int hisi_femac_drv_probe(struct platform_device *pdev)
{ … }
static void hisi_femac_drv_remove(struct platform_device *pdev)
{ … }
#ifdef CONFIG_PM
static int hisi_femac_drv_suspend(struct platform_device *pdev,
pm_message_t state)
{ … }
static int hisi_femac_drv_resume(struct platform_device *pdev)
{ … }
#endif
static const struct of_device_id hisi_femac_match[] = …;
MODULE_DEVICE_TABLE(of, hisi_femac_match);
static struct platform_driver hisi_femac_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;