Lines Matching refs:mtk_eth

187 void mtk_w32(struct mtk_eth *eth, u32 val, unsigned reg)  in mtk_w32()
192 u32 mtk_r32(struct mtk_eth *eth, unsigned reg) in mtk_r32()
197 static u32 mtk_m32(struct mtk_eth *eth, u32 mask, u32 set, unsigned reg) in mtk_m32()
208 static int mtk_mdio_busy_wait(struct mtk_eth *eth) in mtk_mdio_busy_wait()
224 static int _mtk_mdio_write_c22(struct mtk_eth *eth, u32 phy_addr, u32 phy_reg, in _mtk_mdio_write_c22()
248 static int _mtk_mdio_write_c45(struct mtk_eth *eth, u32 phy_addr, in _mtk_mdio_write_c45()
284 static int _mtk_mdio_read_c22(struct mtk_eth *eth, u32 phy_addr, u32 phy_reg) in _mtk_mdio_read_c22()
306 static int _mtk_mdio_read_c45(struct mtk_eth *eth, u32 phy_addr, in _mtk_mdio_read_c45()
344 struct mtk_eth *eth = bus->priv; in mtk_mdio_write_c22()
352 struct mtk_eth *eth = bus->priv; in mtk_mdio_write_c45()
359 struct mtk_eth *eth = bus->priv; in mtk_mdio_read_c22()
367 struct mtk_eth *eth = bus->priv; in mtk_mdio_read_c45()
372 static int mt7621_gmac0_rgmii_adjust(struct mtk_eth *eth, in mt7621_gmac0_rgmii_adjust()
397 static void mtk_gmac0_rgmii_adjust(struct mtk_eth *eth, in mtk_gmac0_rgmii_adjust()
439 struct mtk_eth *eth = mac->hw; in mtk_mac_select_pcs()
458 struct mtk_eth *eth = mac->hw; in mtk_mac_config()
606 struct mtk_eth *eth = mac->hw; in mtk_mac_finish()
672 static void mtk_set_queue_speed(struct mtk_eth *eth, unsigned int idx, in mtk_set_queue_speed()
791 static int mtk_mdio_init(struct mtk_eth *eth) in mtk_mdio_init()
829 static void mtk_mdio_cleanup(struct mtk_eth *eth) in mtk_mdio_cleanup()
837 static inline void mtk_tx_irq_disable(struct mtk_eth *eth, u32 mask) in mtk_tx_irq_disable()
848 static inline void mtk_tx_irq_enable(struct mtk_eth *eth, u32 mask) in mtk_tx_irq_enable()
859 static inline void mtk_rx_irq_disable(struct mtk_eth *eth, u32 mask) in mtk_rx_irq_disable()
870 static inline void mtk_rx_irq_enable(struct mtk_eth *eth, u32 mask) in mtk_rx_irq_enable()
885 struct mtk_eth *eth = mac->hw; in mtk_set_mac_address()
916 struct mtk_eth *eth = mac->hw; in mtk_stats_update_mac()
966 static void mtk_stats_update(struct mtk_eth *eth) in mtk_stats_update()
1034 static bool mtk_rx_get_desc(struct mtk_eth *eth, struct mtk_rx_dma_v2 *rxd, in mtk_rx_get_desc()
1064 static int mtk_init_fq_dma(struct mtk_eth *eth) in mtk_init_fq_dma()
1142 static void mtk_tx_unmap(struct mtk_eth *eth, struct mtk_tx_buf *tx_buf, in mtk_tx_unmap()
1196 static void setup_tx_buf(struct mtk_eth *eth, struct mtk_tx_buf *tx_buf, in setup_tx_buf()
1223 struct mtk_eth *eth = mac->hw; in mtk_tx_set_dma_desc_v1()
1254 struct mtk_eth *eth = mac->hw; in mtk_tx_set_dma_desc_v2()
1291 struct mtk_eth *eth = mac->hw; in mtk_tx_set_dma_desc()
1314 struct mtk_eth *eth = mac->hw; in mtk_tx_map()
1453 static int mtk_cal_txd_req(struct mtk_eth *eth, struct sk_buff *skb) in mtk_cal_txd_req()
1471 static int mtk_queue_stopped(struct mtk_eth *eth) in mtk_queue_stopped()
1485 static void mtk_wake_queue(struct mtk_eth *eth) in mtk_wake_queue()
1499 struct mtk_eth *eth = mac->hw; in mtk_start_xmit()
1555 static struct mtk_rx_ring *mtk_get_rx_ring(struct mtk_eth *eth) in mtk_get_rx_ring()
1579 static void mtk_update_rx_cpu_idx(struct mtk_eth *eth) in mtk_update_rx_cpu_idx()
1598 static bool mtk_page_pool_enabled(struct mtk_eth *eth) in mtk_page_pool_enabled()
1603 static struct page_pool *mtk_create_page_pool(struct mtk_eth *eth, in mtk_create_page_pool()
1666 static int mtk_xdp_frame_map(struct mtk_eth *eth, struct net_device *dev, in mtk_xdp_frame_map()
1703 static int mtk_xdp_submit_frame(struct mtk_eth *eth, struct xdp_frame *xdpf, in mtk_xdp_submit_frame()
1828 struct mtk_eth *eth = mac->hw; in mtk_xdp_xmit()
1848 static u32 mtk_xdp_run(struct mtk_eth *eth, struct mtk_rx_ring *ring, in mtk_xdp_run()
1912 struct mtk_eth *eth) in mtk_poll_rx()
2137 mtk_poll_tx_done(struct mtk_eth *eth, struct mtk_poll_state *state, u8 mac, in mtk_poll_tx_done()
2167 static int mtk_poll_tx_qdma(struct mtk_eth *eth, int budget, in mtk_poll_tx_qdma()
2220 static int mtk_poll_tx_pdma(struct mtk_eth *eth, int budget, in mtk_poll_tx_pdma()
2258 static int mtk_poll_tx(struct mtk_eth *eth, int budget) in mtk_poll_tx()
2283 static void mtk_handle_status_irq(struct mtk_eth *eth) in mtk_handle_status_irq()
2296 struct mtk_eth *eth = container_of(napi, struct mtk_eth, tx_napi); in mtk_napi_tx()
2326 struct mtk_eth *eth = container_of(napi, struct mtk_eth, rx_napi); in mtk_napi_rx()
2359 static int mtk_tx_alloc(struct mtk_eth *eth) in mtk_tx_alloc()
2466 static void mtk_tx_clean(struct mtk_eth *eth) in mtk_tx_clean()
2494 static int mtk_rx_alloc(struct mtk_eth *eth, int ring_no, int rx_flag) in mtk_rx_alloc()
2622 static void mtk_rx_clean(struct mtk_eth *eth, struct mtk_rx_ring *ring) in mtk_rx_clean()
2660 static int mtk_hwlro_rx_init(struct mtk_eth *eth) in mtk_hwlro_rx_init()
2720 static void mtk_hwlro_rx_uninit(struct mtk_eth *eth) in mtk_hwlro_rx_uninit()
2746 static void mtk_hwlro_val_ipaddr(struct mtk_eth *eth, int idx, __be32 ip) in mtk_hwlro_val_ipaddr()
2761 static void mtk_hwlro_inval_ipaddr(struct mtk_eth *eth, int idx) in mtk_hwlro_inval_ipaddr()
2792 struct mtk_eth *eth = mac->hw; in mtk_hwlro_add_ipaddr()
2816 struct mtk_eth *eth = mac->hw; in mtk_hwlro_del_ipaddr()
2835 struct mtk_eth *eth = mac->hw; in mtk_hwlro_netdev_disable()
2915 struct mtk_eth *eth = mac->hw; in mtk_set_features()
2941 static int mtk_dma_busy_wait(struct mtk_eth *eth) in mtk_dma_busy_wait()
2961 static int mtk_dma_init(struct mtk_eth *eth) in mtk_dma_init()
3015 static void mtk_dma_free(struct mtk_eth *eth) in mtk_dma_free()
3043 static bool mtk_hw_reset_check(struct mtk_eth *eth) in mtk_hw_reset_check()
3055 struct mtk_eth *eth = mac->hw; in mtk_tx_timeout()
3071 struct mtk_eth *eth = _eth; in mtk_handle_irq_rx()
3084 struct mtk_eth *eth = _eth; in mtk_handle_irq_tx()
3097 struct mtk_eth *eth = _eth; in mtk_handle_irq()
3118 struct mtk_eth *eth = mac->hw; in mtk_poll_controller()
3128 static int mtk_start_dma(struct mtk_eth *eth) in mtk_start_dma()
3167 static void mtk_gdm_config(struct mtk_eth *eth, u32 config) in mtk_gdm_config()
3209 struct mtk_eth *eth = mac->hw; in mtk_device_event()
3248 struct mtk_eth *eth = mac->hw; in mtk_open()
3316 static void mtk_stop_dma(struct mtk_eth *eth, u32 glo_cfg) in mtk_stop_dma()
3342 struct mtk_eth *eth = mac->hw; in mtk_stop()
3381 struct mtk_eth *eth = mac->hw; in mtk_xdp_setup()
3419 static void ethsys_reset(struct mtk_eth *eth, u32 reset_bits) in ethsys_reset()
3432 static void mtk_clk_disable(struct mtk_eth *eth) in mtk_clk_disable()
3440 static int mtk_clk_enable(struct mtk_eth *eth) in mtk_clk_enable()
3462 struct mtk_eth *eth = container_of(dim, struct mtk_eth, rx_dim); in mtk_dim_rx()
3493 struct mtk_eth *eth = container_of(dim, struct mtk_eth, tx_dim); in mtk_dim_tx()
3523 struct mtk_eth *eth = mac->hw; in mtk_set_mcr_max_rx()
3545 static void mtk_hw_reset(struct mtk_eth *eth) in mtk_hw_reset()
3566 static u32 mtk_hw_reset_read(struct mtk_eth *eth) in mtk_hw_reset_read()
3574 static void mtk_hw_warm_reset(struct mtk_eth *eth) in mtk_hw_warm_reset()
3613 static bool mtk_hw_check_dma_hang(struct mtk_eth *eth) in mtk_hw_check_dma_hang()
3694 struct mtk_eth *eth = container_of(del_work, struct mtk_eth, in mtk_hw_reset_monitor_work()
3709 static int mtk_hw_init(struct mtk_eth *eth, bool reset) in mtk_hw_init()
3867 static int mtk_hw_deinit(struct mtk_eth *eth) in mtk_hw_deinit()
3883 struct mtk_eth *eth = mac->hw; in mtk_init()
3900 struct mtk_eth *eth = mac->hw; in mtk_uninit()
3911 struct mtk_eth *eth = mac->hw; in mtk_change_mtu()
3941 static void mtk_prepare_for_reset(struct mtk_eth *eth) in mtk_prepare_for_reset()
3968 struct mtk_eth *eth = container_of(work, struct mtk_eth, pending_work); in mtk_pending_work()
4024 static int mtk_free_dev(struct mtk_eth *eth) in mtk_free_dev()
4043 static int mtk_unreg_dev(struct mtk_eth *eth) in mtk_unreg_dev()
4060 static int mtk_cleanup(struct mtk_eth *eth) in mtk_cleanup()
4166 static void mtk_ethtool_pp_stats(struct mtk_eth *eth, u64 *data) in mtk_ethtool_pp_stats()
4325 static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np) in mtk_add_mac()
4468 void mtk_eth_set_dma_device(struct mtk_eth *eth, struct device *dma_dev) in mtk_eth_set_dma_device()
4501 struct mtk_eth *eth; in mtk_probe()
4749 struct mtk_eth *eth = platform_get_drvdata(pdev); in mtk_remove()