Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
com20020.h File Reference

Go to the source code of this file.

Macros

#define ARCNET_TOTAL_SIZE   8
 
#define BUS_ALIGN   1
 
#define _INTMASK   (ioaddr+BUS_ALIGN*0) /* writable */
 
#define _STATUS   (ioaddr+BUS_ALIGN*0) /* readable */
 
#define _COMMAND   (ioaddr+BUS_ALIGN*1) /* standard arcnet commands */
 
#define _DIAGSTAT   (ioaddr+BUS_ALIGN*1) /* diagnostic status register */
 
#define _ADDR_HI   (ioaddr+BUS_ALIGN*2) /* control registers for IO-mapped memory */
 
#define _ADDR_LO   (ioaddr+BUS_ALIGN*3)
 
#define _MEMDATA   (ioaddr+BUS_ALIGN*4) /* data port for IO-mapped memory */
 
#define _SUBADR   (ioaddr+BUS_ALIGN*5) /* the extended port _XREG refers to */
 
#define _CONFIG   (ioaddr+BUS_ALIGN*6) /* configuration register */
 
#define _XREG
 
#define RDDATAflag   0x80 /* next access is a read (not a write) */
 
#define NEWNXTIDflag   0x02 /* ID to which token is passed has changed */
 
#define RESETcfg   0x80 /* put card in reset state */
 
#define TXENcfg   0x20 /* enable TX */
 
#define PROMISCset   0x10 /* enable RCV_ALL */
 
#define P1MODE   0x80 /* enable P1-MODE for Backplane */
 
#define SLOWARB   0x01 /* enable Slow Arbitration for >=5Mbps */
 
#define SUB_TENTATIVE   0 /* tentative node ID */
 
#define SUB_NODE   1 /* node ID */
 
#define SUB_SETUP1   2 /* various options */
 
#define SUB_TEST   3 /* test/diag register */
 
#define SUB_SETUP2   4 /* sundry options */
 
#define SUB_BUSCTL   5 /* bus control options */
 
#define SUB_DMACOUNT   6 /* DMA count options */
 
#define SET_SUBADR(x)
 
#define ARCRESET
 
#define ARCRESET0
 
#define ASTATUS()   inb(_STATUS)
 
#define ADIAGSTATUS()   inb(_DIAGSTAT)
 
#define ACOMMAND(cmd)   outb((cmd),_COMMAND)
 
#define AINTMASK(msk)   outb((msk),_INTMASK)
 
#define SETCONF   outb(lp->config, _CONFIG)
 

Functions

int com20020_check (struct net_device *dev)
 
int com20020_found (struct net_device *dev, int shared)
 

Variables

struct net_device_ops com20020_netdev_ops
 

Macro Definition Documentation

#define _ADDR_HI   (ioaddr+BUS_ALIGN*2) /* control registers for IO-mapped memory */

Definition at line 49 of file com20020.h.

#define _ADDR_LO   (ioaddr+BUS_ALIGN*3)

Definition at line 50 of file com20020.h.

#define _COMMAND   (ioaddr+BUS_ALIGN*1) /* standard arcnet commands */

Definition at line 47 of file com20020.h.

#define _CONFIG   (ioaddr+BUS_ALIGN*6) /* configuration register */

Definition at line 53 of file com20020.h.

#define _DIAGSTAT   (ioaddr+BUS_ALIGN*1) /* diagnostic status register */

Definition at line 48 of file com20020.h.

#define _INTMASK   (ioaddr+BUS_ALIGN*0) /* writable */

Definition at line 45 of file com20020.h.

#define _MEMDATA   (ioaddr+BUS_ALIGN*4) /* data port for IO-mapped memory */

Definition at line 51 of file com20020.h.

#define _STATUS   (ioaddr+BUS_ALIGN*0) /* readable */

Definition at line 46 of file com20020.h.

#define _SUBADR   (ioaddr+BUS_ALIGN*5) /* the extended port _XREG refers to */

Definition at line 52 of file com20020.h.

#define _XREG
Value:
(ioaddr+BUS_ALIGN*7) /* extra registers (indexed by _CONFIG
or _SUBADR) */

Definition at line 54 of file com20020.h.

#define ACOMMAND (   cmd)    outb((cmd),_COMMAND)

Definition at line 110 of file com20020.h.

#define ADIAGSTATUS ( )    inb(_DIAGSTAT)

Definition at line 109 of file com20020.h.

#define AINTMASK (   msk)    outb((msk),_INTMASK)

Definition at line 111 of file com20020.h.

#define ARCNET_TOTAL_SIZE   8

Definition at line 35 of file com20020.h.

#define ARCRESET
Value:
{ outb(lp->config | 0x80, _CONFIG); \
udelay(5); \
outb(lp->config , _CONFIG); \
}

Definition at line 99 of file com20020.h.

#define ARCRESET0
Value:
{ outb(0x18 | 0x80, _CONFIG); \
udelay(5); \
outb(0x18 , _CONFIG); \
}

Definition at line 103 of file com20020.h.

#define ASTATUS ( )    inb(_STATUS)

Definition at line 108 of file com20020.h.

#define BUS_ALIGN   1

Definition at line 41 of file com20020.h.

#define NEWNXTIDflag   0x02 /* ID to which token is passed has changed */

Definition at line 60 of file com20020.h.

#define P1MODE   0x80 /* enable P1-MODE for Backplane */

Definition at line 68 of file com20020.h.

#define PROMISCset   0x10 /* enable RCV_ALL */

Definition at line 67 of file com20020.h.

#define RDDATAflag   0x80 /* next access is a read (not a write) */

Definition at line 57 of file com20020.h.

#define RESETcfg   0x80 /* put card in reset state */

Definition at line 63 of file com20020.h.

#define SET_SUBADR (   x)
Value:
do { \
if ((x) < 4) \
{ \
lp->config = (lp->config & ~0x03) | (x); \
SETCONF; \
} \
else \
{ \
outb(x, _SUBADR); \
} \
} while (0)

Definition at line 82 of file com20020.h.

#define SETCONF   outb(lp->config, _CONFIG)

Definition at line 113 of file com20020.h.

#define SLOWARB   0x01 /* enable Slow Arbitration for >=5Mbps */

Definition at line 69 of file com20020.h.

#define SUB_BUSCTL   5 /* bus control options */

Definition at line 79 of file com20020.h.

#define SUB_DMACOUNT   6 /* DMA count options */

Definition at line 80 of file com20020.h.

#define SUB_NODE   1 /* node ID */

Definition at line 73 of file com20020.h.

#define SUB_SETUP1   2 /* various options */

Definition at line 74 of file com20020.h.

#define SUB_SETUP2   4 /* sundry options */

Definition at line 78 of file com20020.h.

#define SUB_TENTATIVE   0 /* tentative node ID */

Definition at line 72 of file com20020.h.

#define SUB_TEST   3 /* test/diag register */

Definition at line 75 of file com20020.h.

#define TXENcfg   0x20 /* enable TX */

Definition at line 64 of file com20020.h.

Function Documentation

int com20020_check ( struct net_device dev)

Definition at line 89 of file com20020.c.

int com20020_found ( struct net_device dev,
int  shared 
)

Definition at line 163 of file com20020.c.

Variable Documentation

struct net_device_ops com20020_netdev_ops

Definition at line 152 of file com20020.c.