Deleted Added
full compact
if_gemreg.h (174987) if_gemreg.h (177560)
1/*-
2 * Copyright (C) 2001 Eduardo Horvath.
3 * All rights reserved.
4 *
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 10 unchanged lines hidden (view full) ---

19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 *
1/*-
2 * Copyright (C) 2001 Eduardo Horvath.
3 * All rights reserved.
4 *
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 10 unchanged lines hidden (view full) ---

19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 *
27 * from: NetBSD: gemreg.h,v 1.8 2005/12/11 12:21:26 christos Exp
27 * from: NetBSD: gemreg.h,v 1.9 2006/11/24 13:01:07 martin Exp
28 *
28 *
29 * $FreeBSD: head/sys/dev/gem/if_gemreg.h 174987 2007-12-30 01:32:03Z marius $
29 * $FreeBSD: head/sys/dev/gem/if_gemreg.h 177560 2008-03-24 17:23:53Z marius $
30 */
31
32#ifndef _IF_GEMREG_H
33#define _IF_GEMREG_H
34
35/* Register definitions for Sun GEM gigabit ethernet */
36
30 */
31
32#ifndef _IF_GEMREG_H
33#define _IF_GEMREG_H
34
35/* Register definitions for Sun GEM gigabit ethernet */
36
37/*
38 * First bank: this registers live at the start of the PCI
39 * mapping, and at the start of the second bank of the SBus
40 * version.
41 */
37#define GEM_SEB_STATE 0x0000 /* SEB state reg, R/O */
38#define GEM_CONFIG 0x0004 /* config reg */
39#define GEM_STATUS 0x000c /* status reg */
40/* Note: Reading the status reg clears bits 0-6. */
41#define GEM_INTMASK 0x0010
42#define GEM_INTACK 0x0014 /* Interrupt acknowledge, W/O */
43#define GEM_STATUS_ALIAS 0x001c
42#define GEM_SEB_STATE 0x0000 /* SEB state reg, R/O */
43#define GEM_CONFIG 0x0004 /* config reg */
44#define GEM_STATUS 0x000c /* status reg */
45/* Note: Reading the status reg clears bits 0-6. */
46#define GEM_INTMASK 0x0010
47#define GEM_INTACK 0x0014 /* Interrupt acknowledge, W/O */
48#define GEM_STATUS_ALIAS 0x001c
49
50/*
51 * Second bank: this registers live at offset 0x1000 of the PCI
52 * mapping, and at the start of the first bank of the SBus
53 * version.
54 */
55#define GEM_PCI_BANK2_OFFSET 0x1000
56#define GEM_PCI_BANK2_SIZE 0x14
44/* This is the same as the GEM_STATUS reg but reading it does not clear bits. */
57/* This is the same as the GEM_STATUS reg but reading it does not clear bits. */
45#define GEM_ERROR_STATUS 0x1000 /* PCI error status R/C */
46#define GEM_ERROR_MASK 0x1004
47#define GEM_BIF_CONFIG 0x1008 /* BIF config reg */
48#define GEM_BIF_DIAG 0x100c
49#define GEM_RESET 0x1010 /* Software reset register */
58#define GEM_ERROR_STATUS 0x0000 /* PCI error status R/C */
59#define GEM_ERROR_MASK 0x0004
60#define GEM_SBUS_CONFIG 0x0004
61#define GEM_BIF_CONFIG 0x0008 /* BIF config reg */
62#define GEM_BIF_DIAG 0x000c
63#define GEM_RESET 0x0010 /* Software reset register */
50
51
52/* Bits in GEM_SEB register */
53#define GEM_SEB_ARB 0x000000002 /* Arbitration status */
54#define GEM_SEB_RXWON 0x000000004
55
64
65
66/* Bits in GEM_SEB register */
67#define GEM_SEB_ARB 0x000000002 /* Arbitration status */
68#define GEM_SEB_RXWON 0x000000004
69
70/* Bits in GEM_SBUS_CONFIG register */
71#define GEM_SBUS_CFG_BMODE64 0x00000008
72#define GEM_SBUS_CFG_PARITY 0x00000200
56
57/* Bits in GEM_CONFIG register */
58#define GEM_CONFIG_BURST_64 0x000000000 /* maximum burst size 64KB */
59#define GEM_CONFIG_BURST_INF 0x000000001 /* infinite for entire packet */
60#define GEM_CONFIG_TXDMA_LIMIT 0x00000003e
61#define GEM_CONFIG_RXDMA_LIMIT 0x0000007c0
62/* GEM_CONFIG_RONPAULBIT and GEM_CONFIG_BUG2FIX are Apple only. */
63#define GEM_CONFIG_RONPAULBIT 0x000000800 /* after infinite burst use */

--- 50 unchanged lines hidden (view full) ---

114
115
116/* GEM_RESET register bits -- TX and RX self clear when complete. */
117#define GEM_RESET_TX 0x000000001 /* Reset TX half */
118#define GEM_RESET_RX 0x000000002 /* Reset RX half */
119#define GEM_RESET_RSTOUT 0x000000004 /* Force PCI RSTOUT# */
120
121
73
74/* Bits in GEM_CONFIG register */
75#define GEM_CONFIG_BURST_64 0x000000000 /* maximum burst size 64KB */
76#define GEM_CONFIG_BURST_INF 0x000000001 /* infinite for entire packet */
77#define GEM_CONFIG_TXDMA_LIMIT 0x00000003e
78#define GEM_CONFIG_RXDMA_LIMIT 0x0000007c0
79/* GEM_CONFIG_RONPAULBIT and GEM_CONFIG_BUG2FIX are Apple only. */
80#define GEM_CONFIG_RONPAULBIT 0x000000800 /* after infinite burst use */

--- 50 unchanged lines hidden (view full) ---

131
132
133/* GEM_RESET register bits -- TX and RX self clear when complete. */
134#define GEM_RESET_TX 0x000000001 /* Reset TX half */
135#define GEM_RESET_RX 0x000000002 /* Reset RX half */
136#define GEM_RESET_RSTOUT 0x000000004 /* Force PCI RSTOUT# */
137
138
139/* The rest of the registers live in the first bank again. */
122/* GEM TX DMA registers */
123#define GEM_TX_KICK 0x2000 /* Write last valid desc + 1 */
124#define GEM_TX_CONFIG 0x2004
125#define GEM_TX_RING_PTR_LO 0x2008
126#define GEM_TX_RING_PTR_HI 0x200c
127
128#define GEM_TX_FIFO_WR_PTR 0x2014 /* FIFO write pointer */
129#define GEM_TX_FIFO_SDWR_PTR 0x2018 /* FIFO shadow write pointer */

--- 492 unchanged lines hidden ---
140/* GEM TX DMA registers */
141#define GEM_TX_KICK 0x2000 /* Write last valid desc + 1 */
142#define GEM_TX_CONFIG 0x2004
143#define GEM_TX_RING_PTR_LO 0x2008
144#define GEM_TX_RING_PTR_HI 0x200c
145
146#define GEM_TX_FIFO_WR_PTR 0x2014 /* FIFO write pointer */
147#define GEM_TX_FIFO_SDWR_PTR 0x2018 /* FIFO shadow write pointer */

--- 492 unchanged lines hidden ---