linux/drivers/net/ethernet/microchip/encx24j600.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Microchip ENCX24J600 ethernet driver
 *
 * Copyright (C) 2015 Gridpoint
 * Author: Jon Ringle <[email protected]>
 */

#include <linux/device.h>
#include <linux/errno.h>
#include <linux/etherdevice.h>
#include <linux/ethtool.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/netdevice.h>
#include <linux/regmap.h>
#include <linux/skbuff.h>
#include <linux/spi/spi.h>

#include "encx24j600_hw.h"

#define DRV_NAME
#define DRV_VERSION

#define DEFAULT_MSG_ENABLE
static int debug =;
module_param(debug, int, 0000);
MODULE_PARM_DESC();

/* SRAM memory layout:
 *
 * 0x0000-0x05ff TX buffers  1.5KB  (1*1536) reside in the GP area in SRAM
 * 0x0600-0x5fff RX buffers 22.5KB (15*1536) reside in the RX area in SRAM
 */
#define ENC_TX_BUF_START
#define ENC_RX_BUF_START
#define ENC_RX_BUF_END
#define ENC_SRAM_SIZE

enum {};

struct encx24j600_priv {};

static void dump_packet(const char *msg, int len, const char *data)
{}

static void encx24j600_dump_rsv(struct encx24j600_priv *priv, const char *msg,
				struct rsv *rsv)
{}

static u16 encx24j600_read_reg(struct encx24j600_priv *priv, u8 reg)
{}

static void encx24j600_write_reg(struct encx24j600_priv *priv, u8 reg, u16 val)
{}

static void encx24j600_update_reg(struct encx24j600_priv *priv, u8 reg,
				  u16 mask, u16 val)
{}

static u16 encx24j600_read_phy(struct encx24j600_priv *priv, u8 reg)
{}

static void encx24j600_write_phy(struct encx24j600_priv *priv, u8 reg, u16 val)
{}

static void encx24j600_clr_bits(struct encx24j600_priv *priv, u8 reg, u16 mask)
{}

static void encx24j600_set_bits(struct encx24j600_priv *priv, u8 reg, u16 mask)
{}

static void encx24j600_cmd(struct encx24j600_priv *priv, u8 cmd)
{}

static int encx24j600_raw_read(struct encx24j600_priv *priv, u8 reg, u8 *data,
			       size_t count)
{}

static int encx24j600_raw_write(struct encx24j600_priv *priv, u8 reg,
				const u8 *data, size_t count)
{}

static void encx24j600_update_phcon1(struct encx24j600_priv *priv)
{}

/* Waits for autonegotiation to complete. */
static int encx24j600_wait_for_autoneg(struct encx24j600_priv *priv)
{}

/* Access the PHY to determine link status */
static void encx24j600_check_link_status(struct encx24j600_priv *priv)
{}

static void encx24j600_int_link_handler(struct encx24j600_priv *priv)
{}

static void encx24j600_tx_complete(struct encx24j600_priv *priv, bool err)
{}

static int encx24j600_receive_packet(struct encx24j600_priv *priv,
				     struct rsv *rsv)
{}

static void encx24j600_rx_packets(struct encx24j600_priv *priv, u8 packet_count)
{}

static irqreturn_t encx24j600_isr(int irq, void *dev_id)
{}

static int encx24j600_soft_reset(struct encx24j600_priv *priv)
{}

static int encx24j600_hw_reset(struct encx24j600_priv *priv)
{}

static void encx24j600_reset_hw_tx(struct encx24j600_priv *priv)
{}

static void encx24j600_hw_init_tx(struct encx24j600_priv *priv)
{}

static void encx24j600_hw_init_rx(struct encx24j600_priv *priv)
{}

static void encx24j600_dump_config(struct encx24j600_priv *priv,
				   const char *msg)
{}

static void encx24j600_set_rxfilter_mode(struct encx24j600_priv *priv)
{}

static void encx24j600_hw_init(struct encx24j600_priv *priv)
{}

static void encx24j600_hw_enable(struct encx24j600_priv *priv)
{}

static void encx24j600_hw_disable(struct encx24j600_priv *priv)
{}

static int encx24j600_setlink(struct net_device *dev, u8 autoneg, u16 speed,
			      u8 duplex)
{}

static void encx24j600_hw_get_macaddr(struct encx24j600_priv *priv,
				      unsigned char *ethaddr)
{}

/* Program the hardware MAC address from dev->dev_addr.*/
static int encx24j600_set_hw_macaddr(struct net_device *dev)
{}

/* Store the new hardware address in dev->dev_addr, and update the MAC.*/
static int encx24j600_set_mac_address(struct net_device *dev, void *addr)
{}

static int encx24j600_open(struct net_device *dev)
{}

static int encx24j600_stop(struct net_device *dev)
{}

static void encx24j600_setrx_proc(struct kthread_work *ws)
{}

static void encx24j600_set_multicast_list(struct net_device *dev)
{}

static void encx24j600_hw_tx(struct encx24j600_priv *priv)
{}

static void encx24j600_tx_proc(struct kthread_work *ws)
{}

static netdev_tx_t encx24j600_tx(struct sk_buff *skb, struct net_device *dev)
{}

/* Deal with a transmit timeout */
static void encx24j600_tx_timeout(struct net_device *dev, unsigned int txqueue)
{}

static int encx24j600_get_regs_len(struct net_device *dev)
{}

static void encx24j600_get_regs(struct net_device *dev,
				struct ethtool_regs *regs, void *p)
{}

static void encx24j600_get_drvinfo(struct net_device *dev,
				   struct ethtool_drvinfo *info)
{}

static int encx24j600_get_link_ksettings(struct net_device *dev,
					 struct ethtool_link_ksettings *cmd)
{}

static int
encx24j600_set_link_ksettings(struct net_device *dev,
			      const struct ethtool_link_ksettings *cmd)
{}

static u32 encx24j600_get_msglevel(struct net_device *dev)
{}

static void encx24j600_set_msglevel(struct net_device *dev, u32 val)
{}

static const struct ethtool_ops encx24j600_ethtool_ops =;

static const struct net_device_ops encx24j600_netdev_ops =;

static int encx24j600_spi_probe(struct spi_device *spi)
{}

static void encx24j600_spi_remove(struct spi_device *spi)
{}

static const struct spi_device_id encx24j600_spi_id_table[] =;
MODULE_DEVICE_TABLE(spi, encx24j600_spi_id_table);

static struct spi_driver encx24j600_spi_net_driver =;

module_spi_driver();

MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_LICENSE();