File indexing completed on 2025-05-11 08:23:57
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051 typedef struct wiseman_addr {
0052 uint32_t wa_low;
0053 uint32_t wa_high;
0054 } __attribute__((__packed__)) wiseman_addr_t;
0055
0056
0057
0058
0059
0060
0061
0062 typedef volatile struct wiseman_rxdesc {
0063 wiseman_addr_t wrx_addr;
0064
0065 uint16_t wrx_len;
0066 uint16_t wrx_cksum;
0067
0068 uint8_t wrx_status;
0069 uint8_t wrx_errors;
0070 uint16_t wrx_special;
0071 } __attribute__((__packed__)) wiseman_rxdesc_t;
0072
0073
0074 #define WRX_ST_DD (1U << 0)
0075 #define WRX_ST_EOP (1U << 1)
0076 #define WRX_ST_IXSM (1U << 2)
0077 #define WRX_ST_VP (1U << 3)
0078 #define WRX_ST_BPDU (1U << 4)
0079 #define WRX_ST_TCPCS (1U << 5)
0080 #define WRX_ST_IPCS (1U << 6)
0081 #define WRX_ST_PIF (1U << 7)
0082
0083
0084 #define WRX_ER_CE (1U << 0)
0085 #define WRX_ER_SE (1U << 1)
0086 #define WRX_ER_SEQ (1U << 2)
0087 #define WRX_ER_ICE (1U << 3)
0088 #define WRX_ER_CXE (1U << 4)
0089 #define WRX_ER_TCPE (1U << 5)
0090 #define WRX_ER_IPE (1U << 6)
0091 #define WRX_ER_RXE (1U << 7)
0092
0093
0094 #define WRX_VLAN_ID(x) ((x) & 0x0fff)
0095 #define WRX_VLAN_CFI (1U << 12)
0096 #define WRX_VLAN_PRI(x) (((x) >> 13) & 7)
0097
0098
0099
0100
0101
0102
0103
0104 typedef struct wiseman_tx_fields {
0105 uint8_t wtxu_status;
0106 uint8_t wtxu_options;
0107 uint16_t wtxu_vlan;
0108 } __attribute__((__packed__)) wiseman_txfields_t;
0109 typedef volatile struct wiseman_txdesc {
0110 wiseman_addr_t wtx_addr;
0111 uint32_t wtx_cmdlen;
0112 wiseman_txfields_t wtx_fields;
0113 } __attribute__((__packed__)) wiseman_txdesc_t;
0114
0115
0116 #define WTX_CMD_EOP (1U << 24)
0117 #define WTX_CMD_IFCS (1U << 25)
0118 #define WTX_CMD_RS (1U << 27)
0119 #define WTX_CMD_RPS (1U << 28)
0120 #define WTX_CMD_DEXT (1U << 29)
0121 #define WTX_CMD_VLE (1U << 30)
0122 #define WTX_CMD_IDE (1U << 31)
0123
0124
0125 #define WTX_DTYP_C (0U << 20)
0126 #define WTX_DTYP_D (1U << 20)
0127
0128
0129 #define WTX_ST_DD (1U << 0)
0130 #define WTX_ST_EC (1U << 1)
0131 #define WTX_ST_LC (1U << 2)
0132 #define WTX_ST_TU (1U << 3)
0133
0134
0135 #define WTX_IXSM (1U << 0)
0136 #define WTX_TXSM (1U << 1)
0137
0138
0139 #define WTX_MAX_LEN 4096
0140
0141
0142
0143
0144 struct livengood_tcpip_ctxdesc {
0145 uint32_t tcpip_ipcs;
0146 uint32_t tcpip_tucs;
0147 uint32_t tcpip_cmdlen;
0148 uint32_t tcpip_seg;
0149 };
0150
0151
0152 #define WTX_TCPIP_CMD_TCP (1U << 24)
0153 #define WTX_TCPIP_CMD_IP (1U << 25)
0154 #define WTX_TCPIP_CMD_TSE (1U << 26)
0155
0156 #define WTX_TCPIP_IPCSS(x) ((x) << 0)
0157 #define WTX_TCPIP_IPCSO(x) ((x) << 8)
0158 #define WTX_TCPIP_IPCSE(x) ((x) << 16)
0159
0160 #define WTX_TCPIP_TUCSS(x) ((x) << 0)
0161 #define WTX_TCPIP_TUCSO(x) ((x) << 8)
0162 #define WTX_TCPIP_TUCSE(x) ((x) << 16)
0163
0164 #define WTX_TCPIP_SEG_STATUS(x) ((x) << 0)
0165 #define WTX_TCPIP_SEG_HDRLEN(x) ((x) << 8)
0166 #define WTX_TCPIP_SEG_MSS(x) ((x) << 16)
0167
0168
0169
0170
0171 #define WM_PCI_MMBA PCI_MAPREG_START
0172
0173 #define WM_ICH8_FLASH 0x0014
0174
0175
0176
0177
0178 #define WMREG_CTRL 0x0000
0179 #define CTRL_FD (1U << 0)
0180 #define CTRL_BEM (1U << 1)
0181 #define CTRL_PRIOR (1U << 2)
0182 #define CTRL_LRST (1U << 3)
0183 #define CTRL_ASDE (1U << 5)
0184 #define CTRL_SLU (1U << 6)
0185 #define CTRL_ILOS (1U << 7)
0186 #define CTRL_SPEED(x) ((x) << 8)
0187 #define CTRL_SPEED_10 CTRL_SPEED(0)
0188 #define CTRL_SPEED_100 CTRL_SPEED(1)
0189 #define CTRL_SPEED_1000 CTRL_SPEED(2)
0190 #define CTRL_SPEED_MASK CTRL_SPEED(3)
0191 #define CTRL_FRCSPD (1U << 11)
0192 #define CTRL_FRCFDX (1U << 12)
0193 #define CTRL_D_UD_EN (1U << 13)
0194 #define CTRL_D_UD_POL (1U << 14)
0195 #define CTRL_F_PHY_R (1U << 15)
0196 #define CTRL_EXT_LINK_EN (1U << 16)
0197 #define CTRL_SWDPINS_SHIFT 18
0198 #define CTRL_SWDPINS_MASK 0x0f
0199 #define CTRL_SWDPIN(x) (1U << (CTRL_SWDPINS_SHIFT + (x)))
0200 #define CTRL_SWDPIO_SHIFT 22
0201 #define CTRL_SWDPIO_MASK 0x0f
0202 #define CTRL_SWDPIO(x) (1U << (CTRL_SWDPIO_SHIFT + (x)))
0203 #define CTRL_RST (1U << 26)
0204 #define CTRL_RFCE (1U << 27)
0205 #define CTRL_TFCE (1U << 28)
0206 #define CTRL_VME (1U << 30)
0207 #define CTRL_PHY_RESET (1U << 31)
0208
0209 #define WMREG_CTRL_SHADOW 0x0004
0210
0211 #define WMREG_STATUS 0x0008
0212 #define STATUS_FD (1U << 0)
0213 #define STATUS_LU (1U << 1)
0214 #define STATUS_TCKOK (1U << 2)
0215 #define STATUS_RBCOK (1U << 3)
0216 #define STATUS_FUNCID_SHIFT 2
0217 #define STATUS_FUNCID_MASK 3
0218 #define STATUS_TXOFF (1U << 4)
0219 #define STATUS_TBIMODE (1U << 5)
0220 #define STATUS_SPEED(x) ((x) << 6)
0221 #define STATUS_SPEED_10 STATUS_SPEED(0)
0222 #define STATUS_SPEED_100 STATUS_SPEED(1)
0223 #define STATUS_SPEED_1000 STATUS_SPEED(2)
0224 #define STATUS_ASDV(x) ((x) << 8)
0225 #define STATUS_MTXCKOK (1U << 10)
0226 #define STATUS_PCI66 (1U << 11)
0227 #define STATUS_BUS64 (1U << 12)
0228 #define STATUS_PCIX_MODE (1U << 13)
0229 #define STATUS_PCIXSPD(x) ((x) << 14)
0230 #define STATUS_PCIXSPD_50_66 STATUS_PCIXSPD(0)
0231 #define STATUS_PCIXSPD_66_100 STATUS_PCIXSPD(1)
0232 #define STATUS_PCIXSPD_100_133 STATUS_PCIXSPD(2)
0233 #define STATUS_PCIXSPD_MASK STATUS_PCIXSPD(3)
0234
0235 #define WMREG_EECD 0x0010
0236 #define EECD_SK (1U << 0)
0237 #define EECD_CS (1U << 1)
0238 #define EECD_DI (1U << 2)
0239 #define EECD_DO (1U << 3)
0240 #define EECD_FWE(x) ((x) << 4)
0241 #define EECD_FWE_DISABLED EECD_FWE(1)
0242 #define EECD_FWE_ENABLED EECD_FWE(2)
0243 #define EECD_EE_REQ (1U << 6)
0244 #define EECD_EE_GNT (1U << 7)
0245 #define EECD_EE_PRES (1U << 8)
0246 #define EECD_EE_SIZE (1U << 9)
0247
0248 #define EECD_EE_AUTORD (1U << 9)
0249 #define EECD_EE_ABITS (1U << 10)
0250
0251 #define EECD_EE_TYPE (1U << 13)
0252
0253 #define EECD_SEC1VAL (1U << 22)
0254
0255 #define UWIRE_OPC_ERASE 0x04
0256 #define UWIRE_OPC_WRITE 0x05
0257 #define UWIRE_OPC_READ 0x06
0258
0259 #define SPI_OPC_WRITE 0x02
0260 #define SPI_OPC_READ 0x03
0261 #define SPI_OPC_A8 0x08
0262 #define SPI_OPC_WREN 0x06
0263 #define SPI_OPC_WRDI 0x04
0264 #define SPI_OPC_RDSR 0x05
0265 #define SPI_OPC_WRSR 0x01
0266 #define SPI_MAX_RETRIES 5000
0267
0268 #define SPI_SR_RDY 0x01
0269 #define SPI_SR_WEN 0x02
0270 #define SPI_SR_BP0 0x04
0271 #define SPI_SR_BP1 0x08
0272 #define SPI_SR_WPEN 0x80
0273
0274 #define EEPROM_OFF_MACADDR 0x00
0275 #define EEPROM_OFF_CFG1 0x0a
0276 #define EEPROM_OFF_CFG2 0x0f
0277 #define EEPROM_OFF_SWDPIN 0x20
0278
0279 #define EEPROM_CFG1_LVDID (1U << 0)
0280 #define EEPROM_CFG1_LSSID (1U << 1)
0281 #define EEPROM_CFG1_PME_CLOCK (1U << 2)
0282 #define EEPROM_CFG1_PM (1U << 3)
0283 #define EEPROM_CFG1_ILOS (1U << 4)
0284 #define EEPROM_CFG1_SWDPIO_SHIFT 5
0285 #define EEPROM_CFG1_SWDPIO_MASK (0xf << EEPROM_CFG1_SWDPIO_SHIFT)
0286 #define EEPROM_CFG1_IPS1 (1U << 8)
0287 #define EEPROM_CFG1_LRST (1U << 9)
0288 #define EEPROM_CFG1_FD (1U << 10)
0289 #define EEPROM_CFG1_FRCSPD (1U << 11)
0290 #define EEPROM_CFG1_IPS0 (1U << 12)
0291 #define EEPROM_CFG1_64_32_BAR (1U << 13)
0292
0293 #define EEPROM_CFG2_CSR_RD_SPLIT (1U << 1)
0294 #define EEPROM_CFG2_APM_EN (1U << 2)
0295 #define EEPROM_CFG2_64_BIT (1U << 3)
0296 #define EEPROM_CFG2_MAX_READ (1U << 4)
0297 #define EEPROM_CFG2_DMCR_MAP (1U << 5)
0298 #define EEPROM_CFG2_133_CAP (1U << 6)
0299 #define EEPROM_CFG2_MSI_DIS (1U << 7)
0300 #define EEPROM_CFG2_FLASH_DIS (1U << 8)
0301 #define EEPROM_CFG2_FLASH_SIZE(x) (((x) & 3) >> 9)
0302 #define EEPROM_CFG2_ANE (1U << 11)
0303 #define EEPROM_CFG2_PAUSE(x) (((x) & 3) >> 12)
0304 #define EEPROM_CFG2_ASDE (1U << 14)
0305 #define EEPROM_CFG2_APM_PME (1U << 15)
0306 #define EEPROM_CFG2_SWDPIO_SHIFT 4
0307 #define EEPROM_CFG2_SWDPIO_MASK (0xf << EEPROM_CFG2_SWDPIO_SHIFT)
0308
0309 #define EEPROM_SWDPIN_MASK 0xdf
0310 #define EEPROM_SWDPIN_SWDPIN_SHIFT 0
0311 #define EEPROM_SWDPIN_SWDPIO_SHIFT 8
0312
0313 #define WMREG_EERD 0x0014
0314 #define EERD_DONE 0x02
0315 #define EERD_START 0x01
0316 #define EERD_ADDR_SHIFT 2
0317 #define EERD_DATA_SHIFT 16
0318
0319 #define WMREG_CTRL_EXT 0x0018
0320 #define CTRL_EXT_GPI_EN(x) (1U << (x))
0321 #define CTRL_EXT_SWDPINS_SHIFT 4
0322 #define CTRL_EXT_SWDPINS_MASK 0x0d
0323 #define CTRL_EXT_SWDPIN(x) (1U << (CTRL_EXT_SWDPINS_SHIFT + (x) - 4))
0324 #define CTRL_EXT_SWDPIO_SHIFT 8
0325 #define CTRL_EXT_SWDPIO_MASK 0x0d
0326 #define CTRL_EXT_SWDPIO(x) (1U << (CTRL_EXT_SWDPIO_SHIFT + (x) - 4))
0327 #define CTRL_EXT_ASDCHK (1U << 12)
0328 #define CTRL_EXT_EE_RST (1U << 13)
0329 #define CTRL_EXT_IPS (1U << 14)
0330 #define CTRL_EXT_SPD_BYPS (1U << 15)
0331 #define CTRL_EXT_IPS1 (1U << 16)
0332 #define CTRL_EXT_RO_DIS (1U << 17)
0333 #define CTRL_EXT_LINK_MODE_MASK 0x00C00000
0334 #define CTRL_EXT_LINK_MODE_GMII 0x00000000
0335 #define CTRL_EXT_LINK_MODE_TBI 0x00C00000
0336 #define CTRL_EXT_LINK_MODE_KMRN 0x00000000
0337 #define CTRL_EXT_LINK_MODE_SERDES 0x00C00000
0338
0339
0340 #define WMREG_MDIC 0x0020
0341 #define MDIC_DATA(x) ((x) & 0xffff)
0342 #define MDIC_REGADD(x) ((x) << 16)
0343 #define MDIC_PHYADD(x) ((x) << 21)
0344 #define MDIC_OP_WRITE (1U << 26)
0345 #define MDIC_OP_READ (2U << 26)
0346 #define MDIC_READY (1U << 28)
0347 #define MDIC_I (1U << 29)
0348 #define MDIC_E (1U << 30)
0349
0350 #define WMREG_FCAL 0x0028
0351 #define FCAL_CONST 0x00c28001
0352
0353 #define WMREG_FCAH 0x002c
0354 #define FCAH_CONST 0x00000100
0355
0356 #define WMREG_FCT 0x0030
0357
0358 #define WMREG_VET 0x0038
0359
0360 #define WMREG_RAL_BASE 0x0040
0361 #define WMREG_CORDOVA_RAL_BASE 0x5400
0362 #define WMREG_RAL_LO(b, x) ((b) + ((x) << 3))
0363 #define WMREG_RAL_HI(b, x) (WMREG_RAL_LO(b, x) + 4)
0364
0365
0366
0367
0368
0369 #define RAL_AS(x) ((x) << 16)
0370 #define RAL_AS_DEST RAL_AS(0)
0371 #define RAL_AS_SOURCE RAL_AS(1)
0372 #define RAL_RDR1 (1U << 30)
0373 #define RAL_AV (1U << 31)
0374
0375 #define WM_RAL_TABSIZE 16
0376 #define WM_ICH8_RAL_TABSIZE 7
0377
0378 #define WMREG_ICR 0x00c0
0379 #define ICR_TXDW (1U << 0)
0380 #define ICR_TXQE (1U << 1)
0381 #define ICR_LSC (1U << 2)
0382 #define ICR_RXSEQ (1U << 3)
0383 #define ICR_RXDMT0 (1U << 4)
0384 #define ICR_RXO (1U << 6)
0385 #define ICR_RXT0 (1U << 7)
0386 #define ICR_MDAC (1U << 9)
0387 #define ICR_RXCFG (1U << 10)
0388 #define ICR_GPI(x) (1U << (x))
0389 #define ICR_INT (1U << 31)
0390
0391 #define WMREG_ITR 0x00c4
0392 #define ITR_IVAL_MASK 0xffff
0393 #define ITR_IVAL_SHIFT 0
0394
0395 #define WMREG_ICS 0x00c8
0396
0397
0398 #define WMREG_IMS 0x00d0
0399
0400
0401 #define WMREG_IMC 0x00d8
0402
0403
0404 #define WMREG_RCTL 0x0100
0405 #define RCTL_EN (1U << 1)
0406 #define RCTL_SBP (1U << 2)
0407 #define RCTL_UPE (1U << 3)
0408 #define RCTL_MPE (1U << 4)
0409 #define RCTL_LPE (1U << 5)
0410 #define RCTL_LBM(x) ((x) << 6)
0411 #define RCTL_LBM_NONE RCTL_LBM(0)
0412 #define RCTL_LBM_PHY RCTL_LBM(3)
0413 #define RCTL_RDMTS(x) ((x) << 8)
0414 #define RCTL_RDMTS_1_2 RCTL_RDMTS(0)
0415 #define RCTL_RDMTS_1_4 RCTL_RDMTS(1)
0416 #define RCTL_RDMTS_1_8 RCTL_RDMTS(2)
0417 #define RCTL_RDMTS_MASK RCTL_RDMTS(3)
0418 #define RCTL_MO(x) ((x) << 12)
0419 #define RCTL_BAM (1U << 15)
0420 #define RCTL_2k (0 << 16)
0421 #define RCTL_1k (1 << 16)
0422 #define RCTL_512 (2 << 16)
0423 #define RCTL_256 (3 << 16)
0424 #define RCTL_BSEX_16k (1 << 16)
0425 #define RCTL_BSEX_8k (2 << 16)
0426 #define RCTL_BSEX_4k (3 << 16)
0427 #define RCTL_DPF (1U << 22)
0428 #define RCTL_PMCF (1U << 23)
0429 #define RCTL_BSEX (1U << 25)
0430 #define RCTL_SECRC (1U << 26)
0431
0432 #define WMREG_OLD_RDTR0 0x0108
0433 #define WMREG_RDTR 0x2820
0434 #define RDTR_FPD (1U << 31)
0435
0436 #define WMREG_RADV 0x282c
0437
0438 #define WMREG_OLD_RDBAL0 0x0110
0439 #define WMREG_RDBAL 0x2800
0440
0441 #define WMREG_OLD_RDBAH0 0x0114
0442 #define WMREG_RDBAH 0x2804
0443
0444 #define WMREG_OLD_RDLEN0 0x0118
0445 #define WMREG_RDLEN 0x2808
0446
0447 #define WMREG_OLD_RDH0 0x0120
0448 #define WMREG_RDH 0x2810
0449
0450 #define WMREG_OLD_RDT0 0x0128
0451 #define WMREG_RDT 0x2818
0452
0453 #define WMREG_RXDCTL 0x2828
0454 #define RXDCTL_PTHRESH(x) ((x) << 0)
0455 #define RXDCTL_HTHRESH(x) ((x) << 8)
0456 #define RXDCTL_WTHRESH(x) ((x) << 16)
0457 #define RXDCTL_GRAN (1U << 24)
0458
0459 #define WMREG_OLD_RDTR1 0x0130
0460
0461 #define WMREG_OLD_RDBA1_LO 0x0138
0462
0463 #define WMREG_OLD_RDBA1_HI 0x013c
0464
0465 #define WMREG_OLD_RDLEN1 0x0140
0466
0467 #define WMREG_OLD_RDH1 0x0148
0468
0469 #define WMREG_OLD_RDT1 0x0150
0470
0471 #define WMREG_OLD_FCRTH 0x0160
0472 #define WMREG_FCRTL 0x2160
0473 #define FCRTH_DFLT 0x00008000
0474
0475 #define WMREG_OLD_FCRTL 0x0168
0476 #define WMREG_FCRTH 0x2168
0477 #define FCRTL_DFLT 0x00004000
0478 #define FCRTL_XONE 0x80000000
0479
0480 #define WMREG_FCTTV 0x0170
0481 #define FCTTV_DFLT 0x00000600
0482
0483 #define WMREG_TXCW 0x0178
0484
0485 #define TXCW_TxConfig (1U << 30)
0486 #define TXCW_ANE (1U << 31)
0487
0488 #define WMREG_RXCW 0x0180
0489
0490 #define RXCW_NC (1U << 26)
0491 #define RXCW_IV (1U << 27)
0492 #define RXCW_CC (1U << 28)
0493 #define RXCW_C (1U << 29)
0494 #define RXCW_SYNCH (1U << 30)
0495 #define RXCW_ANC (1U << 31)
0496
0497 #define WMREG_MTA 0x0200
0498 #define WMREG_CORDOVA_MTA 0x5200
0499
0500 #define WMREG_TCTL 0x0400
0501 #define TCTL_EN (1U << 1)
0502 #define TCTL_PSP (1U << 3)
0503 #define TCTL_CT(x) (((x) & 0xff) << 4)
0504 #define TCTL_COLD(x) (((x) & 0x3ff) << 12)
0505 #define TCTL_SWXOFF (1U << 22)
0506 #define TCTL_RTLC (1U << 24)
0507 #define TCTL_NRTU (1U << 25)
0508 #define TCTL_MULR (1U << 28)
0509
0510 #define TX_COLLISION_THRESHOLD 15
0511 #define TX_COLLISION_DISTANCE_HDX 512
0512 #define TX_COLLISION_DISTANCE_FDX 64
0513
0514 #define WMREG_TCTL_EXT 0x0404
0515 #define TCTL_EXT_BST_MASK 0x000003FF
0516 #define TCTL_EXT_GCEX_MASK 0x000FFC00
0517
0518 #define DEFAULT_80003ES2LAN_TCTL_EXT_GCEX 0x00010000
0519
0520 #define WMREG_TQSA_LO 0x0408
0521
0522 #define WMREG_TQSA_HI 0x040c
0523
0524 #define WMREG_TIPG 0x0410
0525 #define TIPG_IPGT(x) (x)
0526 #define TIPG_IPGR1(x) ((x) << 10)
0527 #define TIPG_IPGR2(x) ((x) << 20)
0528
0529 #define TIPG_WM_DFLT (TIPG_IPGT(0x0a) | TIPG_IPGR1(0x02) | TIPG_IPGR2(0x0a))
0530 #define TIPG_LG_DFLT (TIPG_IPGT(0x06) | TIPG_IPGR1(0x08) | TIPG_IPGR2(0x06))
0531 #define TIPG_1000T_DFLT (TIPG_IPGT(0x08) | TIPG_IPGR1(0x08) | TIPG_IPGR2(0x06))
0532 #define TIPG_1000T_80003_DFLT \
0533 (TIPG_IPGT(0x08) | TIPG_IPGR1(0x02) | TIPG_IPGR2(0x07))
0534 #define TIPG_10_100_80003_DFLT \
0535 (TIPG_IPGT(0x09) | TIPG_IPGR1(0x02) | TIPG_IPGR2(0x07))
0536
0537 #define WMREG_TQC 0x0418
0538
0539 #define WMREG_EEWR 0x102c
0540
0541 #define WMREG_RDFH 0x2410
0542
0543 #define WMREG_RDFT 0x2418
0544
0545 #define WMREG_RDFHS 0x2420
0546
0547 #define WMREG_RDFTS 0x2428
0548
0549 #define WMREG_TDFH 0x3410
0550
0551 #define WMREG_TDFT 0x3418
0552
0553 #define WMREG_TDFHS 0x3420
0554
0555 #define WMREG_TDFTS 0x3428
0556
0557 #define WMREG_TDFPC 0x3430
0558
0559 #define WMREG_OLD_TBDAL 0x0420
0560 #define WMREG_TBDAL 0x3800
0561
0562 #define WMREG_OLD_TBDAH 0x0424
0563 #define WMREG_TBDAH 0x3804
0564
0565 #define WMREG_OLD_TDLEN 0x0428
0566 #define WMREG_TDLEN 0x3808
0567
0568 #define WMREG_OLD_TDH 0x0430
0569 #define WMREG_TDH 0x3810
0570
0571 #define WMREG_OLD_TDT 0x0438
0572 #define WMREG_TDT 0x3818
0573
0574 #define WMREG_OLD_TIDV 0x0440
0575 #define WMREG_TIDV 0x3820
0576
0577 #define WMREG_TXDCTL 0x3828
0578 #define TXDCTL_PTHRESH(x) ((x) << 0)
0579 #define TXDCTL_HTHRESH(x) ((x) << 8)
0580 #define TXDCTL_WTHRESH(x) ((x) << 16)
0581
0582 #define WMREG_TADV 0x382c
0583
0584 #define WMREG_AIT 0x0458
0585
0586 #define WMREG_VFTA 0x0600
0587
0588 #define WM_MC_TABSIZE 128
0589 #define WM_ICH8_MC_TABSIZE 32
0590 #define WM_VLAN_TABSIZE 128
0591
0592 #define WMREG_PBA 0x1000
0593 #define PBA_BYTE_SHIFT 10
0594 #define PBA_ADDR_SHIFT 7
0595 #define PBA_8K 0x0008
0596 #define PBA_12K 0x000c
0597 #define PBA_16K 0x0010
0598 #define PBA_22K 0x0016
0599 #define PBA_24K 0x0018
0600 #define PBA_30K 0x001e
0601 #define PBA_32K 0x0020
0602 #define PBA_40K 0x0028
0603 #define PBA_48K 0x0030
0604
0605 #define WMREG_PBS 0x1000
0606
0607 #define WMREG_TXDMAC 0x3000
0608 #define TXDMAC_DPP (1U << 0)
0609
0610 #define WMREG_TSPMT 0x3830
0611
0612 #define TSPMT_TSMT(x) (x)
0613 #define TSPMT_TSPBP(x) ((x) << 16)
0614
0615 #define WMREG_RXCSUM 0x5000
0616 #define RXCSUM_PCSS 0x000000ff
0617 #define RXCSUM_IPOFL (1U << 8)
0618 #define RXCSUM_TUOFL (1U << 9)
0619 #define RXCSUM_IPV6OFL (1U << 10)
0620
0621 #define WMREG_RXERRC 0x400C
0622 #define WMREG_COLC 0x4028
0623 #define WMREG_XONRXC 0x4048
0624 #define WMREG_XONTXC 0x404c
0625 #define WMREG_XOFFRXC 0x4050
0626 #define WMREG_XOFFTXC 0x4054
0627 #define WMREG_FCRUC 0x4058
0628
0629 #define WMREG_KUMCTRLSTA 0x0034
0630 #define KUMCTRLSTA_MASK 0x0000FFFF
0631 #define KUMCTRLSTA_OFFSET 0x001F0000
0632 #define KUMCTRLSTA_OFFSET_SHIFT 16
0633 #define KUMCTRLSTA_REN 0x00200000
0634
0635 #define KUMCTRLSTA_OFFSET_FIFO_CTRL 0x00000000
0636 #define KUMCTRLSTA_OFFSET_CTRL 0x00000001
0637 #define KUMCTRLSTA_OFFSET_INB_CTRL 0x00000002
0638 #define KUMCTRLSTA_OFFSET_DIAG 0x00000003
0639 #define KUMCTRLSTA_OFFSET_TIMEOUTS 0x00000004
0640 #define KUMCTRLSTA_OFFSET_INB_PARAM 0x00000009
0641 #define KUMCTRLSTA_OFFSET_HD_CTRL 0x00000010
0642 #define KUMCTRLSTA_OFFSET_M2P_SERDES 0x0000001E
0643 #define KUMCTRLSTA_OFFSET_M2P_MODES 0x0000001F
0644
0645
0646 #define KUMCTRLSTA_FIFO_CTRL_RX_BYPASS 0x00000008
0647 #define KUMCTRLSTA_FIFO_CTRL_TX_BYPASS 0x00000800
0648
0649
0650 #define KUMCTRLSTA_INB_CTRL_LINK_TMOUT_DFLT 0x00000500
0651 #define KUMCTRLSTA_INB_CTRL_DIS_PADDING 0x00000010
0652
0653
0654 #define KUMCTRLSTA_HD_CTRL_10_100_DEFAULT 0x00000004
0655 #define KUMCTRLSTA_HD_CTRL_1000_DEFAULT 0x00000000
0656
0657 #define WMREG_MDPHYA 0x003C
0658
0659 #define WMREG_MANC2H 0x5860
0660
0661 #define WMREG_SWSM 0x5b50
0662 #define SWSM_SMBI 0x00000001
0663 #define SWSM_SWESMBI 0x00000002
0664 #define SWSM_WMNG 0x00000004
0665 #define SWSM_DRV_LOAD 0x00000008
0666
0667 #define WMREG_SW_FW_SYNC 0x5b5c
0668 #define SWFW_EEP_SM 0x0001
0669 #define SWFW_PHY0_SM 0x0002
0670 #define SWFW_PHY1_SM 0x0004
0671 #define SWFW_MAC_CSR_SM 0x0008
0672 #define SWFW_SOFT_SHIFT 0
0673 #define SWFW_FIRM_SHIFT 16
0674
0675 #define WMREG_EXTCNFCTR 0x0f00
0676 #define EXTCNFCTR_PCIE_WRITE_ENABLE 0x00000001
0677 #define EXTCNFCTR_PHY_WRITE_ENABLE 0x00000002
0678 #define EXTCNFCTR_D_UD_ENABLE 0x00000004
0679 #define EXTCNFCTR_D_UD_LATENCY 0x00000008
0680 #define EXTCNFCTR_D_UD_OWNER 0x00000010
0681 #define EXTCNFCTR_MDIO_SW_OWNERSHIP 0x00000020
0682 #define EXTCNFCTR_MDIO_HW_OWNERSHIP 0x00000040
0683 #define EXTCNFCTR_EXT_CNF_POINTER 0x0FFF0000
0684 #define E1000_EXTCNF_CTRL_SWFLAG EXTCNFCTR_MDIO_SW_OWNERSHIP
0685
0686
0687 #define ICH_FLASH_COMMAND_TIMEOUT 5000
0688 #define ICH_FLASH_ERASE_TIMEOUT 3000000
0689 #define ICH_FLASH_CYCLE_REPEAT_COUNT 10
0690 #define ICH_FLASH_SEG_SIZE_256 256
0691 #define ICH_FLASH_SEG_SIZE_4K 4096
0692 #define ICH_FLASH_SEG_SIZE_64K 65536
0693
0694 #define ICH_CYCLE_READ 0x0
0695 #define ICH_CYCLE_RESERVED 0x1
0696 #define ICH_CYCLE_WRITE 0x2
0697 #define ICH_CYCLE_ERASE 0x3
0698
0699 #define ICH_FLASH_GFPREG 0x0000
0700 #define ICH_FLASH_HSFSTS 0x0004
0701 #define HSFSTS_DONE 0x0001
0702 #define HSFSTS_ERR 0x0002
0703 #define HSFSTS_DAEL 0x0004
0704 #define HSFSTS_ERSZ_MASK 0x0018
0705 #define HSFSTS_ERSZ_SHIFT 3
0706 #define HSFSTS_FLINPRO 0x0020
0707 #define HSFSTS_FLDVAL 0x4000
0708 #define HSFSTS_FLLK 0x8000
0709 #define ICH_FLASH_HSFCTL 0x0006
0710 #define HSFCTL_GO 0x0001
0711 #define HSFCTL_CYCLE_MASK 0x0006
0712 #define HSFCTL_CYCLE_SHIFT 1
0713 #define HSFCTL_BCOUNT_MASK 0x0300
0714 #define HSFCTL_BCOUNT_SHIFT 8
0715 #define ICH_FLASH_FADDR 0x0008
0716 #define ICH_FLASH_FDATA0 0x0010
0717 #define ICH_FLASH_FRACC 0x0050
0718 #define ICH_FLASH_FREG0 0x0054
0719 #define ICH_FLASH_FREG1 0x0058
0720 #define ICH_FLASH_FREG2 0x005C
0721 #define ICH_FLASH_FREG3 0x0060
0722 #define ICH_FLASH_FPR0 0x0074
0723 #define ICH_FLASH_FPR1 0x0078
0724 #define ICH_FLASH_SSFSTS 0x0090
0725 #define ICH_FLASH_SSFCTL 0x0092
0726 #define ICH_FLASH_PREOP 0x0094
0727 #define ICH_FLASH_OPTYPE 0x0096
0728 #define ICH_FLASH_OPMENU 0x0098
0729
0730 #define ICH_FLASH_REG_MAPSIZE 0x00A0
0731 #define ICH_FLASH_SECTOR_SIZE 4096
0732 #define ICH_GFPREG_BASE_MASK 0x1FFF
0733 #define ICH_FLASH_LINEAR_ADDR_MASK 0x00FFFFFF
0734
0735
0736 #define WMREG_GPTC 0x4080
0737 #define WMREG_GPRC 0x4074
0738 #define WMREG_CRCERRS 0x4000
0739 #define WMREG_RLEC 0x4040
0740