Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
w90p910_ether.c File Reference
#include <linux/module.h>
#include <linux/init.h>
#include <linux/mii.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
#include <linux/ethtool.h>
#include <linux/platform_device.h>
#include <linux/clk.h>
#include <linux/gfp.h>

Go to the source code of this file.

Data Structures

struct  w90p910_rxbd
 
struct  w90p910_txbd
 
struct  recv_pdesc
 
struct  tran_pdesc
 
struct  w90p910_ether
 

Macros

#define DRV_MODULE_NAME   "w90p910-emc"
 
#define DRV_MODULE_VERSION   "0.1"
 
#define REG_CAMCMR   0x00
 
#define REG_CAMEN   0x04
 
#define REG_CAMM_BASE   0x08
 
#define REG_CAML_BASE   0x0c
 
#define REG_TXDLSA   0x88
 
#define REG_RXDLSA   0x8C
 
#define REG_MCMDR   0x90
 
#define REG_MIID   0x94
 
#define REG_MIIDA   0x98
 
#define REG_FFTCR   0x9C
 
#define REG_TSDR   0xa0
 
#define REG_RSDR   0xa4
 
#define REG_DMARFC   0xa8
 
#define REG_MIEN   0xac
 
#define REG_MISTA   0xb0
 
#define REG_CTXDSA   0xcc
 
#define REG_CTXBSA   0xd0
 
#define REG_CRXDSA   0xd4
 
#define REG_CRXBSA   0xd8
 
#define MCMDR_RXON   0x01
 
#define MCMDR_ACP   (0x01 << 3)
 
#define MCMDR_SPCRC   (0x01 << 5)
 
#define MCMDR_TXON   (0x01 << 8)
 
#define MCMDR_FDUP   (0x01 << 18)
 
#define MCMDR_ENMDC   (0x01 << 19)
 
#define MCMDR_OPMOD   (0x01 << 20)
 
#define SWR   (0x01 << 24)
 
#define CAMCMR_AUP   0x01
 
#define CAMCMR_AMP   (0x01 << 1)
 
#define CAMCMR_ABP   (0x01 << 2)
 
#define CAMCMR_CCAM   (0x01 << 3)
 
#define CAMCMR_ECMP   (0x01 << 4)
 
#define CAM0EN   0x01
 
#define MDCCR   (0x0a << 20)
 
#define PHYAD   (0x01 << 8)
 
#define PHYWR   (0x01 << 16)
 
#define PHYBUSY   (0x01 << 17)
 
#define PHYPRESP   (0x01 << 18)
 
#define CAM_ENTRY_SIZE   0x08
 
#define TXDS_TXCP   (0x01 << 19)
 
#define RXDS_CRCE   (0x01 << 17)
 
#define RXDS_PTLE   (0x01 << 19)
 
#define RXDS_RXGD   (0x01 << 20)
 
#define RXDS_ALIE   (0x01 << 21)
 
#define RXDS_RP   (0x01 << 22)
 
#define MISTA_EXDEF   (0x01 << 19)
 
#define MISTA_TXBERR   (0x01 << 24)
 
#define MISTA_TDU   (0x01 << 23)
 
#define MISTA_RDU   (0x01 << 10)
 
#define MISTA_RXBERR   (0x01 << 11)
 
#define ENSTART   0x01
 
#define ENRXINTR   0x01
 
#define ENRXGD   (0x01 << 4)
 
#define ENRXBERR   (0x01 << 11)
 
#define ENTXINTR   (0x01 << 16)
 
#define ENTXCP   (0x01 << 18)
 
#define ENTXABT   (0x01 << 21)
 
#define ENTXBERR   (0x01 << 24)
 
#define ENMDC   (0x01 << 19)
 
#define PHYBUSY   (0x01 << 17)
 
#define MDCCR_VAL   0xa00000
 
#define RX_OWEN_DMA   (0x01 << 31)
 
#define RX_OWEN_CPU   (~(0x03 << 30))
 
#define TX_OWEN_DMA   (0x01 << 31)
 
#define TX_OWEN_CPU   (~(0x01 << 31))
 
#define MACTXINTEN   0x04
 
#define CRCMODE   0x02
 
#define PADDINGMODE   0x01
 
#define TXTHD   (0x03 << 8)
 
#define BLENGTH   (0x01 << 20)
 
#define RX_DESC_SIZE   50
 
#define TX_DESC_SIZE   10
 
