|
@@ -12,6 +12,9 @@
|
12
|
12
|
|
13
|
13
|
FILE_LICENCE ( GPL2_ONLY );
|
14
|
14
|
|
|
15
|
+#ifndef _MII_H_
|
|
16
|
+#define _MII_H_
|
|
17
|
+
|
15
|
18
|
/* Generic MII registers. */
|
16
|
19
|
|
17
|
20
|
#define MII_BMCR 0x00 /* Basic mode control register */
|
|
@@ -105,3 +108,21 @@ FILE_LICENCE ( GPL2_ONLY );
|
105
|
108
|
#define NWAYTEST_LOOPBACK 0x0100 /* Enable loopback for N-way */
|
106
|
109
|
#define NWAYTEST_RESV2 0xfe00 /* Unused... */
|
107
|
110
|
|
|
111
|
+#include <gpxe/netdevice.h>
|
|
112
|
+
|
|
113
|
+struct mii_if_info {
|
|
114
|
+ int phy_id;
|
|
115
|
+ int advertising;
|
|
116
|
+ int phy_id_mask;
|
|
117
|
+ int reg_num_mask;
|
|
118
|
+
|
|
119
|
+ unsigned int full_duplex : 1; /* is full duplex? */
|
|
120
|
+ unsigned int force_media : 1; /* is autoneg. disabled? */
|
|
121
|
+ unsigned int supports_gmii : 1; /* are GMII registers supported? */
|
|
122
|
+
|
|
123
|
+ struct net_device *dev;
|
|
124
|
+ int (*mdio_read) (struct net_device *dev, int phy_id, int location);
|
|
125
|
+ void (*mdio_write) (struct net_device *dev, int phy_id, int location, int val);
|
|
126
|
+};
|
|
127
|
+
|
|
128
|
+#endif
|