#include <linux/phy.h>
#include <linux/mdio.h>
#include <linux/clk.h>
#include <linux/bitrev.h>
#include <linux/crc32.h>
#include <linux/crc32poly.h>
#include "xgbe.h"
#include "xgbe-common.h"
static inline unsigned int xgbe_get_max_frame(struct xgbe_prv_data *pdata)
{ … }
static unsigned int xgbe_usec_to_riwt(struct xgbe_prv_data *pdata,
unsigned int usec)
{ … }
static unsigned int xgbe_riwt_to_usec(struct xgbe_prv_data *pdata,
unsigned int riwt)
{ … }
static int xgbe_config_pbl_val(struct xgbe_prv_data *pdata)
{ … }
static int xgbe_config_osp_mode(struct xgbe_prv_data *pdata)
{ … }
static int xgbe_config_rsf_mode(struct xgbe_prv_data *pdata, unsigned int val)
{ … }
static int xgbe_config_tsf_mode(struct xgbe_prv_data *pdata, unsigned int val)
{ … }
static int xgbe_config_rx_threshold(struct xgbe_prv_data *pdata,
unsigned int val)
{ … }
static int xgbe_config_tx_threshold(struct xgbe_prv_data *pdata,
unsigned int val)
{ … }
static int xgbe_config_rx_coalesce(struct xgbe_prv_data *pdata)
{ … }
static int xgbe_config_tx_coalesce(struct xgbe_prv_data *pdata)
{ … }
static void xgbe_config_rx_buffer_size(struct xgbe_prv_data *pdata)
{ … }
static void xgbe_config_tso_mode(struct xgbe_prv_data *pdata)
{ … }
static void xgbe_config_sph_mode(struct xgbe_prv_data *pdata)
{ … }
static int xgbe_write_rss_reg(struct xgbe_prv_data *pdata, unsigned int type,
unsigned int index, unsigned int val)
{ … }
static int xgbe_write_rss_hash_key(struct xgbe_prv_data *pdata)
{ … }
static int xgbe_write_rss_lookup_table(struct xgbe_prv_data *pdata)
{ … }
static int xgbe_set_rss_hash_key(struct xgbe_prv_data *pdata, const u8 *key)
{ … }
static int xgbe_set_rss_lookup_table(struct xgbe_prv_data *pdata,
const u32 *table)
{ … }
static int xgbe_enable_rss(struct xgbe_prv_data *pdata)
{ … }
static int xgbe_disable_rss(struct xgbe_prv_data *pdata)
{ … }
static void xgbe_config_rss(struct xgbe_prv_data *pdata)
{ … }
static bool xgbe_is_pfc_queue(struct xgbe_prv_data *pdata,
unsigned int queue)
{ … }
static void xgbe_set_vxlan_id(struct xgbe_prv_data *pdata)
{ … }
static void xgbe_enable_vxlan(struct xgbe_prv_data *pdata)
{ … }
static void xgbe_disable_vxlan(struct xgbe_prv_data *pdata)
{ … }
static unsigned int xgbe_get_fc_queue_count(struct xgbe_prv_data *pdata)
{ … }
static int xgbe_disable_tx_flow_control(struct xgbe_prv_data *pdata)
{ … }
static int xgbe_enable_tx_flow_control(struct xgbe_prv_data *pdata)
{ … }
static int xgbe_disable_rx_flow_control(struct xgbe_prv_data *pdata)
{ … }
static int xgbe_enable_rx_flow_control(struct xgbe_prv_data *pdata)
{ … }
static int xgbe_config_tx_flow_control(struct xgbe_prv_data *pdata)
{ … }
static int xgbe_config_rx_flow_control(struct xgbe_prv_data *pdata)
{ … }
static void xgbe_config_flow_control(struct xgbe_prv_data *pdata)
{ … }
static void xgbe_enable_dma_interrupts(struct xgbe_prv_data *pdata)
{ … }
static void xgbe_enable_mtl_interrupts(struct xgbe_prv_data *pdata)
{ … }
static void xgbe_enable_mac_interrupts(struct xgbe_prv_data *pdata)
{ … }
static void xgbe_enable_ecc_interrupts(struct xgbe_prv_data *pdata)
{ … }
static void xgbe_disable_ecc_ded(struct xgbe_prv_data *pdata)
{ … }
static void xgbe_disable_ecc_sec(struct xgbe_prv_data *pdata,
enum xgbe_ecc_sec sec)
{ … }
static int xgbe_set_speed(struct xgbe_prv_data *pdata, int speed)
{ … }
static int xgbe_enable_rx_vlan_stripping(struct xgbe_prv_data *pdata)
{ … }
static int xgbe_disable_rx_vlan_stripping(struct xgbe_prv_data *pdata)
{ … }
static int xgbe_enable_rx_vlan_filtering(struct xgbe_prv_data *pdata)
{ … }
static int xgbe_disable_rx_vlan_filtering(struct xgbe_prv_data *pdata)
{ … }
static u32 xgbe_vid_crc32_le(__le16 vid_le)
{ … }
static int xgbe_update_vlan_hash_table(struct xgbe_prv_data *pdata)
{ … }
static int xgbe_set_promiscuous_mode(struct xgbe_prv_data *pdata,
unsigned int enable)
{ … }
static int xgbe_set_all_multicast_mode(struct xgbe_prv_data *pdata,
unsigned int enable)
{ … }
static void xgbe_set_mac_reg(struct xgbe_prv_data *pdata,
struct netdev_hw_addr *ha, unsigned int *mac_reg)
{ … }
static void xgbe_set_mac_addn_addrs(struct xgbe_prv_data *pdata)
{ … }
static void xgbe_set_mac_hash_table(struct xgbe_prv_data *pdata)
{ … }
static int xgbe_add_mac_addresses(struct xgbe_prv_data *pdata)
{ … }
static int xgbe_set_mac_address(struct xgbe_prv_data *pdata, const u8 *addr)
{ … }
static int xgbe_config_rx_mode(struct xgbe_prv_data *pdata)
{ … }
static int xgbe_clr_gpio(struct xgbe_prv_data *pdata, unsigned int gpio)
{ … }
static int xgbe_set_gpio(struct xgbe_prv_data *pdata, unsigned int gpio)
{ … }
static int xgbe_read_mmd_regs_v2(struct xgbe_prv_data *pdata, int prtad,
int mmd_reg)
{ … }
static void xgbe_write_mmd_regs_v2(struct xgbe_prv_data *pdata, int prtad,
int mmd_reg, int mmd_data)
{ … }
static int xgbe_read_mmd_regs_v1(struct xgbe_prv_data *pdata, int prtad,
int mmd_reg)
{ … }
static void xgbe_write_mmd_regs_v1(struct xgbe_prv_data *pdata, int prtad,
int mmd_reg, int mmd_data)
{ … }
static int xgbe_read_mmd_regs(struct xgbe_prv_data *pdata, int prtad,
int mmd_reg)
{ … }
static void xgbe_write_mmd_regs(struct xgbe_prv_data *pdata, int prtad,
int mmd_reg, int mmd_data)
{ … }
static unsigned int xgbe_create_mdio_sca_c22(int port, int reg)
{ … }
static unsigned int xgbe_create_mdio_sca_c45(int port, unsigned int da, int reg)
{ … }
static int xgbe_write_ext_mii_regs(struct xgbe_prv_data *pdata,
unsigned int mdio_sca, u16 val)
{ … }
static int xgbe_write_ext_mii_regs_c22(struct xgbe_prv_data *pdata, int addr,
int reg, u16 val)
{ … }
static int xgbe_write_ext_mii_regs_c45(struct xgbe_prv_data *pdata, int addr,
int devad, int reg, u16 val)
{ … }
static int xgbe_read_ext_mii_regs(struct xgbe_prv_data *pdata,
unsigned int mdio_sca)
{ … }
static int xgbe_read_ext_mii_regs_c22(struct xgbe_prv_data *pdata, int addr,
int reg)
{ … }
static int xgbe_read_ext_mii_regs_c45(struct xgbe_prv_data *pdata, int addr,
int devad, int reg)
{ … }
static int xgbe_set_ext_mii_mode(struct xgbe_prv_data *pdata, unsigned int port,
enum xgbe_mdio_mode mode)
{ … }
static int xgbe_tx_complete(struct xgbe_ring_desc *rdesc)
{ … }
static int xgbe_disable_rx_csum(struct xgbe_prv_data *pdata)
{ … }
static int xgbe_enable_rx_csum(struct xgbe_prv_data *pdata)
{ … }
static void xgbe_tx_desc_reset(struct xgbe_ring_data *rdata)
{ … }
static void xgbe_tx_desc_init(struct xgbe_channel *channel)
{ … }
static void xgbe_rx_desc_reset(struct xgbe_prv_data *pdata,
struct xgbe_ring_data *rdata, unsigned int index)
{ … }
static void xgbe_rx_desc_init(struct xgbe_channel *channel)
{ … }
static void xgbe_update_tstamp_addend(struct xgbe_prv_data *pdata,
unsigned int addend)
{ … }
static void xgbe_set_tstamp_time(struct xgbe_prv_data *pdata, unsigned int sec,
unsigned int nsec)
{ … }
static u64 xgbe_get_tstamp_time(struct xgbe_prv_data *pdata)
{ … }
static u64 xgbe_get_tx_tstamp(struct xgbe_prv_data *pdata)
{ … }
static void xgbe_get_rx_tstamp(struct xgbe_packet_data *packet,
struct xgbe_ring_desc *rdesc)
{ … }
static int xgbe_config_tstamp(struct xgbe_prv_data *pdata,
unsigned int mac_tscr)
{ … }
static void xgbe_tx_start_xmit(struct xgbe_channel *channel,
struct xgbe_ring *ring)
{ … }
static void xgbe_dev_xmit(struct xgbe_channel *channel)
{ … }
static int xgbe_dev_read(struct xgbe_channel *channel)
{ … }
static int xgbe_is_context_desc(struct xgbe_ring_desc *rdesc)
{ … }
static int xgbe_is_last_desc(struct xgbe_ring_desc *rdesc)
{ … }
static int xgbe_enable_int(struct xgbe_channel *channel,
enum xgbe_int int_id)
{ … }
static int xgbe_disable_int(struct xgbe_channel *channel,
enum xgbe_int int_id)
{ … }
static int __xgbe_exit(struct xgbe_prv_data *pdata)
{ … }
static int xgbe_exit(struct xgbe_prv_data *pdata)
{ … }
static int xgbe_flush_tx_queues(struct xgbe_prv_data *pdata)
{ … }
static void xgbe_config_dma_bus(struct xgbe_prv_data *pdata)
{ … }
static void xgbe_config_dma_cache(struct xgbe_prv_data *pdata)
{ … }
static void xgbe_config_mtl_mode(struct xgbe_prv_data *pdata)
{ … }
static void xgbe_queue_flow_control_threshold(struct xgbe_prv_data *pdata,
unsigned int queue,
unsigned int q_fifo_size)
{ … }
static void xgbe_calculate_flow_control_threshold(struct xgbe_prv_data *pdata,
unsigned int *fifo)
{ … }
static void xgbe_config_flow_control_threshold(struct xgbe_prv_data *pdata)
{ … }
static unsigned int xgbe_get_tx_fifo_size(struct xgbe_prv_data *pdata)
{ … }
static unsigned int xgbe_get_rx_fifo_size(struct xgbe_prv_data *pdata)
{ … }
static void xgbe_calculate_equal_fifo(unsigned int fifo_size,
unsigned int queue_count,
unsigned int *fifo)
{ … }
static unsigned int xgbe_set_nonprio_fifos(unsigned int fifo_size,
unsigned int queue_count,
unsigned int *fifo)
{ … }
static unsigned int xgbe_get_pfc_delay(struct xgbe_prv_data *pdata)
{ … }
static unsigned int xgbe_get_pfc_queues(struct xgbe_prv_data *pdata)
{ … }
static void xgbe_calculate_dcb_fifo(struct xgbe_prv_data *pdata,
unsigned int fifo_size,
unsigned int *fifo)
{ … }
static void xgbe_config_tx_fifo_size(struct xgbe_prv_data *pdata)
{ … }
static void xgbe_config_rx_fifo_size(struct xgbe_prv_data *pdata)
{ … }
static void xgbe_config_queue_mapping(struct xgbe_prv_data *pdata)
{ … }
static void xgbe_config_tc(struct xgbe_prv_data *pdata)
{ … }
static void xgbe_config_dcb_tc(struct xgbe_prv_data *pdata)
{ … }
static void xgbe_config_dcb_pfc(struct xgbe_prv_data *pdata)
{ … }
static void xgbe_config_mac_address(struct xgbe_prv_data *pdata)
{ … }
static void xgbe_config_jumbo_enable(struct xgbe_prv_data *pdata)
{ … }
static void xgbe_config_mac_speed(struct xgbe_prv_data *pdata)
{ … }
static void xgbe_config_checksum_offload(struct xgbe_prv_data *pdata)
{ … }
static void xgbe_config_vlan_support(struct xgbe_prv_data *pdata)
{ … }
static u64 xgbe_mmc_read(struct xgbe_prv_data *pdata, unsigned int reg_lo)
{ … }
static void xgbe_tx_mmc_int(struct xgbe_prv_data *pdata)
{ … }
static void xgbe_rx_mmc_int(struct xgbe_prv_data *pdata)
{ … }
static void xgbe_read_mmc_stats(struct xgbe_prv_data *pdata)
{ … }
static void xgbe_config_mmc(struct xgbe_prv_data *pdata)
{ … }
static void xgbe_txq_prepare_tx_stop(struct xgbe_prv_data *pdata,
unsigned int queue)
{ … }
static void xgbe_prepare_tx_stop(struct xgbe_prv_data *pdata,
unsigned int queue)
{ … }
static void xgbe_enable_tx(struct xgbe_prv_data *pdata)
{ … }
static void xgbe_disable_tx(struct xgbe_prv_data *pdata)
{ … }
static void xgbe_prepare_rx_stop(struct xgbe_prv_data *pdata,
unsigned int queue)
{ … }
static void xgbe_enable_rx(struct xgbe_prv_data *pdata)
{ … }
static void xgbe_disable_rx(struct xgbe_prv_data *pdata)
{ … }
static void xgbe_powerup_tx(struct xgbe_prv_data *pdata)
{ … }
static void xgbe_powerdown_tx(struct xgbe_prv_data *pdata)
{ … }
static void xgbe_powerup_rx(struct xgbe_prv_data *pdata)
{ … }
static void xgbe_powerdown_rx(struct xgbe_prv_data *pdata)
{ … }
static int xgbe_init(struct xgbe_prv_data *pdata)
{ … }
void xgbe_init_function_ptrs_dev(struct xgbe_hw_if *hw_if)
{ … }