#include <linux/crc32.h>
#include <linux/slab.h>
#include <linux/ethtool.h>
#include <linux/io.h>
#include "stmmac.h"
#include "stmmac_pcs.h"
#include "dwmac4.h"
#include "dwmac5.h"
static void dwmac4_core_init(struct mac_device_info *hw,
struct net_device *dev)
{ … }
static void dwmac4_update_caps(struct stmmac_priv *priv)
{ … }
static void dwmac4_rx_queue_enable(struct mac_device_info *hw,
u8 mode, u32 queue)
{ … }
static void dwmac4_rx_queue_priority(struct mac_device_info *hw,
u32 prio, u32 queue)
{ … }
static void dwmac4_tx_queue_priority(struct mac_device_info *hw,
u32 prio, u32 queue)
{ … }
static void dwmac4_rx_queue_routing(struct mac_device_info *hw,
u8 packet, u32 queue)
{ … }
static void dwmac4_prog_mtl_rx_algorithms(struct mac_device_info *hw,
u32 rx_alg)
{ … }
static void dwmac4_prog_mtl_tx_algorithms(struct mac_device_info *hw,
u32 tx_alg)
{ … }
static void dwmac4_set_mtl_tx_queue_weight(struct stmmac_priv *priv,
struct mac_device_info *hw,
u32 weight, u32 queue)
{ … }
static void dwmac4_map_mtl_dma(struct mac_device_info *hw, u32 queue, u32 chan)
{ … }
static void dwmac4_config_cbs(struct stmmac_priv *priv,
struct mac_device_info *hw,
u32 send_slope, u32 idle_slope,
u32 high_credit, u32 low_credit, u32 queue)
{ … }
static void dwmac4_dump_regs(struct mac_device_info *hw, u32 *reg_space)
{ … }
static int dwmac4_rx_ipc_enable(struct mac_device_info *hw)
{ … }
static void dwmac4_pmt(struct mac_device_info *hw, unsigned long mode)
{ … }
static void dwmac4_set_umac_addr(struct mac_device_info *hw,
const unsigned char *addr, unsigned int reg_n)
{ … }
static void dwmac4_get_umac_addr(struct mac_device_info *hw,
unsigned char *addr, unsigned int reg_n)
{ … }
static void dwmac4_set_eee_mode(struct mac_device_info *hw,
bool en_tx_lpi_clockgating)
{ … }
static void dwmac4_reset_eee_mode(struct mac_device_info *hw)
{ … }
static void dwmac4_set_eee_pls(struct mac_device_info *hw, int link)
{ … }
static void dwmac4_set_eee_lpi_entry_timer(struct mac_device_info *hw, int et)
{ … }
static void dwmac4_set_eee_timer(struct mac_device_info *hw, int ls, int tw)
{ … }
static void dwmac4_write_single_vlan(struct net_device *dev, u16 vid)
{ … }
static int dwmac4_write_vlan_filter(struct net_device *dev,
struct mac_device_info *hw,
u8 index, u32 data)
{ … }
static int dwmac4_add_hw_vlan_rx_fltr(struct net_device *dev,
struct mac_device_info *hw,
__be16 proto, u16 vid)
{ … }
static int dwmac4_del_hw_vlan_rx_fltr(struct net_device *dev,
struct mac_device_info *hw,
__be16 proto, u16 vid)
{ … }
static void dwmac4_restore_hw_vlan_rx_fltr(struct net_device *dev,
struct mac_device_info *hw)
{ … }
static void dwmac4_set_filter(struct mac_device_info *hw,
struct net_device *dev)
{ … }
static void dwmac4_flow_ctrl(struct mac_device_info *hw, unsigned int duplex,
unsigned int fc, unsigned int pause_time,
u32 tx_cnt)
{ … }
static void dwmac4_ctrl_ane(void __iomem *ioaddr, bool ane, bool srgmi_ral,
bool loopback)
{ … }
static void dwmac4_get_adv_lp(void __iomem *ioaddr, struct rgmii_adv *adv)
{ … }
static void dwmac4_phystatus(void __iomem *ioaddr, struct stmmac_extra_stats *x)
{ … }
static int dwmac4_irq_mtl_status(struct stmmac_priv *priv,
struct mac_device_info *hw, u32 chan)
{ … }
static int dwmac4_irq_status(struct mac_device_info *hw,
struct stmmac_extra_stats *x)
{ … }
static void dwmac4_debug(struct stmmac_priv *priv, void __iomem *ioaddr,
struct stmmac_extra_stats *x,
u32 rx_queues, u32 tx_queues)
{ … }
static void dwmac4_set_mac_loopback(void __iomem *ioaddr, bool enable)
{ … }
static void dwmac4_update_vlan_hash(struct mac_device_info *hw, u32 hash,
u16 perfect_match, bool is_double)
{ … }
static void dwmac4_sarc_configure(void __iomem *ioaddr, int val)
{ … }
static void dwmac4_enable_vlan(struct mac_device_info *hw, u32 type)
{ … }
static void dwmac4_set_arp_offload(struct mac_device_info *hw, bool en,
u32 addr)
{ … }
static int dwmac4_config_l3_filter(struct mac_device_info *hw, u32 filter_no,
bool en, bool ipv6, bool sa, bool inv,
u32 match)
{ … }
static int dwmac4_config_l4_filter(struct mac_device_info *hw, u32 filter_no,
bool en, bool udp, bool sa, bool inv,
u32 match)
{ … }
static void dwmac4_rx_hw_vlan(struct mac_device_info *hw,
struct dma_desc *rx_desc, struct sk_buff *skb)
{ … }
static void dwmac4_set_hw_vlan_mode(struct mac_device_info *hw)
{ … }
const struct stmmac_ops dwmac4_ops = …;
const struct stmmac_ops dwmac410_ops = …;
const struct stmmac_ops dwmac510_ops = …;
static u32 dwmac4_get_num_vlan(void __iomem *ioaddr)
{ … }
int dwmac4_setup(struct stmmac_priv *priv)
{ … }