/linux/drivers/net/ethernet/mediatek/ |
H A D | mtk_eth_path.c | 18 int (*set_path)(struct mtk_eth *eth, u64 path); 43 static int set_mux_gdm1_to_gmac1_esw(struct mtk_eth *eth, u64 path) in set_mux_gdm1_to_gmac1_esw() 76 static int set_mux_gmac2_gmac0_to_gephy(struct mtk_eth *eth, u64 path) in set_mux_gmac2_gmac0_to_gephy() 99 static int set_mux_u3_gmac2_to_qphy(struct mtk_eth *eth, u64 path) in set_mux_u3_gmac2_to_qphy() 130 static int set_mux_gmac1_gmac2_to_sgmii_rgmii(struct mtk_eth *eth, u64 path) in set_mux_gmac1_gmac2_to_sgmii_rgmii() 168 static int set_mux_gmac12_to_gephy_sgmii(struct mtk_eth *eth, u64 path) in set_mux_gmac12_to_gephy_sgmii() 223 static int mtk_eth_mux_setup(struct mtk_eth *eth, u64 path) in mtk_eth_mux_setup() 252 int mtk_gmac_sgmii_path_setup(struct mtk_eth *eth, int mac_id) in mtk_gmac_sgmii_path_setup() 263 int mtk_gmac_gephy_path_setup(struct mtk_eth *eth, int mac_id) in mtk_gmac_gephy_path_setup() 277 int mtk_gmac_rgmii_path_setup(struct mtk_eth *eth, int mac_id) in mtk_gmac_rgmii_path_setup()
|
H A D | mtk_ppe.h | 325 struct mtk_eth *eth; 346 struct mtk_ppe *mtk_ppe_init(struct mtk_eth *eth, void __iomem *base, int index); 348 void mtk_ppe_deinit(struct mtk_eth *eth); 375 int mtk_foe_entry_prepare(struct mtk_eth *eth, struct mtk_foe_entry *entry, 378 int mtk_foe_entry_set_pse_port(struct mtk_eth *eth, 380 int mtk_foe_entry_set_ipv4_tuple(struct mtk_eth *eth, 384 int mtk_foe_entry_set_ipv6_tuple(struct mtk_eth *eth, 388 int mtk_foe_entry_set_dsa(struct mtk_eth *eth, struct mtk_foe_entry *entry, 390 int mtk_foe_entry_set_vlan(struct mtk_eth *eth, struct mtk_foe_entry *entry, 392 int mtk_foe_entry_set_pppoe(struct mtk_eth *eth, struct mtk_foe_entry *entry, [all …]
|
H A D | Makefile | 6 obj-$(CONFIG_NET_MEDIATEK_SOC) += mtk_eth.o 7 mtk_eth-y := mtk_eth_soc.o mtk_eth_path.o mtk_ppe.o mtk_ppe_debugfs.o mtk_ppe_offload.o 8 mtk_eth-$(CONFIG_NET_MEDIATEK_SOC_WED) += mtk_wed.o mtk_wed_mcu.o mtk_wed_wo.o 10 mtk_eth-$(CONFIG_NET_MEDIATEK_SOC_WED) += mtk_wed_debugfs.o
|
H A D | mtk_eth_soc.c | 292 void mtk_w32(struct mtk_eth *eth, u32 val, unsigned reg) in mtk_w32() 297 u32 mtk_r32(struct mtk_eth *eth, unsigned reg) in mtk_r32() 302 u32 mtk_m32(struct mtk_eth *eth, u32 mask, u32 set, unsigned int reg) in mtk_m32() 313 static int mtk_mdio_busy_wait(struct mtk_eth *eth) in mtk_mdio_busy_wait() 329 static int _mtk_mdio_write_c22(struct mtk_eth *eth, u32 phy_addr, u32 phy_reg, in _mtk_mdio_write_c22() 353 static int _mtk_mdio_write_c45(struct mtk_eth *eth, u32 phy_addr, in _mtk_mdio_write_c45() 389 static int _mtk_mdio_read_c22(struct mtk_eth *eth, u32 phy_addr, u32 phy_reg) in _mtk_mdio_read_c22() 411 static int _mtk_mdio_read_c45(struct mtk_eth *eth, u32 phy_addr, in _mtk_mdio_read_c45() 449 struct mtk_eth *eth = bus->priv; in mtk_mdio_write_c22() 457 struct mtk_eth *eth = bus->priv; in mtk_mdio_write_c45() [all …]
|
H A D | mtk_eth_soc.h | 642 struct mtk_eth; 1232 struct mtk_eth { struct 1314 struct mtk_eth *hw; argument 1325 static inline bool mtk_is_netsys_v1(struct mtk_eth *eth) in mtk_is_netsys_v1() 1330 static inline bool mtk_is_netsys_v2_or_greater(struct mtk_eth *eth) in mtk_is_netsys_v2_or_greater() 1335 static inline bool mtk_is_netsys_v3_or_greater(struct mtk_eth *eth) in mtk_is_netsys_v3_or_greater() 1348 static inline u32 mtk_get_ib1_ts_mask(struct mtk_eth *eth) in mtk_get_ib1_ts_mask() 1356 static inline u32 mtk_get_ib1_ppoe_mask(struct mtk_eth *eth) in mtk_get_ib1_ppoe_mask() 1364 static inline u32 mtk_get_ib1_vlan_tag_mask(struct mtk_eth *eth) in mtk_get_ib1_vlan_tag_mask() 1372 static inline u32 mtk_get_ib1_vlan_layer_mask(struct mtk_eth *eth) in mtk_get_ib1_vlan_layer_mask() [all …]
|
H A D | mtk_ppe_offload.c | 55 mtk_flow_set_ipv4_addr(struct mtk_eth *eth, struct mtk_foe_entry *foe, in mtk_flow_set_ipv4_addr() 64 mtk_flow_set_ipv6_addr(struct mtk_eth *eth, struct mtk_foe_entry *foe, in mtk_flow_set_ipv6_addr() 187 mtk_flow_set_output_device(struct mtk_eth *eth, struct mtk_foe_entry *foe, in mtk_flow_set_output_device() 244 mtk_flow_offload_replace(struct mtk_eth *eth, struct flow_cls_offload *f, in mtk_flow_offload_replace() 500 mtk_flow_offload_destroy(struct mtk_eth *eth, struct flow_cls_offload *f) in mtk_flow_offload_destroy() 520 mtk_flow_offload_stats(struct mtk_eth *eth, struct flow_cls_offload *f) in mtk_flow_offload_stats() 546 int mtk_flow_offload_cmd(struct mtk_eth *eth, struct flow_cls_offload *cls, in mtk_flow_offload_cmd() 577 struct mtk_eth *eth; in mtk_eth_setup_tc_block_cb() 595 struct mtk_eth *eth = mac->hw; in mtk_eth_setup_tc_block() 651 int mtk_eth_offload_init(struct mtk_eth *eth, u8 id) in mtk_eth_offload_init()
|
H A D | mtk_ppe.c | 61 static u32 mtk_eth_timestamp(struct mtk_eth *eth) in mtk_eth_timestamp() 144 static u32 mtk_ppe_hash_entry(struct mtk_eth *eth, struct mtk_foe_entry *e) in mtk_ppe_hash_entry() 185 mtk_foe_entry_l2(struct mtk_eth *eth, struct mtk_foe_entry *entry) in mtk_foe_entry_l2() 199 mtk_foe_entry_ib2(struct mtk_eth *eth, struct mtk_foe_entry *entry) in mtk_foe_entry_ib2() 212 int mtk_foe_entry_prepare(struct mtk_eth *eth, struct mtk_foe_entry *entry, in mtk_foe_entry_prepare() 279 int mtk_foe_entry_set_pse_port(struct mtk_eth *eth, in mtk_foe_entry_set_pse_port() 297 int mtk_foe_entry_set_ipv4_tuple(struct mtk_eth *eth, in mtk_foe_entry_set_ipv4_tuple() 337 int mtk_foe_entry_set_ipv6_tuple(struct mtk_eth *eth, in mtk_foe_entry_set_ipv6_tuple() 370 int mtk_foe_entry_set_dsa(struct mtk_eth *eth, struct mtk_foe_entry *entry, in mtk_foe_entry_set_dsa() 387 int mtk_foe_entry_set_vlan(struct mtk_eth *eth, struct mtk_foe_entry *entry, in mtk_foe_entry_set_vlan() [all …]
|
H A D | mtk_wed.h | 14 struct mtk_eth; 36 struct mtk_eth *eth; 182 void mtk_wed_add_hw(struct device_node *np, struct mtk_eth *eth, 192 mtk_wed_add_hw(struct device_node *np, struct mtk_eth *eth, in mtk_wed_add_hw()
|
H A D | mtk_wed.c | 1963 struct mtk_eth *eth = dev->hw->eth; in mtk_wed_ppe_check() 2688 struct mtk_eth *eth = hw->eth; in mtk_wed_setup_tc_block() 2759 void mtk_wed_add_hw(struct device_node *np, struct mtk_eth *eth, in mtk_wed_add_hw()
|