| H A D | mtk_eth_soc.c | 1 // SPDX-License-Identifier: GPL-2.0-only 4 * Copyright (C) 2009-2016 John Crispin <blogic@openwrt.org> 5 * Copyright (C) 2009-2016 Felix Fietkau <nbd@openwrt.org> 6 * Copyright (C) 2013-2016 Michael Lee <igvtee@gmail.com> 24 #include <linux/pcs/pcs-mtk-lynxi.h> 35 static int mtk_msg_level = - 289 mtk_w32(struct mtk_eth * eth,u32 val,unsigned reg) mtk_w32() argument 294 mtk_r32(struct mtk_eth * eth,unsigned reg) mtk_r32() argument 299 mtk_m32(struct mtk_eth * eth,u32 mask,u32 set,unsigned int reg) mtk_m32() argument 310 mtk_mdio_busy_wait(struct mtk_eth * eth) mtk_mdio_busy_wait() argument 326 _mtk_mdio_write_c22(struct mtk_eth * eth,u32 phy_addr,u32 phy_reg,u32 write_data) _mtk_mdio_write_c22() argument 350 _mtk_mdio_write_c45(struct mtk_eth * eth,u32 phy_addr,u32 devad,u32 phy_reg,u32 write_data) _mtk_mdio_write_c45() argument 386 _mtk_mdio_read_c22(struct mtk_eth * eth,u32 phy_addr,u32 phy_reg) _mtk_mdio_read_c22() argument 408 _mtk_mdio_read_c45(struct mtk_eth * eth,u32 phy_addr,u32 devad,u32 phy_reg) _mtk_mdio_read_c45() argument 446 struct mtk_eth *eth = bus->priv; mtk_mdio_write_c22() local 454 struct mtk_eth *eth = bus->priv; mtk_mdio_write_c45() local 461 struct mtk_eth *eth = bus->priv; mtk_mdio_read_c22() local 469 struct mtk_eth *eth = bus->priv; mtk_mdio_read_c45() local 474 mt7621_gmac0_rgmii_adjust(struct mtk_eth * eth,phy_interface_t interface) mt7621_gmac0_rgmii_adjust() argument 488 mtk_gmac0_rgmii_adjust(struct mtk_eth * eth,phy_interface_t interface) mtk_gmac0_rgmii_adjust() argument 504 mtk_setup_bridge_switch(struct mtk_eth * eth) mtk_setup_bridge_switch() argument 522 struct mtk_eth *eth = mac->hw; mtk_mac_select_pcs() local 541 struct mtk_eth *eth = mac->hw; mtk_mac_prepare() local 561 struct mtk_eth *eth = mac->hw; mtk_mac_config() local 697 struct mtk_eth *eth = mac->hw; mtk_mac_finish() local 739 mtk_set_queue_speed(struct mtk_eth * eth,unsigned int idx,int speed) mtk_set_queue_speed() argument 901 struct mtk_eth *eth = mac->hw; mtk_mac_disable_tx_lpi() local 911 struct mtk_eth *eth = mac->hw; mtk_mac_enable_tx_lpi() local 981 mtk_mdio_config(struct mtk_eth * eth) mtk_mdio_config() argument 997 mtk_mdio_init(struct mtk_eth * eth) mtk_mdio_init() argument 1044 mtk_mdio_cleanup(struct mtk_eth * eth) mtk_mdio_cleanup() argument 1052 mtk_tx_irq_disable(struct mtk_eth * eth,u32 mask) mtk_tx_irq_disable() argument 1063 mtk_tx_irq_enable(struct mtk_eth * eth,u32 mask) mtk_tx_irq_enable() argument 1074 mtk_rx_irq_disable(struct mtk_eth * eth,u32 mask) mtk_rx_irq_disable() argument 1085 mtk_rx_irq_enable(struct mtk_eth * eth,u32 mask) mtk_rx_irq_enable() argument 1100 struct mtk_eth *eth = mac->hw; mtk_set_mac_address() local 1131 struct mtk_eth *eth = mac->hw; mtk_stats_update_mac() local 1196 mtk_stats_update(struct mtk_eth * eth) mtk_stats_update() argument 1264 mtk_rx_get_desc(struct mtk_eth * eth,struct mtk_rx_dma_v2 * rxd,struct mtk_rx_dma_v2 * dma_rxd) mtk_rx_get_desc() argument 1293 mtk_dma_ring_alloc(struct mtk_eth * eth,size_t size,dma_addr_t * dma_handle,bool use_sram) mtk_dma_ring_alloc() argument 1312 mtk_dma_ring_free(struct mtk_eth * eth,size_t size,void * dma_ring,dma_addr_t dma_handle,bool in_sram) mtk_dma_ring_free() argument 1322 mtk_init_fq_dma(struct mtk_eth * eth) mtk_init_fq_dma() argument 1407 mtk_tx_unmap(struct mtk_eth * eth,struct mtk_tx_buf * tx_buf,struct xdp_frame_bulk * bq,bool napi) mtk_tx_unmap() argument 1461 setup_tx_buf(struct mtk_eth * eth,struct mtk_tx_buf * tx_buf,struct mtk_tx_dma * txd,dma_addr_t mapped_addr,size_t size,int idx) setup_tx_buf() argument 1488 struct mtk_eth *eth = mac->hw; mtk_tx_set_dma_desc_v1() local 1519 struct mtk_eth *eth = mac->hw; mtk_tx_set_dma_desc_v2() local 1574 struct mtk_eth *eth = mac->hw; mtk_tx_set_dma_desc() local 1597 struct mtk_eth *eth = mac->hw; mtk_tx_map() local 1734 mtk_cal_txd_req(struct mtk_eth * eth,struct sk_buff * skb) mtk_cal_txd_req() argument 1752 mtk_queue_stopped(struct mtk_eth * eth) mtk_queue_stopped() argument 1766 mtk_wake_queue(struct mtk_eth * eth) mtk_wake_queue() argument 1780 struct mtk_eth *eth = mac->hw; mtk_start_xmit() local 1844 mtk_get_rx_ring(struct mtk_eth * eth) mtk_get_rx_ring() argument 1868 mtk_update_rx_cpu_idx(struct mtk_eth * eth) mtk_update_rx_cpu_idx() argument 1887 mtk_page_pool_enabled(struct mtk_eth * eth) mtk_page_pool_enabled() argument 1892 mtk_create_page_pool(struct mtk_eth * eth,struct xdp_rxq_info * xdp_q,int id,int size) mtk_create_page_pool() argument 1955 mtk_xdp_frame_map(struct mtk_eth * eth,struct net_device * dev,struct mtk_tx_dma_desc_info * txd_info,struct mtk_tx_dma * txd,struct mtk_tx_buf * tx_buf,void * data,u16 headroom,int index,bool dma_map) mtk_xdp_frame_map() argument 1992 mtk_xdp_submit_frame(struct mtk_eth * eth,struct xdp_frame * xdpf,struct net_device * dev,bool dma_map) mtk_xdp_submit_frame() argument 2117 struct mtk_eth *eth = mac->hw; mtk_xdp_xmit() local 2137 mtk_xdp_run(struct mtk_eth * eth,struct mtk_rx_ring * ring,struct xdp_buff * xdp,struct net_device * dev) mtk_xdp_run() argument 2201 mtk_poll_rx(struct napi_struct * napi,int budget,struct mtk_eth * eth) mtk_poll_rx() argument 2439 mtk_poll_tx_done(struct mtk_eth * eth,struct mtk_poll_state * state,u8 mac,struct sk_buff * skb) mtk_poll_tx_done() argument 2469 mtk_poll_tx_qdma(struct mtk_eth * eth,int budget,struct mtk_poll_state * state) mtk_poll_tx_qdma() argument 2519 mtk_poll_tx_pdma(struct mtk_eth * eth,int budget,struct mtk_poll_state * state) mtk_poll_tx_pdma() argument 2557 mtk_poll_tx(struct mtk_eth * eth,int budget) mtk_poll_tx() argument 2582 mtk_handle_status_irq(struct mtk_eth * eth) mtk_handle_status_irq() argument 2595 struct mtk_eth *eth = container_of(napi, struct mtk_eth, tx_napi); mtk_napi_tx() local 2625 struct mtk_eth *eth = container_of(napi, struct mtk_eth, rx_napi); mtk_napi_rx() local 2658 mtk_tx_alloc(struct mtk_eth * eth) mtk_tx_alloc() argument 2763 mtk_tx_clean(struct mtk_eth * eth) mtk_tx_clean() argument 2790 mtk_rx_alloc(struct mtk_eth * eth,int ring_no,int rx_flag) mtk_rx_alloc() argument 2923 mtk_rx_clean(struct mtk_eth * eth,struct mtk_rx_ring * ring,bool in_sram) mtk_rx_clean() argument 2964 mtk_hwlro_rx_init(struct mtk_eth * eth) mtk_hwlro_rx_init() argument 3024 mtk_hwlro_rx_uninit(struct mtk_eth * eth) mtk_hwlro_rx_uninit() argument 3050 mtk_hwlro_val_ipaddr(struct mtk_eth * eth,int idx,__be32 ip) mtk_hwlro_val_ipaddr() argument 3065 mtk_hwlro_inval_ipaddr(struct mtk_eth * eth,int idx) mtk_hwlro_inval_ipaddr() argument 3096 struct mtk_eth *eth = mac->hw; mtk_hwlro_add_ipaddr() local 3120 struct mtk_eth *eth = mac->hw; mtk_hwlro_del_ipaddr() local 3139 struct mtk_eth *eth = mac->hw; mtk_hwlro_netdev_disable() local 3230 mtk_dma_busy_wait(struct mtk_eth * eth) mtk_dma_busy_wait() argument 3250 mtk_dma_init(struct mtk_eth * eth) mtk_dma_init() argument 3304 mtk_dma_free(struct mtk_eth * eth) mtk_dma_free() argument 3344 mtk_hw_reset_check(struct mtk_eth * eth) mtk_hw_reset_check() argument 3356 struct mtk_eth *eth = mac->hw; mtk_tx_timeout() local 3370 mtk_get_irqs(struct platform_device * pdev,struct mtk_eth * eth) mtk_get_irqs() argument 3419 struct mtk_eth *eth = _eth; mtk_handle_irq_rx() local 3432 struct mtk_eth *eth = _eth; mtk_handle_irq_tx() local 3445 struct mtk_eth *eth = _eth; mtk_handle_irq() local 3466 struct mtk_eth *eth = mac->hw; mtk_poll_controller() local 3476 mtk_start_dma(struct mtk_eth * eth) mtk_start_dma() argument 3515 mtk_gdm_config(struct mtk_eth * eth,u32 id,u32 config) mtk_gdm_config() argument 3552 struct mtk_eth *eth = mac->hw; mtk_device_event() local 3591 mtk_max_gmac_mtu(struct mtk_eth * eth) mtk_max_gmac_mtu() argument 3605 struct mtk_eth *eth = mac->hw; mtk_open() local 3703 mtk_stop_dma(struct mtk_eth * eth,u32 glo_cfg) mtk_stop_dma() argument 3729 struct mtk_eth *eth = mac->hw; mtk_stop() local 3769 struct mtk_eth *eth = mac->hw; mtk_xdp_setup() local 3816 ethsys_reset(struct mtk_eth * eth,u32 reset_bits) ethsys_reset() argument 3829 mtk_clk_disable(struct mtk_eth * eth) mtk_clk_disable() argument 3837 mtk_clk_enable(struct mtk_eth * eth) mtk_clk_enable() argument 3859 struct mtk_eth *eth = container_of(dim, struct mtk_eth, rx_dim); mtk_dim_rx() local 3890 struct mtk_eth *eth = container_of(dim, struct mtk_eth, tx_dim); mtk_dim_tx() local 3920 struct mtk_eth *eth = mac->hw; mtk_set_mcr_max_rx() local 3942 mtk_hw_reset(struct mtk_eth * eth) mtk_hw_reset() argument 3978 mtk_hw_reset_read(struct mtk_eth * eth) mtk_hw_reset_read() argument 3986 mtk_hw_warm_reset(struct mtk_eth * eth) mtk_hw_warm_reset() argument 4033 mtk_hw_check_dma_hang(struct mtk_eth * eth) mtk_hw_check_dma_hang() argument 4114 struct mtk_eth *eth = container_of(del_work, struct mtk_eth, mtk_hw_reset_monitor_work() local 4129 mtk_hw_init(struct mtk_eth * eth,bool reset) mtk_hw_init() argument 4323 mtk_hw_deinit(struct mtk_eth * eth) mtk_hw_deinit() argument 4339 struct mtk_eth *eth = mac->hw; mtk_uninit() local 4350 struct mtk_eth *eth = mac->hw; mtk_change_mtu() local 4385 mtk_prepare_for_reset(struct mtk_eth * eth) mtk_prepare_for_reset() argument 4418 struct mtk_eth *eth = container_of(work, struct mtk_eth, pending_work); mtk_pending_work() local 4481 mtk_free_dev(struct mtk_eth * eth) mtk_free_dev() argument 4500 mtk_unreg_dev(struct mtk_eth * eth) mtk_unreg_dev() argument 4517 mtk_sgmii_destroy(struct mtk_eth * eth) mtk_sgmii_destroy() argument 4525 mtk_cleanup(struct mtk_eth * eth) mtk_cleanup() argument 4630 mtk_ethtool_pp_stats(struct mtk_eth * eth,u64 * data) mtk_ethtool_pp_stats() argument 4823 mtk_add_mac(struct mtk_eth * eth,struct device_node * np) mtk_add_mac() argument 5018 mtk_eth_set_dma_device(struct mtk_eth * eth,struct device * dma_dev) mtk_eth_set_dma_device() argument 5047 mtk_sgmii_init(struct mtk_eth * eth) mtk_sgmii_init() argument 5074 mtk_setup_legacy_sram(struct mtk_eth * eth,struct resource * res) mtk_setup_legacy_sram() argument 5099 struct mtk_eth *eth; mtk_probe() local 5374 struct mtk_eth *eth = platform_get_drvdata(pdev); mtk_remove() local [all...] |