#define MAX_RBUFF_SZ   0x600
 
#define MAX_TBUFF_SZ   0x600
 
#define TX_TIMEOUT   (HZ/2)
 
#define DELAY   1000
 
#define CAM0   0x0
 

Functions

 module_platform_driver (w90p910_ether_driver)
 
 MODULE_AUTHOR ("Wan ZongShun <[email protected]>")
 
 MODULE_DESCRIPTION ("w90p910 MAC driver!")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_ALIAS ("platform:nuc900-emc")
 

Macro Definition Documentation

#define BLENGTH   (0x01 << 20)

Definition at line 113 of file w90p910_ether.c.

#define CAM0   0x0

Definition at line 122 of file w90p910_ether.c.

#define CAM0EN   0x01

Definition at line 63 of file w90p910_ether.c.

#define CAM_ENTRY_SIZE   0x08

Definition at line 71 of file w90p910_ether.c.

#define CAMCMR_ABP   (0x01 << 2)

Definition at line 60 of file w90p910_ether.c.

#define CAMCMR_AMP   (0x01 << 1)

Definition at line 59 of file w90p910_ether.c.

#define CAMCMR_AUP   0x01

Definition at line 58 of file w90p910_ether.c.

#define CAMCMR_CCAM   (0x01 << 3)

Definition at line 61 of file w90p910_ether.c.

#define CAMCMR_ECMP   (0x01 << 4)

Definition at line 62 of file w90p910_ether.c.

#define CRCMODE   0x02

Definition at line 108 of file w90p910_ether.c.

#define DELAY   1000

Definition at line 121 of file w90p910_ether.c.

#define DRV_MODULE_NAME   "w90p910-emc"

Definition at line 23 of file w90p910_ether.c.

#define DRV_MODULE_VERSION   "0.1"

Definition at line 24 of file w90p910_ether.c.

#define ENMDC   (0x01 << 19)

Definition at line 96 of file w90p910_ether.c.

#define ENRXBERR   (0x01 << 11)

Definition at line 91 of file w90p910_ether.c.

#define ENRXGD   (0x01 << 4)

Definition at line 90 of file w90p910_ether.c.

#define ENRXINTR   0x01

Definition at line 89 of file w90p910_ether.c.

#define ENSTART   0x01

Definition at line 88 of file w90p910_ether.c.

#define ENTXABT   (0x01 << 21)

Definition at line 94 of file w90p910_ether.c.

#define ENTXBERR   (0x01 << 24)

Definition at line 95 of file w90p910_ether.c.

#define ENTXCP   (0x01 << 18)

Definition at line 93 of file w90p910_ether.c.

#define ENTXINTR   (0x01 << 16)

Definition at line 92 of file w90p910_ether.c.

#define MACTXINTEN   0x04

Definition at line 107 of file w90p910_ether.c.

#define MAX_RBUFF_SZ   0x600

Definition at line 118 of file w90p910_ether.c.

#define MAX_TBUFF_SZ   0x600

Definition at line 119 of file w90p910_ether.c.

#define MCMDR_ACP   (0x01 << 3)

Definition at line 49 of file w90p910_ether.c.

#define MCMDR_ENMDC   (0x01 << 19)

Definition at line 53 of file w90p910_ether.c.

#define MCMDR_FDUP   (0x01 << 18)

Definition at line 52 of file w90p910_ether.c.

#define MCMDR_OPMOD   (0x01 << 20)

Definition at line 54 of file w90p910_ether.c.

#define MCMDR_RXON   0x01

Definition at line 48 of file w90p910_ether.c.

#define MCMDR_SPCRC   (0x01 << 5)

Definition at line 50 of file w90p910_ether.c.

#define MCMDR_TXON   (0x01 << 8)

Definition at line 51 of file w90p910_ether.c.

#define MDCCR   (0x0a << 20)

Definition at line 66 of file w90p910_ether.c.

#define MDCCR_VAL   0xa00000

Definition at line 98 of file w90p910_ether.c.

#define MISTA_EXDEF   (0x01 << 19)

Definition at line 82 of file w90p910_ether.c.

#define MISTA_RDU   (0x01 << 10)

Definition at line 85 of file w90p910_ether.c.

#define MISTA_RXBERR   (0x01 << 11)

Definition at line 86 of file w90p910_ether.c.

#define MISTA_TDU   (0x01 << 23)

Definition at line 84 of file w90p910_ether.c.

