linux/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c

// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/*
 * Copyright (c) 2018 Synopsys, Inc. and/or its affiliates.
 * stmmac XGMAC support.
 */

#include <linux/bitrev.h>
#include <linux/crc32.h>
#include <linux/iopoll.h>
#include "stmmac.h"
#include "stmmac_ptp.h"
#include "dwxlgmac2.h"
#include "dwxgmac2.h"

static void dwxgmac2_core_init(struct mac_device_info *hw,
			       struct net_device *dev)
{}

static void dwxgmac2_set_mac(void __iomem *ioaddr, bool enable)
{}

static int dwxgmac2_rx_ipc(struct mac_device_info *hw)
{}

static void dwxgmac2_rx_queue_enable(struct mac_device_info *hw, u8 mode,
				     u32 queue)
{}

static void dwxgmac2_rx_queue_prio(struct mac_device_info *hw, u32 prio,
				   u32 queue)
{}

static void dwxgmac2_tx_queue_prio(struct mac_device_info *hw, u32 prio,
				   u32 queue)
{}

static void dwxgmac2_rx_queue_routing(struct mac_device_info *hw,
				      u8 packet, u32 queue)
{}

static void dwxgmac2_prog_mtl_rx_algorithms(struct mac_device_info *hw,
					    u32 rx_alg)
{}

static void dwxgmac2_prog_mtl_tx_algorithms(struct mac_device_info *hw,
					    u32 tx_alg)
{}

static void dwxgmac2_set_mtl_tx_queue_weight(struct stmmac_priv *priv,
					     struct mac_device_info *hw,
					     u32 weight, u32 queue)
{}

static void dwxgmac2_map_mtl_to_dma(struct mac_device_info *hw, u32 queue,
				    u32 chan)
{}

static void dwxgmac2_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 dwxgmac2_dump_regs(struct mac_device_info *hw, u32 *reg_space)
{}

static int dwxgmac2_host_irq_status(struct mac_device_info *hw,
				    struct stmmac_extra_stats *x)
{}

static int dwxgmac2_host_mtl_irq_status(struct stmmac_priv *priv,
					struct mac_device_info *hw, u32 chan)
{}

static void dwxgmac2_flow_ctrl(struct mac_device_info *hw, unsigned int duplex,
			       unsigned int fc, unsigned int pause_time,
			       u32 tx_cnt)
{}

static void dwxgmac2_pmt(struct mac_device_info *hw, unsigned long mode)
{}

static void dwxgmac2_set_umac_addr(struct mac_device_info *hw,
				   const unsigned char *addr,
				   unsigned int reg_n)
{}

static void dwxgmac2_get_umac_addr(struct mac_device_info *hw,
				   unsigned char *addr, unsigned int reg_n)
{}

static void dwxgmac2_set_eee_mode(struct mac_device_info *hw,
				  bool en_tx_lpi_clockgating)
{}

static void dwxgmac2_reset_eee_mode(struct mac_device_info *hw)
{}

static void dwxgmac2_set_eee_pls(struct mac_device_info *hw, int link)
{}

static void dwxgmac2_set_eee_timer(struct mac_device_info *hw, int ls, int tw)
{}

static void dwxgmac2_set_mchash(void __iomem *ioaddr, u32 *mcfilterbits,
				int mcbitslog2)
{}

static void dwxgmac2_set_filter(struct mac_device_info *hw,
				struct net_device *dev)
{}

static void dwxgmac2_set_mac_loopback(void __iomem *ioaddr, bool enable)
{}

static int dwxgmac2_rss_write_reg(void __iomem *ioaddr, bool is_key, int idx,
				  u32 val)
{}

static int dwxgmac2_rss_configure(struct mac_device_info *hw,
				  struct stmmac_rss *cfg, u32 num_rxq)
{}

static void dwxgmac2_update_vlan_hash(struct mac_device_info *hw, u32 hash,
				      u16 perfect_match, bool is_double)
{}

struct dwxgmac3_error_desc {};

#define STAT_OFF(field)

static void dwxgmac3_log_error(struct net_device *ndev, u32 value, bool corr,
			       const char *module_name,
			       const struct dwxgmac3_error_desc *desc,
			       unsigned long field_offset,
			       struct stmmac_safety_stats *stats)
{}

