linux/drivers/net/ethernet/wiznet/w5300.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Ethernet driver for the WIZnet W5300 chip.
 *
 * Copyright (C) 2008-2009 WIZnet Co.,Ltd.
 * Copyright (C) 2011 Taehun Kim <kth3321 <at> gmail.com>
 * Copyright (C) 2012 Mike Sinkovsky <[email protected]>
 */

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/platform_device.h>
#include <linux/platform_data/wiznet.h>
#include <linux/ethtool.h>
#include <linux/skbuff.h>
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/io.h>
#include <linux/ioport.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/gpio.h>

#define DRV_NAME
#define DRV_VERSION

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

/*
 * Registers
 */
#define W5300_MR
#define MR_DBW
#define MR_MPF
#define MR_WDF(n)
#define MR_RDH
#define MR_FS
#define MR_RST
#define MR_PB
#define MR_DBS
#define MR_IND
#define W5300_IR
#define W5300_IMR
#define IR_S0
#define W5300_SHARL
#define W5300_SHARH
#define W5300_TMSRL
#define W5300_TMSRH
#define W5300_RMSRL
#define W5300_RMSRH
#define W5300_MTYPE
#define W5300_IDR
#define IDR_W5300
#define W5300_S0_MR
#define S0_MR_CLOSED
#define S0_MR_MACRAW
#define S0_MR_MACRAW_MF
#define W5300_S0_CR
#define S0_CR_OPEN
#define S0_CR_CLOSE
#define S0_CR_SEND
#define S0_CR_RECV
#define W5300_S0_IMR
#define W5300_S0_IR
#define S0_IR_RECV
#define S0_IR_SENDOK
#define W5300_S0_SSR
#define W5300_S0_TX_WRSR
#define W5300_S0_TX_FSR
#define W5300_S0_RX_RSR
#define W5300_S0_TX_FIFO
#define W5300_S0_RX_FIFO
#define W5300_REGS_LEN

/*
 * Device driver private data structure
 */
struct w5300_priv {};

/************************************************************************
 *
 *  Lowlevel I/O functions
 *
 ***********************************************************************/

/*
 * In direct address mode host system can directly access W5300 registers
 * after mapping to Memory-Mapped I/O space.
 *
 * 0x400 bytes are required for memory space.
 */
static inline u16 w5300_read_direct(struct w5300_priv *priv, u16 addr)
{}

static inline void w5300_write_direct(struct w5300_priv *priv,
				      u16 addr, u16 data)
{}

/*
 * In indirect address mode host system indirectly accesses registers by
 * using Indirect Mode Address Register (IDM_AR) and Indirect Mode Data
 * Register (IDM_DR), which are directly mapped to Memory-Mapped I/O space.
 * Mode Register (MR) is directly accessible.
 *
 * Only 0x06 bytes are required for memory space.
 */
#define W5300_IDM_AR
#define W5300_IDM_DR

static u16 w5300_read_indirect(struct w5300_priv *priv, u16 addr)
{}

static void w5300_write_indirect(struct w5300_priv *priv, u16 addr, u16 data)
{}

#if defined(CONFIG_WIZNET_BUS_DIRECT)
#define w5300_read
#define w5300_write

#elif defined(CONFIG_WIZNET_BUS_INDIRECT)
#define w5300_read
#define w5300_write

#else /* CONFIG_WIZNET_BUS_ANY */
#define w5300_read
#define w5300_write
#endif

static u32 w5300_read32(struct w5300_priv *priv, u16 addr)
{}

static void w5300_write32(struct w5300_priv *priv, u16 addr, u32 data)
{}

static int w5300_command(struct w5300_priv *priv, u16 cmd)
{}

static void w5300_read_frame(struct w5300_priv *priv, u8 *buf, int len)
{}

static void w5300_write_frame(struct w5300_priv *priv, u8 *buf, int len)
{}

static void w5300_write_macaddr(struct w5300_priv *priv)
{}

static void w5300_hw_reset(struct w5300_priv *priv)
{}

static void w5300_hw_start(struct w5300_priv *priv)
{}

static void w5300_hw_close(struct w5300_priv *priv)
{}

/***********************************************************************
 *
 *   Device driver functions / callbacks
 *
 ***********************************************************************/

static void w5300_get_drvinfo(struct net_device *ndev,
			      struct ethtool_drvinfo *info)
{}

static u32 w5300_get_link(struct net_device *ndev)
{}

static u32 w5300_get_msglevel(struct net_device *ndev)
{}

static void w5300_set_msglevel(struct net_device *ndev, u32 value)
{}

static int w5300_get_regs_len(struct net_device *ndev)
{}

static void w5300_get_regs(struct net_device *ndev,
			   struct ethtool_regs *regs, void *_buf)
{}

static void w5300_tx_timeout(struct net_device *ndev, unsigned int txqueue)
{}

static netdev_tx_t w5300_start_tx(struct sk_buff *skb, struct net_device *ndev)
{}

static int w5300_napi_poll(struct napi_struct *napi, int budget)
{}

static irqreturn_t w5300_interrupt(int irq, void *ndev_instance)
{}

static irqreturn_t w5300_detect_link(int irq, void *ndev_instance)
{}

static void w5300_set_rx_mode(struct net_device *ndev)
{}

static int w5300_set_macaddr(struct net_device *ndev, void *addr)
{}

static int w5300_open(struct net_device *ndev)
{}

static int w5300_stop(struct net_device *ndev)
{}

static const struct ethtool_ops w5300_ethtool_ops =;

static const struct net_device_ops w5300_netdev_ops =;

static int w5300_hw_probe(struct platform_device *pdev)
{}

static int w5300_probe(struct platform_device *pdev)
{}

static void w5300_remove(struct platform_device *pdev)
{}

#ifdef CONFIG_PM_SLEEP
static int w5300_suspend(struct device *dev)
{}

static int w5300_resume(struct device *dev)
{}
#endif /* CONFIG_PM_SLEEP */

static SIMPLE_DEV_PM_OPS(w5300_pm_ops, w5300_suspend, w5300_resume);

static struct platform_driver w5300_driver =;

module_platform_driver();