Linux Kernel
3.7.1
|
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/kconfig.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>
Go to the source code of this file.
Data Structures | |
struct | w5300_priv |
Macros | |
#define | DRV_NAME "w5300" |
#define | DRV_VERSION "2012-04-04" |
#define | W5300_MR 0x0000 /* Mode Register */ |
#define | MR_DBW (1 << 15) /* Data bus width */ |
#define | MR_MPF (1 << 14) /* Mac layer pause frame */ |
#define | MR_WDF(n) (((n)&7)<<11) /* Write data fetch time */ |
#define | MR_RDH (1 << 10) /* Read data hold time */ |
#define | MR_FS (1 << 8) /* FIFO swap */ |
#define | MR_RST (1 << 7) /* S/W reset */ |
#define | MR_PB (1 << 4) /* Ping block */ |
#define | MR_DBS (1 << 2) /* Data bus swap */ |
#define | MR_IND (1 << 0) /* Indirect mode */ |
#define | W5300_IR 0x0002 /* Interrupt Register */ |
#define | W5300_IMR 0x0004 /* Interrupt Mask Register */ |
#define | IR_S0 0x0001 /* S0 interrupt */ |
#define | W5300_SHARL 0x0008 /* Source MAC address (0123) */ |
#define | W5300_SHARH 0x000c /* Source MAC address (45) */ |
#define | W5300_TMSRL 0x0020 /* Transmit Memory Size (0123) */ |
#define | W5300_TMSRH 0x0024 /* Transmit Memory Size (4567) */ |
#define | W5300_RMSRL 0x0028 /* Receive Memory Size (0123) */ |
#define | W5300_RMSRH 0x002c /* Receive Memory Size (4567) */ |
#define | W5300_MTYPE 0x0030 /* Memory Type */ |
#define | W5300_IDR 0x00fe /* Chip ID register */ |
#define | IDR_W5300 0x5300 /* =0x5300 for WIZnet W5300 */ |
#define | W5300_S0_MR 0x0200 /* S0 Mode Register */ |
#define | S0_MR_CLOSED 0x0000 /* Close mode */ |
#define | S0_MR_MACRAW 0x0004 /* MAC RAW mode (promiscous) */ |
#define | S0_MR_MACRAW_MF 0x0044 /* MAC RAW mode (filtered) */ |
#define | W5300_S0_CR 0x0202 /* S0 Command Register */ |
#define | S0_CR_OPEN 0x0001 /* OPEN command */ |
#define | S0_CR_CLOSE 0x0010 /* CLOSE command */ |
#define | S0_CR_SEND 0x0020 /* SEND command */ |
#define | S0_CR_RECV 0x0040 /* RECV command */ |
#define | W5300_S0_IMR 0x0204 /* S0 Interrupt Mask Register */ |
#define | W5300_S0_IR 0x0206 /* S0 Interrupt Register */ |
#define | S0_IR_RECV 0x0004 /* Receive interrupt */ |
#define | S0_IR_SENDOK 0x0010 /* Send OK interrupt */ |
#define | W5300_S0_SSR 0x0208 /* S0 Socket Status Register */ |
#define | W5300_S0_TX_WRSR 0x0220 /* S0 TX Write Size Register */ |
#define | W5300_S0_TX_FSR 0x0224 /* S0 TX Free Size Register */ |
#define | W5300_S0_RX_RSR 0x0228 /* S0 Received data Size */ |
#define | W5300_S0_TX_FIFO 0x022e /* S0 Transmit FIFO */ |
#define | W5300_S0_RX_FIFO 0x0230 /* S0 Receive FIFO */ |
#define | W5300_REGS_LEN 0x0400 |
#define | W5300_IDM_AR 0x0002 /* Indirect Mode Address */ |
#define | W5300_IDM_DR 0x0004 /* Indirect Mode Data */ |
#define | w5300_read priv->read |
#define | w5300_write priv->write |
Functions | |
MODULE_DESCRIPTION ("WIZnet W5300 Ethernet driver v"DRV_VERSION) | |
MODULE_AUTHOR ("Mike Sinkovsky <[email protected]>") | |
MODULE_ALIAS ("platform:"DRV_NAME) | |
MODULE_LICENSE ("GPL") | |
module_platform_driver (w5300_driver) | |
#define W5300_S0_TX_FSR 0x0224 /* S0 TX Free Size Register */ |
#define W5300_S0_TX_WRSR 0x0220 /* S0 TX Write Size Register */ |
MODULE_ALIAS | ( | "platform:" | DRV_NAME | ) |
MODULE_AUTHOR | ( | "Mike Sinkovsky <[email protected]>" | ) |
MODULE_LICENSE | ( | "GPL" | ) |
module_platform_driver | ( | w5300_driver | ) |