OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rc203soc/] [sw/] [uClinux/] [arch/] [armnommu/] [drivers/] [net/] [am79c961a.h] - Blame information for rev 1622

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1622 jcastillo
/*
2
 * linux/drivers/net/am79c961.h
3
 */
4
 
5
#ifndef _LINUX_am79c961a_H
6
#define _LINUX_am79c961a_H
7
 
8
/* use 0 for production, 1 for verification, >2 for debug. debug flags: */
9
#define DEBUG_TX         2
10
#define DEBUG_RX         4
11
#define DEBUG_INT        8
12
#define DEBUG_IC        16
13
#ifndef NET_DEBUG
14
#define NET_DEBUG       0
15
#endif
16
 
17
#define NET_UID         0
18
#define NET_RDP         0x10
19
#define NET_RAP         0x12
20
#define NET_RESET       0x14
21
#define NET_IDP         0x16
22
 
23
/*
24
 * RAP registers
25
 */
26
#define CSR0            0
27
#define CSR0_INIT       0x0001
28
#define CSR0_STRT       0x0002
29
#define CSR0_STOP       0x0004
30
#define CSR0_TDMD       0x0008
31
#define CSR0_TXON       0x0010
32
#define CSR0_RXON       0x0020
33
#define CSR0_IENA       0x0040
34
#define CSR0_INTR       0x0080
35
#define CSR0_IDON       0x0100
36
#define CSR0_TINT       0x0200
37
#define CSR0_RINT       0x0400
38
#define CSR0_MERR       0x0800
39
#define CSR0_MISS       0x1000
40
#define CSR0_CERR       0x2000
41
#define CSR0_BABL       0x4000
42
#define CSR0_ERR        0x8000
43
 
44
#define CSR3            3
45
#define CSR3_EMBA       0x0008
46
#define CSR3_DXMT2PD    0x0010
47
#define CSR3_LAPPEN     0x0020
48
#define CSR3_IDONM      0x0100
49
#define CSR3_TINTM      0x0200
50
#define CSR3_RINTM      0x0400
51
#define CSR3_MERRM      0x0800
52
#define CSR3_MISSM      0x1000
53
#define CSR3_BABLM      0x4000
54
#define CSR3_MASKALL    0x5F00
55
 
56
#define LADRL           8
57
#define LADRM1          9
58
#define LADRM2          10
59
#define LADRH           11
60
#define PADRL           12
61
#define PADRM           13
62
#define PADRH           14
63
 
64
#define MODE            15
65
#define MODE_DISRX      0x0001
66
#define MODE_DISTX      0x0002
67
#define MODE_LOOP       0x0004
68
#define MODE_DTCRC      0x0008
69
#define MODE_COLL       0x0010
70
#define MODE_DRETRY     0x0020
71
#define MODE_INTLOOP    0x0040
72
#define MODE_PORT0      0x0080
73
#define MODE_DRXPA      0x2000
74
#define MODE_DRXBA      0x4000
75
#define MODE_PROMISC    0x8000
76
 
77
#define BASERXL         24
78
#define BASERXH         25
79
#define BASETXL         30
80
#define BASETXH         31
81
 
82
#define POLLINT         47
83
 
84
#define SIZERXR         76
85
#define SIZETXR         78
86
 
87
#define RMD_ENP         0x0100
88
#define RMD_STP         0x0200
89
#define RMD_CRC         0x0800
90
#define RMD_FRAM        0x2000
91
#define RMD_ERR         0x4000
92
#define RMD_OWN         0x8000
93
 
94
#define TMD_ENP         0x0100
95
#define TMD_STP         0x0200
96
#define TMD_MORE        0x1000
97
#define TMD_ERR         0x4000
98
#define TMD_OWN         0x8000
99
 
100
#define TST_RTRY        0x0200
101
#define TST_LCAR        0x0400
102
#define TST_LCOL        0x1000
103
#define TST_UFLO        0x4000
104
 
105
struct dev_priv {
106
    struct enet_statistics stats;
107
    unsigned long       rxbuffer[RX_BUFFERS];
108
    unsigned long       txbuffer[TX_BUFFERS];
109
    unsigned char       txhead;
110
    unsigned char       txtail;
111
    unsigned char       rxhead;
112
    unsigned char       rxtail;
113
    unsigned long       rxhdr;
114
    unsigned long       txhdr;
115
};
116
 
117
extern int      am79c961_probe (struct device *dev);
118
static int      am79c961_probe1 (struct device *dev);
119
static int      am79c961_open (struct device *dev);
120
static int      am79c961_sendpacket (struct sk_buff *skb, struct device *dev);
121
static void     am79c961_interrupt (int irq, void *dev_id, struct pt_regs *regs);
122
static void     am79c961_rx (struct device *dev, struct dev_priv *priv);
123
static void     am79c961_tx (struct device *dev, struct dev_priv *priv);
124
static int      am79c961_close (struct device *dev);
125
static struct enet_statistics *am79c961_getstats (struct device *dev);
126
static void     am79c961_setmulticastlist (struct device *dev);
127
 
128
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.