mii.h Source File
Back to the index.
Go to the documentation of this file. 3 #ifndef _DEV_MII_MII_H_ 4 #define _DEV_MII_MII_H_ 48 #define MII_COMMAND_START 0x01 49 #define MII_COMMAND_READ 0x02 50 #define MII_COMMAND_WRITE 0x01 51 #define MII_COMMAND_ACK 0x02 54 #define BMCR_RESET 0x8000 55 #define BMCR_LOOP 0x4000 56 #define BMCR_SPEED0 0x2000 57 #define BMCR_AUTOEN 0x1000 58 #define BMCR_PDOWN 0x0800 59 #define BMCR_ISO 0x0400 60 #define BMCR_STARTNEG 0x0200 61 #define BMCR_FDX 0x0100 62 #define BMCR_CTEST 0x0080 63 #define BMCR_SPEED1 0x0040 65 #define BMCR_S10 0x0000 66 #define BMCR_S100 BMCR_SPEED0 67 #define BMCR_S1000 BMCR_SPEED1 69 #define BMCR_SPEED(x) ((x) & (BMCR_SPEED0|BMCR_SPEED1)) 72 #define BMSR_100T4 0x8000 73 #define BMSR_100TXFDX 0x4000 74 #define BMSR_100TXHDX 0x2000 75 #define BMSR_10TFDX 0x1000 76 #define BMSR_10THDX 0x0800 77 #define BMSR_100T2FDX 0x0400 78 #define BMSR_100T2HDX 0x0200 79 #define BMSR_EXTSTAT 0x0100 80 #define BMSR_MFPS 0x0040 81 #define BMSR_ACOMP 0x0020 82 #define BMSR_RFAULT 0x0010 83 #define BMSR_ANEG 0x0008 84 #define BMSR_LINK 0x0004 85 #define BMSR_JABBER 0x0002 86 #define BMSR_EXTCAP 0x0001 94 #define BMSR_MEDIAMASK (BMSR_100T4|BMSR_100TXFDX|BMSR_100TXHDX| \ 95 BMSR_10TFDX|BMSR_10THDX|BMSR_100T2FDX|BMSR_100T2HDX) 101 #define BMSR_MEDIA_TO_ANAR(x) (((x) & BMSR_MEDIAMASK) >> 6) 103 #define MII_PHYIDR1 0x02 105 #define MII_PHYIDR2 0x03 106 #define IDR2_OUILSB 0xfc00 107 #define IDR2_MODEL 0x03f0 108 #define IDR2_REV 0x000f 110 #define MII_ANAR 0x04 112 #define ANAR_NP 0x8000 113 #define ANAR_ACK 0x4000 114 #define ANAR_RF 0x2000 115 #define ANAR_FC 0x0400 116 #define ANAR_T4 0x0200 117 #define ANAR_TX_FD 0x0100 118 #define ANAR_TX 0x0080 119 #define ANAR_10_FD 0x0040 120 #define ANAR_10 0x0020 121 #define ANAR_CSMA 0x0001 123 #define ANAR_X_FD 0x0020 124 #define ANAR_X_HD 0x0040 125 #define ANAR_X_PAUSE_NONE (0 << 10) 126 #define ANAR_X_PAUSE_SYM (1 << 10) 127 #define ANAR_X_PAUSE_ASYM (2 << 10) 128 #define ANAR_X_PAUSE_TOWARDS (3 << 10) 130 #define MII_ANLPAR 0x05 132 #define ANLPAR_NP 0x8000 133 #define ANLPAR_ACK 0x4000 134 #define ANLPAR_RF 0x2000 135 #define ANLPAR_FC 0x0400 136 #define ANLPAR_T4 0x0200 137 #define ANLPAR_TX_FD 0x0100 138 #define ANLPAR_TX 0x0080 139 #define ANLPAR_10_FD 0x0040 140 #define ANLPAR_10 0x0020 141 #define ANLPAR_CSMA 0x0001 143 #define ANLPAR_X_FD 0x0020 144 #define ANLPAR_X_HD 0x0040 145 #define ANLPAR_X_PAUSE_MASK (3 << 10) 146 #define ANLPAR_X_PAUSE_NONE (0 << 10) 147 #define ANLPAR_X_PAUSE_SYM (1 << 10) 148 #define ANLPAR_X_PAUSE_ASYM (2 << 10) 149 #define ANLPAR_X_PAUSE_TOWARDS (3 << 10) 151 #define MII_ANER 0x06 153 #define ANER_MLF 0x0010 154 #define ANER_LPNP 0x0008 155 #define ANER_NP 0x0004 156 #define ANER_PAGE_RX 0x0002 157 #define ANER_LPAN 0x0001 159 #define MII_ANNP 0x07 162 #define MII_ANLPRNP 0x08 166 #define MII_100T2CR 0x09 167 #define GTCR_TEST_MASK 0xe000 168 #define GTCR_MAN_MS 0x1000 169 #define GTCR_ADV_MS 0x0800 170 #define GTCR_PORT_TYPE 0x0400 171 #define GTCR_ADV_1000TFDX 0x0200 172 #define GTCR_ADV_1000THDX 0x0100 175 #define MII_100T2SR 0x0a 176 #define GTSR_MAN_MS_FLT 0x8000 177 #define GTSR_MS_RES 0x4000 178 #define GTSR_LRS 0x2000 179 #define GTSR_RRS 0x1000 180 #define GTSR_LP_1000TFDX 0x0800 181 #define GTSR_LP_1000THDX 0x0400 182 #define GTSR_LP_ASM_DIR 0x0200 183 #define GTSR_IDLE_ERR 0x00ff 185 #define MII_EXTSR 0x0f 186 #define EXTSR_1000XFDX 0x8000 187 #define EXTSR_1000XHDX 0x4000 188 #define EXTSR_1000TFDX 0x2000 189 #define EXTSR_1000THDX 0x1000 191 #define EXTSR_MEDIAMASK (EXTSR_1000XFDX|EXTSR_1000XHDX| \ 192 EXTSR_1000TFDX|EXTSR_1000THDX)
Generated on Sun Sep 30 2018 16:05:18 for GXemul by
1.8.13