xref: /openbmc/qemu/hw/net/e1000_common.h (revision 235fe6d0)
1 /*
2  * QEMU e1000(e) emulation - shared definitions
3  *
4  * Copyright (c) 2008 Qumranet
5  *
6  * Based on work done by:
7  * Nir Peleg, Tutis Systems Ltd. for Qumranet Inc.
8  * Copyright (c) 2007 Dan Aloni
9  * Copyright (c) 2004 Antony T Curtis
10  *
11  * This library is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU Lesser General Public
13  * License as published by the Free Software Foundation; either
14  * version 2.1 of the License, or (at your option) any later version.
15  *
16  * This library is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19  * Lesser General Public License for more details.
20  *
21  * You should have received a copy of the GNU Lesser General Public
22  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
23  */
24 
25 #ifndef HW_NET_E1000_COMMON_H
26 #define HW_NET_E1000_COMMON_H
27 
28 #include "e1000_regs.h"
29 
30 #define defreg(x)   x = (E1000_##x >> 2)
31 enum {
32     defreg(CTRL),    defreg(EECD),    defreg(EERD),    defreg(GPRC),
33     defreg(GPTC),    defreg(ICR),     defreg(ICS),     defreg(IMC),
34     defreg(IMS),     defreg(LEDCTL),  defreg(MANC),    defreg(MDIC),
35     defreg(MPC),     defreg(PBA),     defreg(RCTL),    defreg(RDBAH0),
36     defreg(RDBAL0),  defreg(RDH0),    defreg(RDLEN0),  defreg(RDT0),
37     defreg(STATUS),  defreg(SWSM),    defreg(TCTL),    defreg(TDBAH),
38     defreg(TDBAL),   defreg(TDH),     defreg(TDLEN),   defreg(TDT),
39     defreg(TDLEN1),  defreg(TDBAL1),  defreg(TDBAH1),  defreg(TDH1),
40     defreg(TDT1),    defreg(TORH),    defreg(TORL),    defreg(TOTH),
41     defreg(TOTL),    defreg(TPR),     defreg(TPT),     defreg(TXDCTL),
42     defreg(WUFC),    defreg(RA),      defreg(MTA),     defreg(CRCERRS),
43     defreg(VFTA),    defreg(VET),     defreg(RDTR),    defreg(RADV),
44     defreg(TADV),    defreg(ITR),     defreg(SCC),     defreg(ECOL),
45     defreg(MCC),     defreg(LATECOL), defreg(COLC),    defreg(DC),
46     defreg(TNCRS),   defreg(SEQEC),   defreg(CEXTERR), defreg(RLEC),
47     defreg(XONRXC),  defreg(XONTXC),  defreg(XOFFRXC), defreg(XOFFTXC),
48     defreg(FCRUC),   defreg(AIT),     defreg(TDFH),    defreg(TDFT),
49     defreg(TDFHS),   defreg(TDFTS),   defreg(TDFPC),   defreg(WUC),
50     defreg(WUS),     defreg(POEMB),   defreg(PBS),     defreg(RDFH),
51     defreg(RDFT),    defreg(RDFHS),   defreg(RDFTS),   defreg(RDFPC),
52     defreg(PBM),     defreg(IPAV),    defreg(IP4AT),   defreg(IP6AT),
53     defreg(WUPM),    defreg(FFLT),    defreg(FFMT),    defreg(FFVT),
54     defreg(TARC0),   defreg(TARC1),   defreg(IAM),     defreg(EXTCNF_CTRL),
55     defreg(GCR),     defreg(TIMINCA), defreg(EIAC),    defreg(CTRL_EXT),
56     defreg(IVAR),    defreg(MFUTP01), defreg(MFUTP23), defreg(MANC2H),
57     defreg(MFVAL),   defreg(MDEF),    defreg(FACTPS),  defreg(FTFT),
58     defreg(RUC),     defreg(ROC),     defreg(RFC),     defreg(RJC),
59     defreg(PRC64),   defreg(PRC127),  defreg(PRC255),  defreg(PRC511),
60     defreg(PRC1023), defreg(PRC1522), defreg(PTC64),   defreg(PTC127),
61     defreg(PTC255),  defreg(PTC511),  defreg(PTC1023), defreg(PTC1522),
62     defreg(GORCL),   defreg(GORCH),   defreg(GOTCL),   defreg(GOTCH),
63     defreg(RNBC),    defreg(BPRC),    defreg(MPRC),    defreg(RFCTL),
64     defreg(PSRCTL),  defreg(MPTC),    defreg(BPTC),    defreg(TSCTFC),
65     defreg(IAC),     defreg(MGTPRC),  defreg(MGTPDC),  defreg(MGTPTC),
66     defreg(TSCTC),   defreg(RXCSUM),  defreg(FUNCTAG), defreg(GSCL_1),
67     defreg(GSCL_2),  defreg(GSCL_3),  defreg(GSCL_4),  defreg(GSCN_0),
68     defreg(GSCN_1),  defreg(GSCN_2),  defreg(GSCN_3),  defreg(GCR2),
69     defreg(RAID),    defreg(RSRPD),   defreg(TIDV),    defreg(EITR),
70     defreg(MRQC),    defreg(RETA),    defreg(RSSRK),   defreg(RDBAH1),
71     defreg(RDBAL1),  defreg(RDLEN1),  defreg(RDH1),    defreg(RDT1),
72     defreg(PBACLR),  defreg(FCAL),    defreg(FCAH),    defreg(FCT),
73     defreg(FCRTH),   defreg(FCRTL),   defreg(FCTTV),   defreg(FCRTV),
74     defreg(FLA),     defreg(EEWR),    defreg(FLOP),    defreg(FLOL),
75     defreg(FLSWCTL), defreg(FLSWCNT), defreg(RXDCTL),  defreg(RXDCTL1),
76     defreg(MAVTV0),  defreg(MAVTV1),  defreg(MAVTV2),  defreg(MAVTV3),
77     defreg(TXSTMPL), defreg(TXSTMPH), defreg(SYSTIML), defreg(SYSTIMH),
78     defreg(RXCFGL),  defreg(RXUDP),   defreg(TIMADJL), defreg(TIMADJH),
79     defreg(RXSTMPH), defreg(RXSTMPL), defreg(RXSATRL), defreg(RXSATRH),
80     defreg(FLASHT),  defreg(TIPG),    defreg(RDH),     defreg(RDT),
81     defreg(RDLEN),   defreg(RDBAH),   defreg(RDBAL),
82     defreg(TXDCTL1),
83     defreg(FLSWDATA),
84     defreg(CTRL_DUP),
85     defreg(EXTCNF_SIZE),
86     defreg(EEMNGCTL),
87     defreg(EEMNGDATA),
88     defreg(FLMNGCTL),
89     defreg(FLMNGDATA),
90     defreg(FLMNGCNT),
91     defreg(TSYNCRXCTL),
92     defreg(TSYNCTXCTL),
93 
94     /* Aliases */
95     defreg(RDH0_A),  defreg(RDT0_A),  defreg(RDTR_A),  defreg(RDFH_A),
96     defreg(RDFT_A),  defreg(TDH_A),   defreg(TDT_A),   defreg(TIDV_A),
97     defreg(TDFH_A),  defreg(TDFT_A),  defreg(RA_A),    defreg(RDBAL0_A),
98     defreg(TDBAL_A), defreg(TDLEN_A), defreg(VFTA_A),  defreg(RDLEN0_A),
99     defreg(FCRTL_A), defreg(FCRTH_A)
100 };
101 
102 #endif
103