seeq8005reg.h revision 1.1 1 /* $NetBSD: seeq8005reg.h,v 1.1 2000/09/18 20:51:15 bjh21 Exp $ */
2
3 /*
4 * Copyright (c) 1995 Mark Brinicombe
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. All advertising materials mentioning features or use of this software
16 * must display the following acknowledgement:
17 * This product includes software developed by Mark Brinicombe.
18 * 4. The name of the company nor the name of the author may be used to
19 * endorse or promote products derived from this software without specific
20 * prior written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
23 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
24 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
25 * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
26 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
27 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
28 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 */
34 /*
35 * SEEQ 8005 registers
36 *
37 * Note that A0 is only used to distinguish halves of 16-bit registers in
38 * 8-bit mode.
39 */
40
41 #define EA_8005_COMMAND 0x0
42 #define EA_8005_STATUS 0x0
43 #define EA_8005_CONFIG1 0x2
44 #define EA_8005_CONFIG2 0x4
45 #define EA_8005_RX_END 0x6
46 #define EA_8005_BUFWIN 0x8
47 #define EA_8005_RX_PTR 0xa
48 #define EA_8005_TX_PTR 0xc
49 #define EA_8005_DMA_ADDR 0xe
50
51 #define EA_CMD_DMA_INTEN (1 << 0)
52 #define EA_CMD_RX_INTEN (1 << 1)
53 #define EA_CMD_TX_INTEN (1 << 2)
54 #define EA_CMD_BW_INTEN (1 << 3)
55 #define EA_CMD_DMA_INTACK (1 << 4)
56 #define EA_CMD_RX_INTACK (1 << 5)
57 #define EA_CMD_TX_INTACK (1 << 6)
58 #define EA_CMD_BW_INTACK (1 << 7)
59 #define EA_CMD_DMA_ON (1 << 8)
60 #define EA_CMD_RX_ON (1 << 9)
61 #define EA_CMD_TX_ON (1 << 10)
62 #define EA_CMD_DMA_OFF (1 << 11)
63 #define EA_CMD_RX_OFF (1 << 12)
64 #define EA_CMD_TX_OFF (1 << 13)
65 #define EA_CMD_FIFO_READ (1 << 14)
66 #define EA_CMD_FIFO_WRITE (1 << 15)
67
68 #define EA_STATUS_DMA_INT (1 << 4)
69 #define EA_STATUS_RX_INT (1 << 5)
70 #define EA_STATUS_TX_INT (1 << 6)
71 #define EA_STATUS_RX_ON (1 << 9)
72 #define EA_STATUS_TX_ON (1 << 10)
73 #define EA_STATUS_FIFO_FULL (1 << 13)
74 #define EA_STATUS_FIFO_EMPTY (1 << 14)
75 #define EA_STATUS_FIFO_DIR (1 << 15)
76 #define EA_STATUS_FIFO_READ (1 << 15)
77
78 #define EA_CFG1_DMA_BURST_CONT 0x00
79 #define EA_CFG1_DMA_BURST_800 0x10
80 #define EA_CFG1_DMA_BURST_1600 0x20
81 #define EA_CFG1_DMA_BURST_3200 0x30
82 #define EA_CFG1_DMA_BSIZE_1 0x00
83 #define EA_CFG1_DMA_BSIZE_4 0x40
84 #define EA_CFG1_DMA_BSIZE_8 0x80
85 #define EA_CFG1_DMA_BSIZE_16 0xc0
86
87 #define EA_CFG1_STATION_ADDR0 (1 << 8)
88 #define EA_CFG1_STATION_ADDR1 (1 << 9)
89 #define EA_CFG1_STATION_ADDR2 (1 << 10)
90 #define EA_CFG1_STATION_ADDR3 (1 << 11)
91 #define EA_CFG1_STATION_ADDR4 (1 << 12)
92 #define EA_CFG1_STATION_ADDR5 (1 << 13)
93 #define EA_CFG1_SPECIFIC ((0 << 15) | (0 << 14))
94 #define EA_CFG1_BROADCAST ((0 << 15) | (1 << 14))
95 #define EA_CFG1_MULTICAST ((1 << 15) | (0 << 14))
96 #define EA_CFG1_PROMISCUOUS ((1 << 15) | (1 << 14))
97
98 #define EA_CFG2_BYTESWAP (1 << 0)
99 #define EA_CFG2_CRC_ERR_ENABLE (1 << 3)
100 #define EA_CFG2_DRIB_ERR_ENABLE (1 << 4)
101 #define EA_CFG2_PASS_SHORT (1 << 5)
102 #define EA_CFG2_SLOT_SELECT (1 << 6)
103 #define EA_CFG2_PREAM_SELECT (1 << 7)
104 #define EA_CFG2_ADDR_LENGTH (1 << 8)
105 #define EA_CFG2_RX_CRC (1 << 9)
106 #define EA_CFG2_NO_TX_CRC (1 << 10)
107 #define EA_CFG2_LOOPBACK (1 << 11)
108 #define EA_CFG2_OUTPUT (1 << 12)
109 #define EA_CFG2_RESET (1 << 15)
110
111 #define EA_BUFCODE_STATION_ADDR0 0x00
112 #define EA_BUFCODE_STATION_ADDR1 0x01
113 #define EA_BUFCODE_STATION_ADDR2 0x02
114 #define EA_BUFCODE_STATION_ADDR3 0x03
115 #define EA_BUFCODE_STATION_ADDR4 0x04
116 #define EA_BUFCODE_STATION_ADDR5 0x05
117 #define EA_BUFCODE_ADDRESS_PROM 0x06
118 #define EA_BUFCODE_TX_EAP 0x07
119 #define EA_BUFCODE_LOCAL_MEM 0x08
120 #define EA_BUFCODE_INT_VECTOR 0x09
121 /*#define EA_BUFCODE_MULTICAST 0x0f*/
122
123 #define EA_PKTHDR_TX (1 << 7)
124 #define EA_PKTHDR_RX (0 << 7)
125 #define EA_PKTHDR_CHAIN_CONT (1 << 6)
126 #define EA_PKTHDR_DATA_FOLLOWS (1 << 5)
127
128 #define EA_PKTHDR_DONE (1 << 7)
129
130 #define EA_TXHDR_BABBLE (1 << 0)
131 #define EA_TXHDR_COLLISION (1 << 1)
132 #define EA_TXHDR_COLLISION16 (1 << 2)
133
134 #define EA_TXHDR_BABBLE_INT (1 << 0)
135 #define EA_TXHDR_COLLISION_INT (1 << 1)
136 #define EA_TXHDR_COLLISION16_INT (1 << 2)
137 #define EA_TXHDR_XMIT_SUCCESS_INT (1 << 3)
138 #define EA_TXHDR_ERROR_MASK (0x07)
139
140 #define EA_RXHDR_OVERSIZE (1 << 0)
141 #define EA_RXHDR_CRC_ERROR (1 << 1)
142 #define EA_RXHDR_DRIBBLE_ERROR (1 << 2)
143 #define EA_RXHDR_SHORT_FRAME (1 << 3)
144
145 #define EA_BUFFER_SIZE 0x10000
146