Lines Matching full:eth
342 #define TX_DMA_PLEN0(x) (((x) & eth->soc->tx.dma_max_len) << eth->soc->tx.dma_len_offset)
343 #define TX_DMA_PLEN1(x) ((x) & eth->soc->tx.dma_max_len)
363 #define RX_DMA_PREP_PLEN0(x) (((x) & eth->soc->rx.dma_max_len) << eth->soc->rx.dma_len_offset)
364 #define RX_DMA_GET_PLEN0(x) (((x) >> eth->soc->rx.dma_len_offset) & eth->soc->rx.dma_max_len)
1386 static inline bool mtk_is_netsys_v1(struct mtk_eth *eth) in mtk_is_netsys_v1() argument
1388 return eth->soc->version == 1; in mtk_is_netsys_v1()
1391 static inline bool mtk_is_netsys_v2_or_greater(struct mtk_eth *eth) in mtk_is_netsys_v2_or_greater() argument
1393 return eth->soc->version > 1; in mtk_is_netsys_v2_or_greater()
1396 static inline bool mtk_is_netsys_v3_or_greater(struct mtk_eth *eth) in mtk_is_netsys_v3_or_greater() argument
1398 return eth->soc->version > 2; in mtk_is_netsys_v3_or_greater()
1404 const struct mtk_soc_data *soc = ppe->eth->soc; in mtk_foe_get_entry()
1409 static inline u32 mtk_get_ib1_ts_mask(struct mtk_eth *eth) in mtk_get_ib1_ts_mask() argument
1411 if (mtk_is_netsys_v2_or_greater(eth)) in mtk_get_ib1_ts_mask()
1417 static inline u32 mtk_get_ib1_ppoe_mask(struct mtk_eth *eth) in mtk_get_ib1_ppoe_mask() argument
1419 if (mtk_is_netsys_v2_or_greater(eth)) in mtk_get_ib1_ppoe_mask()
1425 static inline u32 mtk_get_ib1_vlan_tag_mask(struct mtk_eth *eth) in mtk_get_ib1_vlan_tag_mask() argument
1427 if (mtk_is_netsys_v2_or_greater(eth)) in mtk_get_ib1_vlan_tag_mask()
1433 static inline u32 mtk_get_ib1_vlan_layer_mask(struct mtk_eth *eth) in mtk_get_ib1_vlan_layer_mask() argument
1435 if (mtk_is_netsys_v2_or_greater(eth)) in mtk_get_ib1_vlan_layer_mask()
1441 static inline u32 mtk_prep_ib1_vlan_layer(struct mtk_eth *eth, u32 val) in mtk_prep_ib1_vlan_layer() argument
1443 if (mtk_is_netsys_v2_or_greater(eth)) in mtk_prep_ib1_vlan_layer()
1449 static inline u32 mtk_get_ib1_vlan_layer(struct mtk_eth *eth, u32 val) in mtk_get_ib1_vlan_layer() argument
1451 if (mtk_is_netsys_v2_or_greater(eth)) in mtk_get_ib1_vlan_layer()
1457 static inline u32 mtk_get_ib1_pkt_type_mask(struct mtk_eth *eth) in mtk_get_ib1_pkt_type_mask() argument
1459 if (mtk_is_netsys_v2_or_greater(eth)) in mtk_get_ib1_pkt_type_mask()
1465 static inline u32 mtk_get_ib1_pkt_type(struct mtk_eth *eth, u32 val) in mtk_get_ib1_pkt_type() argument
1467 if (mtk_is_netsys_v2_or_greater(eth)) in mtk_get_ib1_pkt_type()
1473 static inline u32 mtk_get_ib2_multicast_mask(struct mtk_eth *eth) in mtk_get_ib2_multicast_mask() argument
1475 if (mtk_is_netsys_v2_or_greater(eth)) in mtk_get_ib2_multicast_mask()
1481 static inline bool mtk_interface_mode_is_xgmii(struct mtk_eth *eth, in mtk_interface_mode_is_xgmii() argument
1484 if (!mtk_is_netsys_v3_or_greater(eth)) in mtk_interface_mode_is_xgmii()
1501 void mtk_w32(struct mtk_eth *eth, u32 val, unsigned reg);
1502 u32 mtk_r32(struct mtk_eth *eth, unsigned reg);
1503 u32 mtk_m32(struct mtk_eth *eth, u32 mask, u32 set, unsigned int reg);
1505 int mtk_gmac_sgmii_path_setup(struct mtk_eth *eth, int mac_id);
1506 int mtk_gmac_2p5gphy_path_setup(struct mtk_eth *eth, int mac_id);
1507 int mtk_gmac_gephy_path_setup(struct mtk_eth *eth, int mac_id);
1508 int mtk_gmac_rgmii_path_setup(struct mtk_eth *eth, int mac_id);
1510 int mtk_eth_offload_init(struct mtk_eth *eth, u8 id);
1513 int mtk_flow_offload_cmd(struct mtk_eth *eth, struct flow_cls_offload *cls,
1515 void mtk_flow_offload_cleanup(struct mtk_eth *eth, struct list_head *list);
1516 void mtk_eth_set_dma_device(struct mtk_eth *eth, struct device *dma_dev);