static const struct dwxgmac3_error_desc dwxgmac3_mac_errors[32]=;

static void dwxgmac3_handle_mac_err(struct net_device *ndev,
				    void __iomem *ioaddr, bool correctable,
				    struct stmmac_safety_stats *stats)
{}

static const struct dwxgmac3_error_desc dwxgmac3_mtl_errors[32]=;

static void dwxgmac3_handle_mtl_err(struct net_device *ndev,
				    void __iomem *ioaddr, bool correctable,
				    struct stmmac_safety_stats *stats)
{}

static const struct dwxgmac3_error_desc dwxgmac3_dma_errors[32]=;

#define DPP_RX_ERR
#define DPP_TX_ERR

static const struct dwxgmac3_error_desc dwxgmac3_dma_dpp_errors[32] =;

static void dwxgmac3_handle_dma_err(struct net_device *ndev,
				    void __iomem *ioaddr, bool correctable,
				    struct stmmac_safety_stats *stats)
{}

static int
dwxgmac3_safety_feat_config(void __iomem *ioaddr, unsigned int asp,
			    struct stmmac_safety_feature_cfg *safety_cfg)
{}

static int dwxgmac3_safety_feat_irq_status(struct net_device *ndev,
					   void __iomem *ioaddr,
					   unsigned int asp,
					   struct stmmac_safety_stats *stats)
{}

static const struct dwxgmac3_error {} dwxgmac3_all_errors[] =;

static int dwxgmac3_safety_feat_dump(struct stmmac_safety_stats *stats,
				     int index, unsigned long *count,
				     const char **desc)
{}

static int dwxgmac3_rxp_disable(void __iomem *ioaddr)
{}

static void dwxgmac3_rxp_enable(void __iomem *ioaddr)
{}

static int dwxgmac3_rxp_update_single_entry(void __iomem *ioaddr,
					    struct stmmac_tc_entry *entry,
					    int pos)
{}

static struct stmmac_tc_entry *
dwxgmac3_rxp_get_next_entry(struct stmmac_tc_entry *entries,
			    unsigned int count, u32 curr_prio)
{}

static int dwxgmac3_rxp_config(void __iomem *ioaddr,
			       struct stmmac_tc_entry *entries,
			       unsigned int count)
{}

static int dwxgmac2_get_mac_tx_timestamp(struct mac_device_info *hw, u64 *ts)
{}

static int dwxgmac2_flex_pps_config(void __iomem *ioaddr, int index,
				    struct stmmac_pps_cfg *cfg, bool enable,
				    u32 sub_second_inc, u32 systime_flags)
{}

static void dwxgmac2_sarc_configure(void __iomem *ioaddr, int val)
{}

static void dwxgmac2_enable_vlan(struct mac_device_info *hw, u32 type)
{}

static int dwxgmac2_filter_wait(struct mac_device_info *hw)
{}

static int dwxgmac2_filter_read(struct mac_device_info *hw, u32 filter_no,
				u8 reg, u32 *data)
{}

static int dwxgmac2_filter_write(struct mac_device_info *hw, u32 filter_no,
				 u8 reg, u32 data)
{}

static int dwxgmac2_config_l3_filter(struct mac_device_info *hw, u32 filter_no,
				     bool en, bool ipv6, bool sa, bool inv,
				     u32 match)
{}

static int dwxgmac2_config_l4_filter(struct mac_device_info *hw, u32 filter_no,
				     bool en, bool udp, bool sa, bool inv,
				     u32 match)
{}

static void dwxgmac2_set_arp_offload(struct mac_device_info *hw, bool en,
				     u32 addr)
{}

static void dwxgmac3_fpe_configure(void __iomem *ioaddr, struct stmmac_fpe_cfg *cfg,
				   u32 num_txq,
				   u32 num_rxq, bool enable)
{}

const struct stmmac_ops dwxgmac210_ops =;

static void dwxlgmac2_rx_queue_enable(struct mac_device_info *hw, u8 mode,
				      u32 queue)
{}

const struct stmmac_ops dwxlgmac2_ops =;

int dwxgmac2_setup(struct stmmac_priv *priv)
{}

int dwxlgmac2_setup(struct stmmac_priv *priv)
{}