Lines Matching refs:mtk_eth

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()
464 struct mtk_eth *eth = bus->priv; in mtk_mdio_read_c22()
472 struct mtk_eth *eth = bus->priv; in mtk_mdio_read_c45()
477 static int mt7621_gmac0_rgmii_adjust(struct mtk_eth *eth, in mt7621_gmac0_rgmii_adjust()
491 static void mtk_gmac0_rgmii_adjust(struct mtk_eth *eth, in mtk_gmac0_rgmii_adjust()
507 static void mtk_setup_bridge_switch(struct mtk_eth *eth) in mtk_setup_bridge_switch()
525 struct mtk_eth *eth = mac->hw; in mtk_mac_select_pcs()
544 struct mtk_eth *eth = mac->hw; in mtk_mac_config()
676 struct mtk_eth *eth = mac->hw; in mtk_mac_finish()
709 static void mtk_set_queue_speed(struct mtk_eth *eth, unsigned int idx, in mtk_set_queue_speed()
826 static int mtk_mdio_init(struct mtk_eth *eth) in mtk_mdio_init()
889 static void mtk_mdio_cleanup(struct mtk_eth *eth) in mtk_mdio_cleanup()
897 static inline void mtk_tx_irq_disable(struct mtk_eth *eth, u32 mask) in mtk_tx_irq_disable()
908 static inline void mtk_tx_irq_enable(struct mtk_eth *eth, u32 mask) in mtk_tx_irq_enable()
919 static inline void mtk_rx_irq_disable(struct mtk_eth *eth, u32 mask) in mtk_rx_irq_disable()
930 static inline void mtk_rx_irq_enable(struct mtk_eth *eth, u32 mask) in mtk_rx_irq_enable()
945 struct mtk_eth *eth = mac->hw; in mtk_set_mac_address()
976 struct mtk_eth *eth = mac->hw; in mtk_stats_update_mac()
1041 static void mtk_stats_update(struct mtk_eth *eth) in mtk_stats_update()
1109 static bool mtk_rx_get_desc(struct mtk_eth *eth, struct mtk_rx_dma_v2 *rxd, in mtk_rx_get_desc()
1139 static int mtk_init_fq_dma(struct mtk_eth *eth) in mtk_init_fq_dma()
1229 static void mtk_tx_unmap(struct mtk_eth *eth, struct mtk_tx_buf *tx_buf, in mtk_tx_unmap()
1283 static void setup_tx_buf(struct mtk_eth *eth, struct mtk_tx_buf *tx_buf, in setup_tx_buf()
1310 struct mtk_eth *eth = mac->hw; in mtk_tx_set_dma_desc_v1()
1341 struct mtk_eth *eth = mac->hw; in mtk_tx_set_dma_desc_v2()
1396 struct mtk_eth *eth = mac->hw; in mtk_tx_set_dma_desc()
1419 struct mtk_eth *eth = mac->hw; in mtk_tx_map()
1556 static int mtk_cal_txd_req(struct mtk_eth *eth, struct sk_buff *skb) in mtk_cal_txd_req()
1574 static int mtk_queue_stopped(struct mtk_eth *eth) in mtk_queue_stopped()
1588 static void mtk_wake_queue(struct mtk_eth *eth) in mtk_wake_queue()
1602 struct mtk_eth *eth = mac->hw; in mtk_start_xmit()
1658 static struct mtk_rx_ring *mtk_get_rx_ring(struct mtk_eth *eth) in mtk_get_rx_ring()
1682 static void mtk_update_rx_cpu_idx(struct mtk_eth *eth) in mtk_update_rx_cpu_idx()
1701 static bool mtk_page_pool_enabled(struct mtk_eth *eth) in mtk_page_pool_enabled()
1706 static struct page_pool *mtk_create_page_pool(struct mtk_eth *eth, in mtk_create_page_pool()
1769 static int mtk_xdp_frame_map(struct mtk_eth *eth, struct net_device *dev, in mtk_xdp_frame_map()
1806 static int mtk_xdp_submit_frame(struct mtk_eth *eth, struct xdp_frame *xdpf, in mtk_xdp_submit_frame()
1931 struct mtk_eth *eth = mac->hw; in mtk_xdp_xmit()
1951 static u32 mtk_xdp_run(struct mtk_eth *eth, struct mtk_rx_ring *ring, in mtk_xdp_run()
2015 struct mtk_eth *eth) in mtk_poll_rx()
2246 mtk_poll_tx_done(struct mtk_eth *eth, struct mtk_poll_state *state, u8 mac, in mtk_poll_tx_done()
2276 static int mtk_poll_tx_qdma(struct mtk_eth *eth, int budget, in mtk_poll_tx_qdma()
2326 static int mtk_poll_tx_pdma(struct mtk_eth *eth, int budget, in mtk_poll_tx_pdma()
2364 static int mtk_poll_tx(struct mtk_eth *eth, int budget) in mtk_poll_tx()
2389 static void mtk_handle_status_irq(struct mtk_eth *eth) in mtk_handle_status_irq()
2402 struct mtk_eth *eth = container_of(napi, struct mtk_eth, tx_napi); in mtk_napi_tx()
2432 struct mtk_eth *eth = container_of(napi, struct mtk_eth, rx_napi); in mtk_napi_rx()
2465 static int mtk_tx_alloc(struct mtk_eth *eth) in mtk_tx_alloc()
2578 static void mtk_tx_clean(struct mtk_eth *eth) in mtk_tx_clean()
2605 static int mtk_rx_alloc(struct mtk_eth *eth, int ring_no, int rx_flag) in mtk_rx_alloc()
2753 static void mtk_rx_clean(struct mtk_eth *eth, struct mtk_rx_ring *ring, bool in_sram) in mtk_rx_clean()
2795 static int mtk_hwlro_rx_init(struct mtk_eth *eth) in mtk_hwlro_rx_init()
2855 static void mtk_hwlro_rx_uninit(struct mtk_eth *eth) in mtk_hwlro_rx_uninit()
2881 static void mtk_hwlro_val_ipaddr(struct mtk_eth *eth, int idx, __be32 ip) in mtk_hwlro_val_ipaddr()
2896 static void mtk_hwlro_inval_ipaddr(struct mtk_eth *eth, int idx) in mtk_hwlro_inval_ipaddr()
2927 struct mtk_eth *eth = mac->hw; in mtk_hwlro_add_ipaddr()
2951 struct mtk_eth *eth = mac->hw; in mtk_hwlro_del_ipaddr()
2970 struct mtk_eth *eth = mac->hw; in mtk_hwlro_netdev_disable()
3061 static int mtk_dma_busy_wait(struct mtk_eth *eth) in mtk_dma_busy_wait()
3081 static int mtk_dma_init(struct mtk_eth *eth) in mtk_dma_init()
3135 static void mtk_dma_free(struct mtk_eth *eth) in mtk_dma_free()
3166 static bool mtk_hw_reset_check(struct mtk_eth *eth) in mtk_hw_reset_check()
3178 struct mtk_eth *eth = mac->hw; in mtk_tx_timeout()
3194 struct mtk_eth *eth = _eth; in mtk_handle_irq_rx()
3207 struct mtk_eth *eth = _eth; in mtk_handle_irq_tx()
3220 struct mtk_eth *eth = _eth; in mtk_handle_irq()
3241 struct mtk_eth *eth = mac->hw; in mtk_poll_controller()
3251 static int mtk_start_dma(struct mtk_eth *eth) in mtk_start_dma()
3290 static void mtk_gdm_config(struct mtk_eth *eth, u32 id, u32 config) in mtk_gdm_config()
3327 struct mtk_eth *eth = mac->hw; in mtk_device_event()
3369 struct mtk_eth *eth = mac->hw; in mtk_open()
3466 static void mtk_stop_dma(struct mtk_eth *eth, u32 glo_cfg) in mtk_stop_dma()
3492 struct mtk_eth *eth = mac->hw; in mtk_stop()
3532 struct mtk_eth *eth = mac->hw; in mtk_xdp_setup()
3570 static void ethsys_reset(struct mtk_eth *eth, u32 reset_bits) in ethsys_reset()
3583 static void mtk_clk_disable(struct mtk_eth *eth) in mtk_clk_disable()
3591 static int mtk_clk_enable(struct mtk_eth *eth) in mtk_clk_enable()
3613 struct mtk_eth *eth = container_of(dim, struct mtk_eth, rx_dim); in mtk_dim_rx()
3644 struct mtk_eth *eth = container_of(dim, struct mtk_eth, tx_dim); in mtk_dim_tx()
3674 struct mtk_eth *eth = mac->hw; in mtk_set_mcr_max_rx()
3696 static void mtk_hw_reset(struct mtk_eth *eth) in mtk_hw_reset()
3732 static u32 mtk_hw_reset_read(struct mtk_eth *eth) in mtk_hw_reset_read()
3740 static void mtk_hw_warm_reset(struct mtk_eth *eth) in mtk_hw_warm_reset()
3787 static bool mtk_hw_check_dma_hang(struct mtk_eth *eth) in mtk_hw_check_dma_hang()
3868 struct mtk_eth *eth = container_of(del_work, struct mtk_eth, in mtk_hw_reset_monitor_work()
3883 static int mtk_hw_init(struct mtk_eth *eth, bool reset) in mtk_hw_init()
4057 static int mtk_hw_deinit(struct mtk_eth *eth) in mtk_hw_deinit()
4073 struct mtk_eth *eth = mac->hw; in mtk_uninit()
4084 struct mtk_eth *eth = mac->hw; in mtk_change_mtu()
4114 static void mtk_prepare_for_reset(struct mtk_eth *eth) in mtk_prepare_for_reset()
4147 struct mtk_eth *eth = container_of(work, struct mtk_eth, pending_work); in mtk_pending_work()
4210 static int mtk_free_dev(struct mtk_eth *eth) in mtk_free_dev()
4229 static int mtk_unreg_dev(struct mtk_eth *eth) in mtk_unreg_dev()
4246 static void mtk_sgmii_destroy(struct mtk_eth *eth) in mtk_sgmii_destroy()
4254 static int mtk_cleanup(struct mtk_eth *eth) in mtk_cleanup()
4361 static void mtk_ethtool_pp_stats(struct mtk_eth *eth, u64 *data) in mtk_ethtool_pp_stats()
4535 static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np) in mtk_add_mac()
4718 void mtk_eth_set_dma_device(struct mtk_eth *eth, struct device *dma_dev) in mtk_eth_set_dma_device()
4747 static int mtk_sgmii_init(struct mtk_eth *eth) in mtk_sgmii_init()
4781 struct mtk_eth *eth; in mtk_probe()
5072 struct mtk_eth *eth = platform_get_drvdata(pdev); in mtk_remove()