Lines Matching +full:0 +full:x0a60
15 #define ID_REV (0x00)
16 #define ID_REV_ID_MASK_ (0xFFFF0000)
17 #define ID_REV_ID_LAN7430_ (0x74300000)
18 #define ID_REV_ID_LAN7431_ (0x74310000)
19 #define ID_REV_ID_LAN743X_ (0x74300000)
20 #define ID_REV_ID_A011_ (0xA0110000) // PCI11010
21 #define ID_REV_ID_A041_ (0xA0410000) // PCI11414
22 #define ID_REV_ID_A0X1_ (0xA0010000)
24 ((((id_rev) & 0xFFF00000) == ID_REV_ID_LAN743X_) || \
25 (((id_rev) & 0xFF0F0000) == ID_REV_ID_A0X1_))
26 #define ID_REV_CHIP_REV_MASK_ (0x0000FFFF)
27 #define ID_REV_CHIP_REV_A0_ (0x00000000)
28 #define ID_REV_CHIP_REV_B0_ (0x00000010)
29 #define ID_REV_CHIP_REV_PCI11X1X_B0_ (0x000000B0)
31 #define FPGA_REV (0x04)
32 #define FPGA_REV_GET_MINOR_(fpga_rev) (((fpga_rev) >> 8) & 0x000000FF)
33 #define FPGA_REV_GET_MAJOR_(fpga_rev) ((fpga_rev) & 0x000000FF)
36 #define STRAP_READ (0x0C)
44 #define STRAP_READ_ADV_PM_DISABLE_ BIT(0)
46 #define HW_CFG (0x010)
52 #define HW_CFG_RELOAD_TYPE_ALL_ (0x00000FC0)
56 #define PMT_CTL (0x014)
69 #define PMT_CTL_WUPS_MASK_ (0x00000003)
71 #define DP_SEL (0x024)
73 #define DP_SEL_MASK_ (0x0000001F)
74 #define DP_SEL_RFE_RAM (0x00000001)
79 #define DP_CMD (0x028)
80 #define DP_CMD_WRITE_ (0x00000001)
82 #define DP_ADDR (0x02C)
84 #define DP_DATA_0 (0x030)
86 #define E2P_CMD (0x040)
88 #define E2P_CMD_EPC_CMD_WRITE_ (0x30000000)
89 #define E2P_CMD_EPC_CMD_EWEN_ (0x20000000)
90 #define E2P_CMD_EPC_CMD_READ_ (0x00000000)
92 #define E2P_CMD_EPC_ADDR_MASK_ (0x000001FF)
94 #define E2P_DATA (0x044)
97 #define ETH_CTRL_REG_ADDR_BASE (0x0000)
98 #define ETH_SYS_REG_ADDR_BASE (0x4000)
99 #define CONFIG_REG_ADDR_BASE (0x0000)
100 #define ETH_EEPROM_REG_ADDR_BASE (0x0E00)
101 #define ETH_OTP_REG_ADDR_BASE (0x1000)
102 #define GEN_SYS_CONFIG_LOAD_STARTED_REG (0x0078)
107 #define SYS_LOCK_REG (0x00A0)
114 #define SYS_LOCK_REG_USB_SS_LOCK_ BIT(0)
120 #define HS_E2P_CMD (HS_EEPROM_REG_ADDR_BASE + 0x0000)
123 #define HS_E2P_CMD_EPC_CMD_READ_ (0x0)
125 #define HS_E2P_CMD_EPC_ADDR_MASK_ GENMASK(15, 0)
126 #define HS_E2P_DATA (HS_EEPROM_REG_ADDR_BASE + 0x0004)
127 #define HS_E2P_DATA_MASK_ GENMASK(7, 0)
128 #define HS_E2P_CFG (HS_EEPROM_REG_ADDR_BASE + 0x0008)
132 #define HS_E2P_CFG_TEST_EEPR_TO_BYP_ BIT(0)
133 #define HS_E2P_PAD_CTL (HS_EEPROM_REG_ADDR_BASE + 0x000C)
135 #define GPIO_CFG0 (0x050)
137 #define GPIO_CFG0_GPIO_DATA_BIT_(bit) BIT(0 + (bit))
139 #define GPIO_CFG1 (0x054)
141 #define GPIO_CFG1_GPIOBUF_BIT_(bit) BIT(0 + (bit))
143 #define GPIO_CFG2 (0x058)
144 #define GPIO_CFG2_1588_POL_BIT_(bit) BIT(0 + (bit))
146 #define GPIO_CFG3 (0x05C)
148 #define GPIO_CFG3_1588_OE_BIT_(bit) BIT(0 + (bit))
150 #define FCT_RX_CTL (0xAC)
155 #define FCT_TX_CTL (0xC4)
160 #define FCT_FLOW(rx_channel) (0xE0 + ((rx_channel) << 2))
161 #define FCT_FLOW_CTL_OFF_THRESHOLD_ (0x00007F00)
165 #define FCT_FLOW_CTL_ON_THRESHOLD_ (0x0000007F)
167 ((value << 0) & FCT_FLOW_CTL_ON_THRESHOLD_)
169 #define MAC_CR (0x100)
178 #define MAC_CR_RST_ BIT(0)
180 #define MAC_RX (0x104)
182 #define MAC_RX_MAX_SIZE_MASK_ (0x3FFF0000)
184 #define MAC_RX_RXEN_ BIT(0)
186 #define MAC_TX (0x108)
188 #define MAC_TX_TXEN_ BIT(0)
190 #define MAC_FLOW (0x10C)
193 #define MAC_FLOW_CR_FCPT_MASK_ (0x0000FFFF)
195 #define MAC_RX_ADDRH (0x118)
197 #define MAC_RX_ADDRL (0x11C)
199 #define MAC_MII_ACC (0x120)
201 #define MAC_MII_ACC_MDC_CYCLE_MASK_ (0x00070000)
202 #define MAC_MII_ACC_MDC_CYCLE_2_5MHZ_ (0)
208 #define MAC_MII_ACC_PHY_ADDR_MASK_ (0x0000F800)
210 #define MAC_MII_ACC_MIIRINDA_MASK_ (0x000007C0)
211 #define MAC_MII_ACC_MII_READ_ (0x00000000)
212 #define MAC_MII_ACC_MII_WRITE_ (0x00000002)
213 #define MAC_MII_ACC_MII_BUSY_ BIT(0)
216 #define MAC_MII_ACC_MIIMMD_MASK_ (0x000007C0)
218 #define MAC_MII_ACC_MIICMD_MASK_ (0x00000006)
219 #define MAC_MII_ACC_MIICMD_ADDR_ (0x00000000)
220 #define MAC_MII_ACC_MIICMD_WRITE_ (0x00000002)
221 #define MAC_MII_ACC_MIICMD_READ_ (0x00000004)
222 #define MAC_MII_ACC_MIICMD_READ_INC_ (0x00000006)
224 #define MAC_MII_DATA (0x124)
226 #define MAC_EEE_TX_LPI_REQ_DLY_CNT (0x130)
228 #define MAC_WUCSR (0x140)
241 #define MAC_WUCSR_BCST_EN_ BIT(0)
243 #define MAC_WK_SRC (0x144)
256 #define MAC_MP_SO_HI (0x148)
257 #define MAC_MP_SO_LO (0x14C)
259 #define MAC_WUF_CFG0 (0x150)
264 #define MAC_WUF_CFG_TYPE_MCAST_ (0x02000000)
265 #define MAC_WUF_CFG_TYPE_ALL_ (0x01000000)
267 #define MAC_WUF_CFG_CRC16_MASK_ (0x0000FFFF)
269 #define MAC_WUF_MASK0_0 (0x200)
270 #define MAC_WUF_MASK0_1 (0x204)
271 #define MAC_WUF_MASK0_2 (0x208)
272 #define MAC_WUF_MASK0_3 (0x20C)
277 #define MAC_WUF_MASK0(index) (MAC_WUF_MASK0_BEGIN + (0x10 * (index)))
278 #define MAC_WUF_MASK1(index) (MAC_WUF_MASK1_BEGIN + (0x10 * (index)))
279 #define MAC_WUF_MASK2(index) (MAC_WUF_MASK2_BEGIN + (0x10 * (index)))
280 #define MAC_WUF_MASK3(index) (MAC_WUF_MASK3_BEGIN + (0x10 * (index)))
282 /* offset 0x400 - 0x500, x may range from 0 to 32, for a total of 33 entries */
283 #define RFE_ADDR_FILT_HI(x) (0x400 + (8 * (x)))
286 /* offset 0x404 - 0x504, x may range from 0 to 32, for a total of 33 entries */
287 #define RFE_ADDR_FILT_LO(x) (0x404 + (8 * (x)))
289 #define RFE_CTL (0x508)
298 #define RFE_RSS_CFG (0x554)
308 #define RFE_RSS_CFG_VALID_HASH_BITS_ (0x000000E0)
311 #define RFE_RSS_CFG_RSS_ENABLE_ BIT(0)
313 #define RFE_HASH_KEY(index) (0x558 + (index << 2))
315 #define RFE_INDX(index) (0x580 + (index << 2))
317 #define MAC_WUCSR2 (0x600)
323 #define SGMII_ACC (0x720)
329 #define SGMII_ACC_SGMII_ADDR_SHIFT_ (0)
330 #define SGMII_ACC_SGMII_ADDR_MASK_ GENMASK(15, 0)
331 #define SGMII_DATA (0x724)
332 #define SGMII_DATA_SHIFT_ (0)
333 #define SGMII_DATA_MASK_ GENMASK(15, 0)
334 #define SGMII_CTL (0x728)
339 #define MISC_CTL_0 (0x920)
343 #define SR_VSMMD_PCS_ID1 0x0004
344 #define SR_VSMMD_PCS_ID2 0x0005
345 #define SR_VSMMD_STS 0x0008
346 #define SR_VSMMD_CTRL 0x0009
348 #define VR_MII_DIG_CTRL1 0x8000
359 #define VR_MII_DIG_CTRL1_PHY_MODE_CTRL_ BIT(0)
360 #define VR_MII_AN_CTRL 0x8001
364 #define VR_MII_AN_CTRL_1000BASE_X_ (0)
369 #define VR_MII_AN_CTRL_MII_AN_INTR_EN_ BIT(0)
370 #define VR_MII_AN_INTR_STS 0x8002
375 #define VR_MII_AN_INTR_STS_10_MBPS_ (0)
377 #define VR_MII_AN_INTR_STS_CL37_ANCMPLT_INTR_ BIT(0)
379 #define VR_MII_LINK_TIMER_CTRL 0x800A
380 #define VR_MII_DIG_STS 0x8010
383 #define VR_MII_GEN2_4_MPLL_CTRL0 0x8078
386 #define VR_MII_GEN2_4_MPLL_CTRL1 0x8079
387 #define VR_MII_MPLL_CTRL1_MPLL_MULTIPLIER_ GENMASK(6, 0)
394 #define VR_MII_GEN2_4_MISC_CTRL1 0x809A
397 #define VR_MII_CTRL1_TX_RATE_0_MASK_ GENMASK(1, 0)
398 #define VR_MII_MPLL_BAUD_CLK (0)
402 #define INT_STS (0x780)
404 #define INT_BIT_ALL_RX_ (0x0F000000)
406 #define INT_BIT_ALL_TX_ (0x000F0000)
410 #define INT_BIT_MAS_ BIT(0)
412 #define INT_SET (0x784)
414 #define INT_EN_SET (0x788)
416 #define INT_EN_CLR (0x78C)
418 #define INT_STS_R2C (0x790)
420 #define INT_VEC_EN_SET (0x794)
421 #define INT_VEC_EN_CLR (0x798)
422 #define INT_VEC_EN_AUTO_CLR (0x79C)
423 #define INT_VEC_EN_(vector_index) BIT(0 + vector_index)
425 #define INT_VEC_MAP0 (0x7A0)
429 #define INT_VEC_MAP1 (0x7A4)
433 #define INT_VEC_MAP2 (0x7A8)
435 #define INT_MOD_MAP0 (0x7B0)
437 #define INT_MOD_MAP1 (0x7B4)
439 #define INT_MOD_MAP2 (0x7B8)
441 #define INT_MOD_CFG0 (0x7C0)
442 #define INT_MOD_CFG1 (0x7C4)
443 #define INT_MOD_CFG2 (0x7C8)
444 #define INT_MOD_CFG3 (0x7CC)
445 #define INT_MOD_CFG4 (0x7D0)
446 #define INT_MOD_CFG5 (0x7D4)
447 #define INT_MOD_CFG6 (0x7D8)
448 #define INT_MOD_CFG7 (0x7DC)
449 #define INT_MOD_CFG8 (0x7E0)
450 #define INT_MOD_CFG9 (0x7E4)
452 #define PTP_CMD_CTL (0x0A00)
460 #define PTP_CMD_CTL_PTP_RESET_ BIT(0)
461 #define PTP_GENERAL_CONFIG (0x0A04)
463 (0x7 << (1 + ((channel) << 2)))
464 #define PTP_GENERAL_CONFIG_CLOCK_EVENT_100NS_ (0)
472 (((value) & 0x7) << (1 + ((channel) << 2)))
475 #define HS_PTP_GENERAL_CONFIG (0x0A04)
477 (0xf << (4 + ((channel) << 2)))
478 #define HS_PTP_GENERAL_CONFIG_CLOCK_EVENT_100NS_ (0)
495 (((value) & 0xf) << (4 + ((channel) << 2)))
499 #define PTP_INT_STS (0x0A08)
512 #define PTP_INT_TIMER_INT_A_ BIT(0)
513 #define PTP_INT_EN_SET (0x0A0C)
517 #define PTP_INT_EN_CLR (0x0A10)
523 #define PTP_INT_BIT_TIMER_A_ BIT(0)
525 #define PTP_CLOCK_SEC (0x0A14)
526 #define PTP_CLOCK_NS (0x0A18)
527 #define PTP_CLOCK_SUBNS (0x0A1C)
528 #define PTP_CLOCK_RATE_ADJ (0x0A20)
530 #define PTP_CLOCK_STEP_ADJ (0x0A2C)
532 #define PTP_CLOCK_STEP_ADJ_VALUE_MASK_ (0x3FFFFFFF)
533 #define PTP_CLOCK_TARGET_SEC_X(channel) (0x0A30 + ((channel) << 4))
534 #define PTP_CLOCK_TARGET_NS_X(channel) (0x0A34 + ((channel) << 4))
535 #define PTP_CLOCK_TARGET_RELOAD_SEC_X(channel) (0x0A38 + ((channel) << 4))
536 #define PTP_CLOCK_TARGET_RELOAD_NS_X(channel) (0x0A3C + ((channel) << 4))
537 #define PTP_LTC_SET_SEC_HI (0x0A50)
538 #define PTP_LTC_SET_SEC_HI_SEC_47_32_MASK_ GENMASK(15, 0)
539 #define PTP_VERSION (0x0A54)
543 #define PTP_VERSION_RX_LO_MASK_ GENMASK(7, 0)
544 #define PTP_IO_SEL (0x0A58)
547 #define PTP_LATENCY (0x0A5C)
550 (((u32)(rx_latency)) & 0x0000FFFF)
551 #define PTP_CAP_INFO (0x0A60)
552 #define PTP_CAP_INFO_TX_TS_CNT_GET_(reg_val) (((reg_val) & 0x00000070) >> 4)
554 #define PTP_TX_MOD (0x0AA4)
555 #define PTP_TX_MOD_TX_PTP_SYNC_TS_INSERT_ (0x10000000)
557 #define PTP_TX_MOD2 (0x0AA8)
558 #define PTP_TX_MOD2_TX_PTP_CLR_UDPV4_CHKSUM_ (0x00000001)
560 #define PTP_TX_EGRESS_SEC (0x0AAC)
561 #define PTP_TX_EGRESS_NS (0x0AB0)
562 #define PTP_TX_EGRESS_NS_CAPTURE_CAUSE_MASK_ (0xC0000000)
563 #define PTP_TX_EGRESS_NS_CAPTURE_CAUSE_AUTO_ (0x00000000)
564 #define PTP_TX_EGRESS_NS_CAPTURE_CAUSE_SW_ (0x40000000)
565 #define PTP_TX_EGRESS_NS_TS_NS_MASK_ (0x3FFFFFFF)
567 #define PTP_TX_MSG_HEADER (0x0AB4)
568 #define PTP_TX_MSG_HEADER_MSG_TYPE_ (0x000F0000)
569 #define PTP_TX_MSG_HEADER_MSG_TYPE_SYNC_ (0x00000000)
571 #define PTP_TX_CAP_INFO (0x0AB8)
572 #define PTP_TX_CAP_INFO_TX_CH_MASK_ GENMASK(1, 0)
573 #define PTP_TX_DOMAIN (0x0ABC)
576 #define PTP_TX_DOMAIN_RANGE_MASK_ GENMASK(7, 0)
577 #define PTP_TX_SDOID (0x0AC0)
580 #define PTP_TX_SDOID_11_0_MASK_ GENMASK(7, 0)
581 #define PTP_IO_CAP_CONFIG (0x0AC4)
585 #define PTP_IO_CAP_CONFIG_RE_CAP_EN_(channel) BIT(0 + (channel))
586 #define PTP_IO_RE_LTC_SEC_CAP_X (0x0AC8)
587 #define PTP_IO_RE_LTC_NS_CAP_X (0x0ACC)
588 #define PTP_IO_FE_LTC_SEC_CAP_X (0x0AD0)
589 #define PTP_IO_FE_LTC_NS_CAP_X (0x0AD4)
590 #define PTP_IO_EVENT_OUTPUT_CFG (0x0AD8)
592 #define PTP_IO_EVENT_OUTPUT_CFG_EN_(channel) BIT(0 + (channel))
593 #define PTP_IO_PIN_CFG (0x0ADC)
594 #define PTP_IO_PIN_CFG_OBUF_TYPE_(channel) BIT(0 + (channel))
595 #define PTP_LTC_RD_SEC_HI (0x0AF0)
596 #define PTP_LTC_RD_SEC_HI_SEC_47_32_MASK_ GENMASK(15, 0)
597 #define PTP_LTC_RD_SEC_LO (0x0AF4)
598 #define PTP_LTC_RD_NS (0x0AF8)
599 #define PTP_LTC_RD_NS_29_0_MASK_ GENMASK(29, 0)
600 #define PTP_LTC_RD_SUBNS (0x0AFC)
601 #define PTP_RX_USER_MAC_HI (0x0B00)
602 #define PTP_RX_USER_MAC_HI_47_32_MASK_ GENMASK(15, 0)
603 #define PTP_RX_USER_MAC_LO (0x0B04)
604 #define PTP_RX_USER_IP_ADDR_0 (0x0B20)
605 #define PTP_RX_USER_IP_ADDR_1 (0x0B24)
606 #define PTP_RX_USER_IP_ADDR_2 (0x0B28)
607 #define PTP_RX_USER_IP_ADDR_3 (0x0B2C)
608 #define PTP_RX_USER_IP_MASK_0 (0x0B30)
609 #define PTP_RX_USER_IP_MASK_1 (0x0B34)
610 #define PTP_RX_USER_IP_MASK_2 (0x0B38)
611 #define PTP_RX_USER_IP_MASK_3 (0x0B3C)
612 #define PTP_TX_USER_MAC_HI (0x0B40)
613 #define PTP_TX_USER_MAC_HI_47_32_MASK_ GENMASK(15, 0)
614 #define PTP_TX_USER_MAC_LO (0x0B44)
615 #define PTP_TX_USER_IP_ADDR_0 (0x0B60)
616 #define PTP_TX_USER_IP_ADDR_1 (0x0B64)
617 #define PTP_TX_USER_IP_ADDR_2 (0x0B68)
618 #define PTP_TX_USER_IP_ADDR_3 (0x0B6C)
619 #define PTP_TX_USER_IP_MASK_0 (0x0B70)
620 #define PTP_TX_USER_IP_MASK_1 (0x0B74)
621 #define PTP_TX_USER_IP_MASK_2 (0x0B78)
622 #define PTP_TX_USER_IP_MASK_3 (0x0B7C)
624 #define DMAC_CFG (0xC00)
626 #define DMAC_CFG_CH_ARB_SEL_RX_HIGH_ (0x00000000)
627 #define DMAC_CFG_MAX_READ_REQ_MASK_ (0x00000070)
630 #define DMAC_CFG_MAX_DSPACE_16_ (0x00000000)
631 #define DMAC_CFG_MAX_DSPACE_32_ (0x00000001)
633 #define DMAC_CFG_MAX_DSPACE_128_ (0x00000003)
635 #define DMAC_COAL_CFG (0xC04)
636 #define DMAC_COAL_CFG_TIMER_LIMIT_MASK_ (0xFFF00000)
643 #define DMAC_COAL_CFG_TX_THRES_MASK_ (0x0000FF00)
646 #define DMAC_COAL_CFG_RX_THRES_MASK_ (0x000000FF)
650 #define DMAC_OBFF_CFG (0xC08)
651 #define DMAC_OBFF_TX_THRES_MASK_ (0x0000FF00)
654 #define DMAC_OBFF_RX_THRES_MASK_ (0x000000FF)
658 #define DMAC_CMD (0xC0C)
665 #define DMAC_CMD_STOP_R_(channel) BIT(0 + (channel))
667 #define DMAC_INT_STS (0xC10)
668 #define DMAC_INT_EN_SET (0xC14)
669 #define DMAC_INT_EN_CLR (0xC18)
671 #define DMAC_INT_BIT_TX_IOC_(channel) BIT(0 + (channel))
673 #define RX_CFG_A(channel) (0xC40 + ((channel) << 6))
675 #define RX_CFG_A_RX_WB_THRES_MASK_ (0x1F000000)
678 #define RX_CFG_A_RX_PF_THRES_MASK_ (0x001F0000)
681 #define RX_CFG_A_RX_PF_PRI_THRES_MASK_ (0x00001F00)
686 #define RX_CFG_B(channel) (0xC44 + ((channel) << 6))
688 #define RX_CFG_B_RX_PAD_MASK_ (0x03000000)
689 #define RX_CFG_B_RX_PAD_0_ (0x00000000)
690 #define RX_CFG_B_RX_PAD_2_ (0x02000000)
691 #define RX_CFG_B_RDMABL_512_ (0x00040000)
692 #define RX_CFG_B_RX_RING_LEN_MASK_ (0x0000FFFF)
694 #define RX_BASE_ADDRH(channel) (0xC48 + ((channel) << 6))
696 #define RX_BASE_ADDRL(channel) (0xC4C + ((channel) << 6))
698 #define RX_HEAD_WRITEBACK_ADDRH(channel) (0xC50 + ((channel) << 6))
700 #define RX_HEAD_WRITEBACK_ADDRL(channel) (0xC54 + ((channel) << 6))
702 #define RX_HEAD(channel) (0xC58 + ((channel) << 6))
704 #define RX_TAIL(channel) (0xC5C + ((channel) << 6))
708 #define RX_CFG_C(channel) (0xC64 + ((channel) << 6))
712 #define RX_CFG_C_RX_INT_STS_R2C_MODE_MASK_ (0x00000007)
714 #define TX_CFG_A(channel) (0xD40 + ((channel) << 6))
716 #define TX_CFG_A_TX_TMR_HPWB_SEL_IOC_ (0x10000000)
717 #define TX_CFG_A_TX_PF_THRES_MASK_ (0x001F0000)
720 #define TX_CFG_A_TX_PF_PRI_THRES_MASK_ (0x00001F00)
724 #define TX_CFG_A_TX_HP_WB_THRES_MASK_ (0x0000000F)
728 #define TX_CFG_B(channel) (0xD44 + ((channel) << 6))
729 #define TX_CFG_B_TDMABL_512_ (0x00040000)
730 #define TX_CFG_B_TX_RING_LEN_MASK_ (0x0000FFFF)
732 #define TX_BASE_ADDRH(channel) (0xD48 + ((channel) << 6))
734 #define TX_BASE_ADDRL(channel) (0xD4C + ((channel) << 6))
736 #define TX_HEAD_WRITEBACK_ADDRH(channel) (0xD50 + ((channel) << 6))
738 #define TX_HEAD_WRITEBACK_ADDRL(channel) (0xD54 + ((channel) << 6))
740 #define TX_HEAD(channel) (0xD58 + ((channel) << 6))
742 #define TX_TAIL(channel) (0xD5C + ((channel) << 6))
747 #define TX_CFG_C(channel) (0xD64 + ((channel) << 6))
752 #define TX_CFG_C_TX_INT_STS_R2C_MODE_MASK_ (0x00000007)
754 #define OTP_PWR_DN (0x1000)
755 #define OTP_PWR_DN_PWRDN_N_ BIT(0)
757 #define OTP_ADDR_HIGH (0x1004)
758 #define OTP_ADDR_LOW (0x1008)
760 #define OTP_PRGM_DATA (0x1010)
762 #define OTP_PRGM_MODE (0x1014)
763 #define OTP_PRGM_MODE_BYTE_ BIT(0)
765 #define OTP_READ_DATA (0x1018)
767 #define OTP_FUNC_CMD (0x1020)
768 #define OTP_FUNC_CMD_READ_ BIT(0)
770 #define OTP_TST_CMD (0x1024)
773 #define OTP_CMD_GO (0x1028)
774 #define OTP_CMD_GO_GO_ BIT(0)
776 #define OTP_STATUS (0x1030)
777 #define OTP_STATUS_BUSY_ BIT(0)
782 #define HS_OTP_PWR_DN (HS_OTP_BLOCK_BASE + 0x0)
783 #define HS_OTP_ADDR_HIGH (HS_OTP_BLOCK_BASE + 0x4)
784 #define HS_OTP_ADDR_LOW (HS_OTP_BLOCK_BASE + 0x8)
785 #define HS_OTP_PRGM_DATA (HS_OTP_BLOCK_BASE + 0x10)
786 #define HS_OTP_PRGM_MODE (HS_OTP_BLOCK_BASE + 0x14)
787 #define HS_OTP_READ_DATA (HS_OTP_BLOCK_BASE + 0x18)
788 #define HS_OTP_FUNC_CMD (HS_OTP_BLOCK_BASE + 0x20)
789 #define HS_OTP_TST_CMD (HS_OTP_BLOCK_BASE + 0x24)
790 #define HS_OTP_CMD_GO (HS_OTP_BLOCK_BASE + 0x28)
791 #define HS_OTP_STATUS (HS_OTP_BLOCK_BASE + 0x30)
794 #define STAT_RX_FCS_ERRORS (0x1200)
795 #define STAT_RX_ALIGNMENT_ERRORS (0x1204)
796 #define STAT_RX_FRAGMENT_ERRORS (0x1208)
797 #define STAT_RX_JABBER_ERRORS (0x120C)
798 #define STAT_RX_UNDERSIZE_FRAME_ERRORS (0x1210)
799 #define STAT_RX_OVERSIZE_FRAME_ERRORS (0x1214)
800 #define STAT_RX_DROPPED_FRAMES (0x1218)
801 #define STAT_RX_UNICAST_BYTE_COUNT (0x121C)
802 #define STAT_RX_BROADCAST_BYTE_COUNT (0x1220)
803 #define STAT_RX_MULTICAST_BYTE_COUNT (0x1224)
804 #define STAT_RX_UNICAST_FRAMES (0x1228)
805 #define STAT_RX_BROADCAST_FRAMES (0x122C)
806 #define STAT_RX_MULTICAST_FRAMES (0x1230)
807 #define STAT_RX_PAUSE_FRAMES (0x1234)
808 #define STAT_RX_64_BYTE_FRAMES (0x1238)
809 #define STAT_RX_65_127_BYTE_FRAMES (0x123C)
810 #define STAT_RX_128_255_BYTE_FRAMES (0x1240)
811 #define STAT_RX_256_511_BYTES_FRAMES (0x1244)
812 #define STAT_RX_512_1023_BYTE_FRAMES (0x1248)
813 #define STAT_RX_1024_1518_BYTE_FRAMES (0x124C)
814 #define STAT_RX_GREATER_1518_BYTE_FRAMES (0x1250)
815 #define STAT_RX_TOTAL_FRAMES (0x1254)
816 #define STAT_EEE_RX_LPI_TRANSITIONS (0x1258)
817 #define STAT_EEE_RX_LPI_TIME (0x125C)
818 #define STAT_RX_COUNTER_ROLLOVER_STATUS (0x127C)
820 #define STAT_TX_FCS_ERRORS (0x1280)
821 #define STAT_TX_EXCESS_DEFERRAL_ERRORS (0x1284)
822 #define STAT_TX_CARRIER_ERRORS (0x1288)
823 #define STAT_TX_BAD_BYTE_COUNT (0x128C)
824 #define STAT_TX_SINGLE_COLLISIONS (0x1290)
825 #define STAT_TX_MULTIPLE_COLLISIONS (0x1294)
826 #define STAT_TX_EXCESSIVE_COLLISION (0x1298)
827 #define STAT_TX_LATE_COLLISIONS (0x129C)
828 #define STAT_TX_UNICAST_BYTE_COUNT (0x12A0)
829 #define STAT_TX_BROADCAST_BYTE_COUNT (0x12A4)
830 #define STAT_TX_MULTICAST_BYTE_COUNT (0x12A8)
831 #define STAT_TX_UNICAST_FRAMES (0x12AC)
832 #define STAT_TX_BROADCAST_FRAMES (0x12B0)
833 #define STAT_TX_MULTICAST_FRAMES (0x12B4)
834 #define STAT_TX_PAUSE_FRAMES (0x12B8)
835 #define STAT_TX_64_BYTE_FRAMES (0x12BC)
836 #define STAT_TX_65_127_BYTE_FRAMES (0x12C0)
837 #define STAT_TX_128_255_BYTE_FRAMES (0x12C4)
838 #define STAT_TX_256_511_BYTES_FRAMES (0x12C8)
839 #define STAT_TX_512_1023_BYTE_FRAMES (0x12CC)
840 #define STAT_TX_1024_1518_BYTE_FRAMES (0x12D0)
841 #define STAT_TX_GREATER_1518_BYTE_FRAMES (0x12D4)
842 #define STAT_TX_TOTAL_FRAMES (0x12D8)
843 #define STAT_EEE_TX_LPI_TRANSITIONS (0x12DC)
844 #define STAT_EEE_TX_LPI_TIME (0x12E0)
845 #define STAT_TX_COUNTER_ROLLOVER_STATUS (0x12FC)
872 #define PCI_DEVICE_ID_SMSC_LAN7430 (0x7430)
873 #define PCI_DEVICE_ID_SMSC_LAN7431 (0x7431)
874 #define PCI_DEVICE_ID_SMSC_A011 (0xA011)
875 #define PCI_DEVICE_ID_SMSC_A041 (0xA041)
877 #define PCI_CONFIG_LENGTH (0x1000)
880 #define CSR_LENGTH (0x2000)
882 #define LAN743X_CSR_FLAG_IS_A0 BIT(0)
896 #define LAN743X_VECTOR_FLAG_IRQ_SHARED BIT(0)
951 #define GPIO_QUEUE_STARTED (0)
956 #define TX_FRAME_FLAG_IN_PROGRESS BIT(0)
958 #define TX_TS_FLAG_TIMESTAMPING_ENABLED BIT(0)
1024 POWER_DOWN = 0,
1074 #define LAN743X_ADAPTER_FLAG_OTP BIT(0)
1082 #define INTR_FLAG_IRQ_REQUESTED(vector_index) BIT(0 + vector_index)
1087 #define MAC_MII_WRITE 0
1089 #define PHY_FLAG_OPENED BIT(0)
1093 #define DMA_ADDR_HIGH32(dma_addr) ((u32)(((dma_addr) >> 32) & 0xFFFFFFFF))
1095 #define DMA_ADDR_HIGH32(dma_addr) ((u32)(0))
1097 #define DMA_ADDR_LOW32(dma_addr) ((u32)((dma_addr) & 0xFFFFFFFF))
1105 (((start_bit) ? 2 : 0) | ((stop_bit) ? 1 : 0))
1106 #define DMAC_CHANNEL_STATE_INITIAL DMAC_CHANNEL_STATE_SET(0, 0)
1107 #define DMAC_CHANNEL_STATE_STARTED DMAC_CHANNEL_STATE_SET(1, 0)
1109 #define DMAC_CHANNEL_STATE_STOPPED DMAC_CHANNEL_STATE_SET(0, 1)
1112 #define TX_DESC_DATA0_DTYPE_MASK_ (0xC0000000)
1113 #define TX_DESC_DATA0_DTYPE_DATA_ (0x00000000)
1114 #define TX_DESC_DATA0_DTYPE_EXT_ (0x40000000)
1115 #define TX_DESC_DATA0_FS_ (0x20000000)
1116 #define TX_DESC_DATA0_LS_ (0x10000000)
1117 #define TX_DESC_DATA0_EXT_ (0x08000000)
1118 #define TX_DESC_DATA0_IOC_ (0x04000000)
1119 #define TX_DESC_DATA0_ICE_ (0x00400000)
1120 #define TX_DESC_DATA0_IPE_ (0x00200000)
1121 #define TX_DESC_DATA0_TPE_ (0x00100000)
1122 #define TX_DESC_DATA0_FCS_ (0x00020000)
1123 #define TX_DESC_DATA0_TSE_ (0x00010000)
1124 #define TX_DESC_DATA0_BUF_LENGTH_MASK_ (0x0000FFFF)
1125 #define TX_DESC_DATA0_EXT_LSO_ (0x00200000)
1126 #define TX_DESC_DATA0_EXT_PAY_LENGTH_MASK_ (0x000FFFFF)
1127 #define TX_DESC_DATA3_FRAME_LENGTH_MSS_MASK_ (0x3FFF0000)
1136 #define TX_BUFFER_INFO_FLAG_ACTIVE BIT(0)
1150 #define RX_DESC_DATA0_OWN_ (0x00008000)
1152 #define RX_DESC_DATA0_FS_ (0x80000000)
1153 #define RX_DESC_DATA0_LS_ (0x40000000)
1154 #define RX_DESC_DATA0_FRAME_LENGTH_MASK_ (0x3FFF0000)
1157 #define RX_DESC_DATA0_EXT_ (0x00004000)
1158 #define RX_DESC_DATA0_BUF_LENGTH_MASK_ (0x00003FFF)
1159 #define RX_DESC_DATA1_STATUS_ICE_ (0x00020000)
1160 #define RX_DESC_DATA1_STATUS_TCE_ (0x00010000)
1161 #define RX_DESC_DATA1_STATUS_ICSM_ (0x00000001)
1162 #define RX_DESC_DATA2_TS_NS_MASK_ (0x3FFFFFFF)
1164 #if ((NET_IP_ALIGN != 0) && (NET_IP_ALIGN != 2))
1165 #error NET_IP_ALIGN must be 0 or 2
1177 #define RX_BUFFER_INFO_FLAG_ACTIVE BIT(0)
1188 #define RX_PROCESS_RESULT_NOTHING_TO_DO (0)