switch source package format to 3.0 quilt
[debian/gnuradio] / usrp2 / firmware / lib / eth_mac_regs.h
1 /* -*- c -*- */
2 /*
3  * Copyright 2007 Free Software Foundation, Inc.
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
17  */
18
19 #ifndef INCLUDED_ETH_MAC_REGS_H
20 #define INCLUDED_ETH_MAC_REGS_H
21
22 /*
23  * Simple GEMAC
24  *
25  */
26 typedef struct {
27   volatile int settings;
28   volatile int ucast_hi;
29   volatile int ucast_lo;
30   volatile int mcast_hi;
31   volatile int mcast_lo;
32   volatile int miimoder;
33   volatile int miiaddress;
34   volatile int miitx_data;
35   volatile int miicommand;
36   volatile int miistatus;
37   volatile int miirx_data;
38   volatile int pause_time;
39   volatile int pause_thresh;
40 } eth_mac_regs_t;
41
42 // settings register
43 #define MAC_SET_PAUSE_EN  (1 << 0)   // Makes us respect received pause frames (normally on)
44 #define MAC_SET_PASS_ALL  (1 << 1)   // Enables promiscuous mode, currently broken
45 #define MAC_SET_PASS_PAUSE (1 << 2)  // Sends pause frames through (normally off)
46 #define MAC_SET_PASS_BCAST (1 << 3)  // Sends broadcast frames through (normally on)
47 #define MAC_SET_PASS_MCAST (1 << 4)  // Sends multicast frames that match mcast addr (normally off)
48 #define MAC_SET_PASS_UCAST (1 << 5)  // Sends unicast (normal) frames through if they hit in address filter (normally on)
49 #define MAC_SET_PAUSE_SEND_EN (1 << 6) // Enables sending pause frames
50
51 // miicommand register
52 #define MIIC_SCANSSTAT  (1 << 0)        // Scan status
53 #define MIIC_RSTAT      (1 << 1)        // Read status
54 #define MIIC_WCTRLDATA  (1 << 2)        // Write control data
55
56 // miistatus register
57 #define MIIS_LINKFAIL   (1 << 0)        // The link failed
58 #define MIIS_BUSY       (1 << 1)        // The MII is busy (operation in progress)
59 #define MIIS_NVALID     (1 << 2)        // The data in the status register is invalid
60                                         //   This it is only valid when the scan status is active.
61
62 #endif /* INCLUDED_ETH_MAC_REGS_H */