#define MISTA_TXBERR   (0x01 << 24)

Definition at line 83 of file w90p910_ether.c.

#define PADDINGMODE   0x01

Definition at line 109 of file w90p910_ether.c.

#define PHYAD   (0x01 << 8)

Definition at line 67 of file w90p910_ether.c.

#define PHYBUSY   (0x01 << 17)

Definition at line 97 of file w90p910_ether.c.

#define PHYBUSY   (0x01 << 17)

Definition at line 97 of file w90p910_ether.c.

#define PHYPRESP   (0x01 << 18)

Definition at line 70 of file w90p910_ether.c.

#define PHYWR   (0x01 << 16)

Definition at line 68 of file w90p910_ether.c.

#define REG_CAMCMR   0x00

Definition at line 27 of file w90p910_ether.c.

#define REG_CAMEN   0x04

Definition at line 28 of file w90p910_ether.c.

#define REG_CAML_BASE   0x0c

Definition at line 30 of file w90p910_ether.c.

#define REG_CAMM_BASE   0x08

Definition at line 29 of file w90p910_ether.c.

#define REG_CRXBSA   0xd8

Definition at line 45 of file w90p910_ether.c.

#define REG_CRXDSA   0xd4

Definition at line 44 of file w90p910_ether.c.

#define REG_CTXBSA   0xd0

Definition at line 43 of file w90p910_ether.c.

#define REG_CTXDSA   0xcc

Definition at line 42 of file w90p910_ether.c.

#define REG_DMARFC   0xa8

Definition at line 39 of file w90p910_ether.c.

#define REG_FFTCR   0x9C

Definition at line 36 of file w90p910_ether.c.

#define REG_MCMDR   0x90

Definition at line 33 of file w90p910_ether.c.

#define REG_MIEN   0xac

Definition at line 40 of file w90p910_ether.c.

#define REG_MIID   0x94

Definition at line 34 of file w90p910_ether.c.

#define REG_MIIDA   0x98

Definition at line 35 of file w90p910_ether.c.

#define REG_MISTA   0xb0

Definition at line 41 of file w90p910_ether.c.

#define REG_RSDR   0xa4

Definition at line 38 of file w90p910_ether.c.

#define REG_RXDLSA   0x8C

Definition at line 32 of file w90p910_ether.c.

#define REG_TSDR   0xa0

Definition at line 37 of file w90p910_ether.c.

#define REG_TXDLSA   0x88

Definition at line 31 of file w90p910_ether.c.

#define RX_DESC_SIZE   50

Definition at line 116 of file w90p910_ether.c.

#define RX_OWEN_CPU   (~(0x03 << 30))

Definition at line 102 of file w90p910_ether.c.

#define RX_OWEN_DMA   (0x01 << 31)

Definition at line 101 of file w90p910_ether.c.

#define RXDS_ALIE   (0x01 << 21)

Definition at line 78 of file w90p910_ether.c.

#define RXDS_CRCE   (0x01 << 17)

Definition at line 75 of file w90p910_ether.c.

#define RXDS_PTLE   (0x01 << 19)

Definition at line 76 of file w90p910_ether.c.

#define RXDS_RP   (0x01 << 22)

Definition at line 79 of file w90p910_ether.c.

#define RXDS_RXGD   (0x01 << 20)

Definition at line 77 of file w90p910_ether.c.

#define SWR   (0x01 << 24)

Definition at line 55 of file w90p910_ether.c.

#define TX_DESC_SIZE   10

Definition at line 117 of file w90p910_ether.c.

#define TX_OWEN_CPU   (~(0x01 << 31))

Definition at line 104 of file w90p910_ether.c.

#define TX_OWEN_DMA   (0x01 << 31)

Definition at line 103 of file w90p910_ether.c.

#define TX_TIMEOUT   (HZ/2)

Definition at line 120 of file w90p910_ether.c.

#define TXDS_TXCP   (0x01 << 19)

Definition at line 74 of file w90p910_ether.c.

#define TXTHD   (0x03 << 8)

Definition at line 112 of file w90p910_ether.c.

Function Documentation

MODULE_ALIAS ( "platform:nuc900-emc )
MODULE_AUTHOR ( "Wan ZongShun <[email protected]>"  )
MODULE_DESCRIPTION ( "w90p910 MAC driver!"  )
MODULE_LICENSE ( "GPL"  )
module_platform_driver ( w90p910_ether_driver  )