Lines Matching full:eth
330 #define TX_DMA_PLEN0(x) (((x) & eth->soc->txrx.dma_max_len) << eth->soc->txrx.dma_len_offset)
331 #define TX_DMA_PLEN1(x) ((x) & eth->soc->txrx.dma_max_len)
351 #define RX_DMA_PREP_PLEN0(x) (((x) & eth->soc->txrx.dma_max_len) << eth->soc->txrx.dma_len_offset)
352 #define RX_DMA_GET_PLEN0(x) (((x) >> eth->soc->txrx.dma_len_offset) & eth->soc->txrx.dma_max_len)
1329 static inline bool mtk_is_netsys_v1(struct mtk_eth *eth) in mtk_is_netsys_v1() argument
1331 return eth->soc->version == 1; in mtk_is_netsys_v1()
1334 static inline bool mtk_is_netsys_v2_or_greater(struct mtk_eth *eth) in mtk_is_netsys_v2_or_greater() argument
1336 return eth->soc->version > 1; in mtk_is_netsys_v2_or_greater()
1339 static inline bool mtk_is_netsys_v3_or_greater(struct mtk_eth *eth) in mtk_is_netsys_v3_or_greater() argument
1341 return eth->soc->version > 2; in mtk_is_netsys_v3_or_greater()
1347 const struct mtk_soc_data *soc = ppe->eth->soc; in mtk_foe_get_entry()
1352 static inline u32 mtk_get_ib1_ts_mask(struct mtk_eth *eth) in mtk_get_ib1_ts_mask() argument
1354 if (mtk_is_netsys_v2_or_greater(eth)) in mtk_get_ib1_ts_mask()
1360 static inline u32 mtk_get_ib1_ppoe_mask(struct mtk_eth *eth) in mtk_get_ib1_ppoe_mask() argument
1362 if (mtk_is_netsys_v2_or_greater(eth)) in mtk_get_ib1_ppoe_mask()
1368 static inline u32 mtk_get_ib1_vlan_tag_mask(struct mtk_eth *eth) in mtk_get_ib1_vlan_tag_mask() argument
1370 if (mtk_is_netsys_v2_or_greater(eth)) in mtk_get_ib1_vlan_tag_mask()
1376 static inline u32 mtk_get_ib1_vlan_layer_mask(struct mtk_eth *eth) in mtk_get_ib1_vlan_layer_mask() argument
1378 if (mtk_is_netsys_v2_or_greater(eth)) in mtk_get_ib1_vlan_layer_mask()
1384 static inline u32 mtk_prep_ib1_vlan_layer(struct mtk_eth *eth, u32 val) in mtk_prep_ib1_vlan_layer() argument
1386 if (mtk_is_netsys_v2_or_greater(eth)) in mtk_prep_ib1_vlan_layer()
1392 static inline u32 mtk_get_ib1_vlan_layer(struct mtk_eth *eth, u32 val) in mtk_get_ib1_vlan_layer() argument
1394 if (mtk_is_netsys_v2_or_greater(eth)) in mtk_get_ib1_vlan_layer()
1400 static inline u32 mtk_get_ib1_pkt_type_mask(struct mtk_eth *eth) in mtk_get_ib1_pkt_type_mask() argument
1402 if (mtk_is_netsys_v2_or_greater(eth)) in mtk_get_ib1_pkt_type_mask()
1408 static inline u32 mtk_get_ib1_pkt_type(struct mtk_eth *eth, u32 val) in mtk_get_ib1_pkt_type() argument
1410 if (mtk_is_netsys_v2_or_greater(eth)) in mtk_get_ib1_pkt_type()
1416 static inline u32 mtk_get_ib2_multicast_mask(struct mtk_eth *eth) in mtk_get_ib2_multicast_mask() argument
1418 if (mtk_is_netsys_v2_or_greater(eth)) in mtk_get_ib2_multicast_mask()
1427 void mtk_w32(struct mtk_eth *eth, u32 val, unsigned reg);
1428 u32 mtk_r32(struct mtk_eth *eth, unsigned reg);
1429 u32 mtk_m32(struct mtk_eth *eth, u32 mask, u32 set, unsigned int reg);
1431 int mtk_gmac_sgmii_path_setup(struct mtk_eth *eth, int mac_id);
1432 int mtk_gmac_gephy_path_setup(struct mtk_eth *eth, int mac_id);
1433 int mtk_gmac_rgmii_path_setup(struct mtk_eth *eth, int mac_id);
1435 int mtk_eth_offload_init(struct mtk_eth *eth);
1438 int mtk_flow_offload_cmd(struct mtk_eth *eth, struct flow_cls_offload *cls,
1440 void mtk_flow_offload_cleanup(struct mtk_eth *eth, struct list_head *list);
1441 void mtk_eth_set_dma_device(struct mtk_eth *eth, struct device *dma_dev);