aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/mv643xx_eth.h
diff options
context:
space:
mode:
authorDale Farnsworth <dale@farnsworth.org>2006-03-03 12:06:20 -0500
committerJeff Garzik <jeff@garzik.org>2006-03-03 12:12:37 -0500
commitebe19a4ed78d4a11a7e01cdeda25f91b7f2fcb5a (patch)
treecbc3ab8819704fbeb97a2a89445f57972d430fd2 /drivers/net/mv643xx_eth.h
parentf78fb4743dc06719084239c29dc178ad38ad2e2f (diff)
[PATCH] mv643xx_eth: Remove BIT0-BIT31 #defines
Now that the BIT0-BIT31 defines are no longer used by mv643xx_eth.c, remove them from mv643xx_eth.h. Signed-off-by: Dale Farnsworth <dale@farnsworth.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/mv643xx_eth.h')
-rw-r--r--drivers/net/mv643xx_eth.h152
1 files changed, 49 insertions, 103 deletions
diff --git a/drivers/net/mv643xx_eth.h b/drivers/net/mv643xx_eth.h
index f8742e1edea2..7754d1974b9e 100644
--- a/drivers/net/mv643xx_eth.h
+++ b/drivers/net/mv643xx_eth.h
@@ -9,43 +9,6 @@
9 9
10#include <linux/mv643xx.h> 10#include <linux/mv643xx.h>
11 11
12#define BIT0 0x00000001
13#define BIT1 0x00000002
14#define BIT2 0x00000004
15#define BIT3 0x00000008
16#define BIT4 0x00000010
17#define BIT5 0x00000020
18#define BIT6 0x00000040
19#define BIT7 0x00000080
20#define BIT8 0x00000100
21#define BIT9 0x00000200
22#define BIT10 0x00000400
23#define BIT11 0x00000800
24#define BIT12 0x00001000
25#define BIT13 0x00002000
26#define BIT14 0x00004000
27#define BIT15 0x00008000
28#define BIT16 0x00010000
29#define BIT17 0x00020000
30#define BIT18 0x00040000
31#define BIT19 0x00080000
32#define BIT20 0x00100000
33#define BIT21 0x00200000
34#define BIT22 0x00400000
35#define BIT23 0x00800000
36#define BIT24 0x01000000
37#define BIT25 0x02000000
38#define BIT26 0x04000000
39#define BIT27 0x08000000
40#define BIT28 0x10000000
41#define BIT29 0x20000000
42#define BIT30 0x40000000
43#define BIT31 0x80000000
44
45/*
46 * The first part is the high level driver of the gigE ethernet ports.
47 */
48
49/* Checksum offload for Tx works for most packets, but 12/* Checksum offload for Tx works for most packets, but
50 * fails if previous packet sent did not use hw csum 13 * fails if previous packet sent did not use hw csum
51 */ 14 */
@@ -148,88 +111,71 @@
148#define ETH_MIB_LATE_COLLISION 0x7c 111#define ETH_MIB_LATE_COLLISION 0x7c
149 112
150/* Port serial status reg (PSR) */ 113/* Port serial status reg (PSR) */
151#define ETH_INTERFACE_GMII_MII 0 114#define ETH_INTERFACE_PCM 0x00000001
152#define ETH_INTERFACE_PCM BIT0 115#define ETH_LINK_IS_UP 0x00000002
153#define ETH_LINK_IS_DOWN 0 116#define ETH_PORT_AT_FULL_DUPLEX 0x00000004
154#define ETH_LINK_IS_UP BIT1 117#define ETH_RX_FLOW_CTRL_ENABLED 0x00000008
155#define ETH_PORT_AT_HALF_DUPLEX 0 118#define ETH_GMII_SPEED_1000 0x00000010
156#define ETH_PORT_AT_FULL_DUPLEX BIT2 119#define ETH_MII_SPEED_100 0x00000020
157#define ETH_RX_FLOW_CTRL_DISABLED 0 120#define ETH_TX_IN_PROGRESS 0x00000080
158#define ETH_RX_FLOW_CTRL_ENBALED BIT3 121#define ETH_BYPASS_ACTIVE 0x00000100
159#define ETH_GMII_SPEED_100_10 0 122#define ETH_PORT_AT_PARTITION_STATE 0x00000200
160#define ETH_GMII_SPEED_1000 BIT4 123#define ETH_PORT_TX_FIFO_EMPTY 0x00000400
161#define ETH_MII_SPEED_10 0
162#define ETH_MII_SPEED_100 BIT5
163#define ETH_NO_TX 0
164#define ETH_TX_IN_PROGRESS BIT7
165#define ETH_BYPASS_NO_ACTIVE 0
166#define ETH_BYPASS_ACTIVE BIT8
167#define ETH_PORT_NOT_AT_PARTITION_STATE 0
168#define ETH_PORT_AT_PARTITION_STATE BIT9
169#define ETH_PORT_TX_FIFO_NOT_EMPTY 0
170#define ETH_PORT_TX_FIFO_EMPTY BIT10
171
172#define ETH_DEFAULT_RX_BPDU_QUEUE_3 (BIT23 | BIT22)
173#define ETH_DEFAULT_RX_BPDU_QUEUE_4 BIT24
174#define ETH_DEFAULT_RX_BPDU_QUEUE_5 (BIT24 | BIT22)
175#define ETH_DEFAULT_RX_BPDU_QUEUE_6 (BIT24 | BIT23)
176#define ETH_DEFAULT_RX_BPDU_QUEUE_7 (BIT24 | BIT23 | BIT22)
177 124
178/* SMI reg */ 125/* SMI reg */
179#define ETH_SMI_BUSY BIT28 /* 0 - Write, 1 - Read */ 126#define ETH_SMI_BUSY 0x10000000 /* 0 - Write, 1 - Read */
180#define ETH_SMI_READ_VALID BIT27 /* 0 - Write, 1 - Read */ 127#define ETH_SMI_READ_VALID 0x08000000 /* 0 - Write, 1 - Read */
181#define ETH_SMI_OPCODE_WRITE 0 /* Completion of Read operation */ 128#define ETH_SMI_OPCODE_WRITE 0 /* Completion of Read */
182#define ETH_SMI_OPCODE_READ BIT26 /* Operation is in progress */ 129#define ETH_SMI_OPCODE_READ 0x04000000 /* Operation is in progress */
130
131/* Interrupt Cause Register Bit Definitions */
183 132
184/* SDMA command status fields macros */ 133/* SDMA command status fields macros */
185 134
186/* Tx & Rx descriptors status */ 135/* Tx & Rx descriptors status */
187#define ETH_ERROR_SUMMARY (BIT0) 136#define ETH_ERROR_SUMMARY 0x00000001
188 137
189/* Tx & Rx descriptors command */ 138/* Tx & Rx descriptors command */
190#define ETH_BUFFER_OWNED_BY_DMA (BIT31) 139#define ETH_BUFFER_OWNED_BY_DMA 0x80000000
191 140
192/* Tx descriptors status */ 141/* Tx descriptors status */
193#define ETH_LC_ERROR (0 ) 142#define ETH_LC_ERROR 0
194#define ETH_UR_ERROR (BIT1 ) 143#define ETH_UR_ERROR 0x00000002
195#define ETH_RL_ERROR (BIT2 ) 144#define ETH_RL_ERROR 0x00000004
196#define ETH_LLC_SNAP_FORMAT (BIT9 ) 145#define ETH_LLC_SNAP_FORMAT 0x00000200
197 146
198/* Rx descriptors status */ 147/* Rx descriptors status */
199#define ETH_CRC_ERROR (0 ) 148#define ETH_OVERRUN_ERROR 0x00000002
200#define ETH_OVERRUN_ERROR (BIT1 ) 149#define ETH_MAX_FRAME_LENGTH_ERROR 0x00000004
201#define ETH_MAX_FRAME_LENGTH_ERROR (BIT2 ) 150#define ETH_RESOURCE_ERROR 0x00000006
202#define ETH_RESOURCE_ERROR ((BIT2 | BIT1)) 151#define ETH_VLAN_TAGGED 0x00080000
203#define ETH_VLAN_TAGGED (BIT19) 152#define ETH_BPDU_FRAME 0x00100000
204#define ETH_BPDU_FRAME (BIT20) 153#define ETH_UDP_FRAME_OVER_IP_V_4 0x00200000
205#define ETH_TCP_FRAME_OVER_IP_V_4 (0 ) 154#define ETH_OTHER_FRAME_TYPE 0x00400000
206#define ETH_UDP_FRAME_OVER_IP_V_4 (BIT21) 155#define ETH_LAYER_2_IS_ETH_V_2 0x00800000
207#define ETH_OTHER_FRAME_TYPE (BIT22) 156#define ETH_FRAME_TYPE_IP_V_4 0x01000000
208#define ETH_LAYER_2_IS_ETH_V_2 (BIT23) 157#define ETH_FRAME_HEADER_OK 0x02000000
209#define ETH_FRAME_TYPE_IP_V_4 (BIT24) 158#define ETH_RX_LAST_DESC 0x04000000
210#define ETH_FRAME_HEADER_OK (BIT25) 159#define ETH_RX_FIRST_DESC 0x08000000
211#define ETH_RX_LAST_DESC (BIT26) 160#define ETH_UNKNOWN_DESTINATION_ADDR 0x10000000
212#define ETH_RX_FIRST_DESC (BIT27) 161#define ETH_RX_ENABLE_INTERRUPT 0x20000000
213#define ETH_UNKNOWN_DESTINATION_ADDR (BIT28) 162#define ETH_LAYER_4_CHECKSUM_OK 0x40000000
214#define ETH_RX_ENABLE_INTERRUPT (BIT29)
215#define ETH_LAYER_4_CHECKSUM_OK (BIT30)
216 163
217/* Rx descriptors byte count */ 164/* Rx descriptors byte count */
218#define ETH_FRAME_FRAGMENTED (BIT2) 165#define ETH_FRAME_FRAGMENTED 0x00000004
219 166
220/* Tx descriptors command */ 167/* Tx descriptors command */
221#define ETH_LAYER_4_CHECKSUM_FIRST_DESC (BIT10) 168#define ETH_LAYER_4_CHECKSUM_FIRST_DESC 0x00000400
222#define ETH_FRAME_SET_TO_VLAN (BIT15) 169#define ETH_FRAME_SET_TO_VLAN 0x00008000
223#define ETH_TCP_FRAME (0 ) 170#define ETH_UDP_FRAME 0x00010000
224#define ETH_UDP_FRAME (BIT16) 171#define ETH_GEN_TCP_UDP_CHECKSUM 0x00020000
225#define ETH_GEN_TCP_UDP_CHECKSUM (BIT17) 172#define ETH_GEN_IP_V_4_CHECKSUM 0x00040000
226#define ETH_GEN_IP_V_4_CHECKSUM (BIT18) 173#define ETH_ZERO_PADDING 0x00080000
227#define ETH_ZERO_PADDING (BIT19) 174#define ETH_TX_LAST_DESC 0x00100000
228#define ETH_TX_LAST_DESC (BIT20) 175#define ETH_TX_FIRST_DESC 0x00200000
229#define ETH_TX_FIRST_DESC (BIT21) 176#define ETH_GEN_CRC 0x00400000
230#define ETH_GEN_CRC (BIT22) 177#define ETH_TX_ENABLE_INTERRUPT 0x00800000
231#define ETH_TX_ENABLE_INTERRUPT (BIT23) 178#define ETH_AUTO_MODE 0x40000000
232#define ETH_AUTO_MODE (BIT30)
233 179
234#define ETH_TX_IHL_SHIFT 11 180#define ETH_TX_IHL_SHIFT 11
235 181