Lines Matching full:plat
154 ret = clk_prepare_enable(priv->plat->stmmac_clk); in stmmac_bus_clks_config()
157 ret = clk_prepare_enable(priv->plat->pclk); in stmmac_bus_clks_config()
159 clk_disable_unprepare(priv->plat->stmmac_clk); in stmmac_bus_clks_config()
162 if (priv->plat->clks_config) { in stmmac_bus_clks_config()
163 ret = priv->plat->clks_config(priv->plat->bsp_priv, enabled); in stmmac_bus_clks_config()
165 clk_disable_unprepare(priv->plat->stmmac_clk); in stmmac_bus_clks_config()
166 clk_disable_unprepare(priv->plat->pclk); in stmmac_bus_clks_config()
171 clk_disable_unprepare(priv->plat->stmmac_clk); in stmmac_bus_clks_config()
172 clk_disable_unprepare(priv->plat->pclk); in stmmac_bus_clks_config()
173 if (priv->plat->clks_config) in stmmac_bus_clks_config()
174 priv->plat->clks_config(priv->plat->bsp_priv, enabled); in stmmac_bus_clks_config()
231 u32 rx_queues_cnt = priv->plat->rx_queues_to_use; in __stmmac_disable_all_queues()
232 u32 tx_queues_cnt = priv->plat->tx_queues_to_use; in __stmmac_disable_all_queues()
258 u32 rx_queues_cnt = priv->plat->rx_queues_to_use; in stmmac_disable_all_queues()
280 u32 rx_queues_cnt = priv->plat->rx_queues_to_use; in stmmac_enable_all_queues()
281 u32 tx_queues_cnt = priv->plat->tx_queues_to_use; in stmmac_enable_all_queues()
331 clk_rate = clk_get_rate(priv->plat->stmmac_clk); in stmmac_clk_csr_set()
359 if (priv->plat->flags & STMMAC_FLAG_HAS_SUN8I) { in stmmac_clk_csr_set()
370 if (priv->plat->has_xgmac) { in stmmac_clk_csr_set()
425 u32 tx_cnt = priv->plat->tx_queues_to_use; in stmmac_eee_tx_busy()
520 ns -= priv->plat->cdc_error_adj; in stmmac_get_tx_hwtstamp()
550 if (priv->plat->has_gmac4 || priv->plat->has_xgmac) in stmmac_get_rx_hwtstamp()
557 ns -= priv->plat->cdc_error_adj; in stmmac_get_rx_hwtstamp()
798 bool xmac = priv->plat->has_gmac4 || priv->plat->has_xgmac; in stmmac_init_tstamp_counter()
811 priv->plat->clk_ptp_rate, in stmmac_init_tstamp_counter()
824 priv->default_addend = div_u64(temp, priv->plat->clk_ptp_rate); in stmmac_init_tstamp_counter()
846 bool xmac = priv->plat->has_gmac4 || priv->plat->has_xgmac; in stmmac_init_ptp()
849 if (priv->plat->ptp_clk_freq_config) in stmmac_init_ptp()
850 priv->plat->ptp_clk_freq_config(priv); in stmmac_init_ptp()
874 if (priv->plat->flags & STMMAC_FLAG_HWTSTAMP_CORRECT_LATENCY) in stmmac_init_ptp()
882 clk_disable_unprepare(priv->plat->clk_ptp_ref); in stmmac_release_ptp()
896 u32 tx_cnt = priv->plat->tx_queues_to_use; in stmmac_mac_flow_ctrl()
912 if (priv->plat->max_speed) in stmmac_mac_get_caps()
913 phylink_limit_mac_speed(config, priv->plat->max_speed); in stmmac_mac_get_caps()
924 if (priv->plat->select_pcs) { in stmmac_mac_select_pcs()
925 pcs = priv->plat->select_pcs(priv, interface); in stmmac_mac_select_pcs()
963 if ((priv->plat->flags & STMMAC_FLAG_SERDES_UP_AFTER_PHY_LINKUP) && in stmmac_mac_link_up()
964 priv->plat->serdes_powerup) in stmmac_mac_link_up()
965 priv->plat->serdes_powerup(priv->dev, priv->plat->bsp_priv); in stmmac_mac_link_up()
1029 if (priv->plat->fix_mac_speed) in stmmac_mac_link_up()
1030 priv->plat->fix_mac_speed(priv->plat->bsp_priv, speed, mode); in stmmac_mac_link_up()
1052 if (priv->plat->set_clk_tx_rate) { in stmmac_mac_link_up()
1053 ret = priv->plat->set_clk_tx_rate(priv->plat->bsp_priv, in stmmac_mac_link_up()
1054 priv->plat->clk_tx_i, in stmmac_mac_link_up()
1069 if (priv->plat->flags & STMMAC_FLAG_HWTSTAMP_CORRECT_LATENCY) in stmmac_mac_link_up()
1109 if (priv->plat->flags & STMMAC_FLAG_EN_TX_LPI_CLK_PHY_CAP) in stmmac_mac_enable_tx_lpi()
1139 if (priv->plat->mac_finish) in stmmac_mac_finish()
1140 priv->plat->mac_finish(ndev, priv->plat->bsp_priv, mode, interface); in stmmac_mac_finish()
1165 int interface = priv->plat->mac_interface; in stmmac_check_pcs_mode()
1199 fwnode = priv->plat->port_node; in stmmac_init_phy()
1212 int addr = priv->plat->phy_addr; in stmmac_init_phy()
1247 if (!priv->plat->pmt) { in stmmac_init_phy()
1261 int mode = priv->plat->phy_interface; in stmmac_phy_setup()
1273 if (!(priv->plat->flags & STMMAC_FLAG_RX_CLK_RUNS_IN_LPI)) in stmmac_phy_setup()
1277 priv->tx_lpi_clk_stop = priv->plat->flags & in stmmac_phy_setup()
1280 mdio_bus_data = priv->plat->mdio_bus_data; in stmmac_phy_setup()
1314 fwnode = priv->plat->port_node; in stmmac_phy_setup()
1330 u32 rx_cnt = priv->plat->rx_queues_to_use; in stmmac_display_rx_rings()
1358 u32 tx_cnt = priv->plat->tx_queues_to_use; in stmmac_display_tx_rings()
1491 u32 rx_queue_cnt = priv->plat->rx_queues_to_use; in stmmac_clear_descriptors()
1492 u32 tx_queue_cnt = priv->plat->tx_queues_to_use; in stmmac_clear_descriptors()
1811 u32 rx_count = priv->plat->rx_queues_to_use; in init_dma_rx_desc_rings()
1908 tx_queue_cnt = priv->plat->tx_queues_to_use; in init_dma_tx_desc_rings()
1977 u32 tx_queue_cnt = priv->plat->tx_queues_to_use; in stmmac_free_tx_skbufs()
2026 u32 rx_count = priv->plat->rx_queues_to_use; in free_dma_rx_desc_resources()
2073 u32 tx_count = priv->plat->tx_queues_to_use; in free_dma_tx_desc_resources()
2177 u32 rx_count = priv->plat->rx_queues_to_use; in alloc_dma_rx_desc_resources()
2256 u32 tx_count = priv->plat->tx_queues_to_use; in alloc_dma_tx_desc_resources()
2321 u32 rx_queues_count = priv->plat->rx_queues_to_use; in stmmac_mac_enable_rx_queues()
2326 mode = priv->plat->rx_queues_cfg[queue].mode_to_use; in stmmac_mac_enable_rx_queues()
2385 u32 rx_channels_count = priv->plat->rx_queues_to_use; in stmmac_enable_all_dma_irq()
2386 u32 tx_channels_count = priv->plat->tx_queues_to_use; in stmmac_enable_all_dma_irq()
2408 u32 rx_channels_count = priv->plat->rx_queues_to_use; in stmmac_start_all_dma()
2409 u32 tx_channels_count = priv->plat->tx_queues_to_use; in stmmac_start_all_dma()
2427 u32 rx_channels_count = priv->plat->rx_queues_to_use; in stmmac_stop_all_dma()
2428 u32 tx_channels_count = priv->plat->tx_queues_to_use; in stmmac_stop_all_dma()
2446 u32 rx_channels_count = priv->plat->rx_queues_to_use; in stmmac_dma_operation_mode()
2447 u32 tx_channels_count = priv->plat->tx_queues_to_use; in stmmac_dma_operation_mode()
2448 int rxfifosz = priv->plat->rx_fifo_size; in stmmac_dma_operation_mode()
2449 int txfifosz = priv->plat->tx_fifo_size; in stmmac_dma_operation_mode()
2461 if (priv->plat->has_gmac4 || priv->plat->has_xgmac) { in stmmac_dma_operation_mode()
2466 if (priv->plat->force_thresh_dma_mode) { in stmmac_dma_operation_mode()
2469 } else if (priv->plat->force_sf_dma_mode || priv->plat->tx_coe) { in stmmac_dma_operation_mode()
2490 qmode = priv->plat->rx_queues_cfg[chan].mode_to_use; in stmmac_dma_operation_mode()
2508 qmode = priv->plat->tx_queues_cfg[chan].mode_to_use; in stmmac_dma_operation_mode()
2543 ns -= priv->plat->cdc_error_adj; in stmmac_xsk_fill_timestamp()
2691 if (priv->plat->force_thresh_dma_mode) in stmmac_bump_dma_threshold()
2913 stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg, in stmmac_tx_err()
2934 u8 rxqmode = priv->plat->rx_queues_cfg[chan].mode_to_use; in stmmac_set_dma_operation_mode()
2935 u8 txqmode = priv->plat->tx_queues_cfg[chan].mode_to_use; in stmmac_set_dma_operation_mode()
2936 u32 rx_channels_count = priv->plat->rx_queues_to_use; in stmmac_set_dma_operation_mode()
2937 u32 tx_channels_count = priv->plat->tx_queues_to_use; in stmmac_set_dma_operation_mode()
2938 int rxfifosz = priv->plat->rx_fifo_size; in stmmac_set_dma_operation_mode()
2939 int txfifosz = priv->plat->tx_fifo_size; in stmmac_set_dma_operation_mode()
2982 if ((status & handle_rx) && (chan < priv->plat->rx_queues_to_use)) { in stmmac_napi_check()
2991 if ((status & handle_tx) && (chan < priv->plat->tx_queues_to_use)) { in stmmac_napi_check()
3012 u32 tx_channel_count = priv->plat->tx_queues_to_use; in stmmac_dma_interrupt()
3013 u32 rx_channel_count = priv->plat->rx_queues_to_use; in stmmac_dma_interrupt()
3102 u32 rx_channels_count = priv->plat->rx_queues_to_use; in stmmac_init_dma_engine()
3103 u32 tx_channels_count = priv->plat->tx_queues_to_use; in stmmac_init_dma_engine()
3110 if (!priv->plat->dma_cfg || !priv->plat->dma_cfg->pbl) { in stmmac_init_dma_engine()
3116 priv->plat->dma_cfg->atds = 1; in stmmac_init_dma_engine()
3125 stmmac_dma_init(priv, priv->ioaddr, priv->plat->dma_cfg); in stmmac_init_dma_engine()
3127 if (priv->plat->axi) in stmmac_init_dma_engine()
3128 stmmac_axi(priv, priv->ioaddr, priv->plat->axi); in stmmac_init_dma_engine()
3132 stmmac_init_chan(priv, priv->ioaddr, priv->plat->dma_cfg, chan); in stmmac_init_dma_engine()
3140 stmmac_init_rx_chan(priv, priv->ioaddr, priv->plat->dma_cfg, in stmmac_init_dma_engine()
3154 stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg, in stmmac_init_dma_engine()
3228 u32 tx_channel_count = priv->plat->tx_queues_to_use; in stmmac_init_coalesce()
3229 u32 rx_channel_count = priv->plat->rx_queues_to_use; in stmmac_init_coalesce()
3247 u32 rx_channels_count = priv->plat->rx_queues_to_use; in stmmac_set_rings_length()
3248 u32 tx_channels_count = priv->plat->tx_queues_to_use; in stmmac_set_rings_length()
3269 u32 tx_queues_count = priv->plat->tx_queues_to_use; in stmmac_set_tx_queue_weight()
3274 weight = priv->plat->tx_queues_cfg[queue].weight; in stmmac_set_tx_queue_weight()
3286 u32 tx_queues_count = priv->plat->tx_queues_to_use; in stmmac_configure_cbs()
3292 mode_to_use = priv->plat->tx_queues_cfg[queue].mode_to_use; in stmmac_configure_cbs()
3297 priv->plat->tx_queues_cfg[queue].send_slope, in stmmac_configure_cbs()
3298 priv->plat->tx_queues_cfg[queue].idle_slope, in stmmac_configure_cbs()
3299 priv->plat->tx_queues_cfg[queue].high_credit, in stmmac_configure_cbs()
3300 priv->plat->tx_queues_cfg[queue].low_credit, in stmmac_configure_cbs()
3312 u32 rx_queues_count = priv->plat->rx_queues_to_use; in stmmac_rx_queue_dma_chan_map()
3317 chan = priv->plat->rx_queues_cfg[queue].chan; in stmmac_rx_queue_dma_chan_map()
3329 u32 rx_queues_count = priv->plat->rx_queues_to_use; in stmmac_mac_config_rx_queues_prio()
3334 if (!priv->plat->rx_queues_cfg[queue].use_prio) in stmmac_mac_config_rx_queues_prio()
3337 prio = priv->plat->rx_queues_cfg[queue].prio; in stmmac_mac_config_rx_queues_prio()
3349 u32 tx_queues_count = priv->plat->tx_queues_to_use; in stmmac_mac_config_tx_queues_prio()
3354 if (!priv->plat->tx_queues_cfg[queue].use_prio) in stmmac_mac_config_tx_queues_prio()
3357 prio = priv->plat->tx_queues_cfg[queue].prio; in stmmac_mac_config_tx_queues_prio()
3369 u32 rx_queues_count = priv->plat->rx_queues_to_use; in stmmac_mac_config_rx_queues_routing()
3375 if (priv->plat->rx_queues_cfg[queue].pkt_route == 0x0) in stmmac_mac_config_rx_queues_routing()
3378 packet = priv->plat->rx_queues_cfg[queue].pkt_route; in stmmac_mac_config_rx_queues_routing()
3385 if (!priv->dma_cap.rssen || !priv->plat->rss_en) { in stmmac_mac_config_rss()
3396 priv->plat->rx_queues_to_use); in stmmac_mac_config_rss()
3406 u32 rx_queues_count = priv->plat->rx_queues_to_use; in stmmac_mtl_configuration()
3407 u32 tx_queues_count = priv->plat->tx_queues_to_use; in stmmac_mtl_configuration()
3415 priv->plat->rx_sched_algorithm); in stmmac_mtl_configuration()
3420 priv->plat->tx_sched_algorithm); in stmmac_mtl_configuration()
3454 priv->plat->safety_feat_cfg); in stmmac_safety_feat_configuration()
3476 u32 rx_cnt = priv->plat->rx_queues_to_use; in stmmac_hw_setup()
3477 u32 tx_cnt = priv->plat->tx_queues_to_use; in stmmac_hw_setup()
3509 int speed = priv->plat->mac_port_sel_speed; in stmmac_hw_setup()
3532 priv->plat->rx_coe = STMMAC_RX_COE_NONE; in stmmac_hw_setup()
3545 ret = clk_prepare_enable(priv->plat->clk_ptp_ref); in stmmac_hw_setup()
3610 netif_set_real_num_rx_queues(dev, priv->plat->rx_queues_to_use); in stmmac_hw_setup()
3611 netif_set_real_num_tx_queues(dev, priv->plat->tx_queues_to_use); in stmmac_hw_setup()
3627 clk_disable_unprepare(priv->plat->clk_ptp_ref); in stmmac_hw_teardown()
3638 irq_idx = priv->plat->tx_queues_to_use; in stmmac_free_irq()
3647 irq_idx = priv->plat->rx_queues_to_use; in stmmac_free_irq()
3799 for (i = 0; i < priv->plat->rx_queues_to_use; i++) { in stmmac_request_irq_multi_msi()
3823 for (i = 0; i < priv->plat->tx_queues_to_use; i++) { in stmmac_request_irq_multi_msi()
3926 if (priv->plat->flags & STMMAC_FLAG_MULTI_MSI_EN) in stmmac_request_irq()
3976 for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++) { in stmmac_setup_dma_desc()
3978 int tbs_en = priv->plat->tx_queues_cfg[chan].tbs_en; in stmmac_setup_dma_desc()
4021 int mode = priv->plat->phy_interface; in __stmmac_open()
4051 if (!(priv->plat->flags & STMMAC_FLAG_SERDES_UP_AFTER_PHY_LINKUP) && in __stmmac_open()
4052 priv->plat->serdes_powerup) { in __stmmac_open()
4053 ret = priv->plat->serdes_powerup(dev, priv->plat->bsp_priv); in __stmmac_open()
4086 for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++) in __stmmac_open()
4134 for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++) in stmmac_release()
4149 if (priv->plat->serdes_powerdown) in stmmac_release()
4150 priv->plat->serdes_powerdown(dev, priv->plat->bsp_priv); in stmmac_release()
4596 if (priv->plat->has_gmac4 && (gso & SKB_GSO_UDP_L4)) in stmmac_xmit()
4635 (priv->plat->tx_queues_cfg[queue].coe_unsupported || in stmmac_xmit()
4654 enh_desc = priv->plat->enh_desc; in stmmac_xmit()
5058 while (index >= priv->plat->tx_queues_to_use) in stmmac_xdp_get_tx_queue()
5059 index -= priv->plat->tx_queues_to_use; in stmmac_xdp_get_tx_queue()
5924 int txfifosz = priv->plat->tx_fifo_size; in stmmac_change_mtu()
5932 txfifosz /= priv->plat->tx_queues_to_use; in stmmac_change_mtu()
5981 if (priv->plat->rx_coe == STMMAC_RX_COE_NONE) in stmmac_fix_features()
5984 if (!priv->plat->tx_coe) in stmmac_fix_features()
5992 if (priv->plat->bugged_jumbo && (dev->mtu > ETH_DATA_LEN)) in stmmac_fix_features()
5996 if ((priv->plat->flags & STMMAC_FLAG_TSO_EN) && (priv->dma_cap.tsoen)) { in stmmac_fix_features()
6013 priv->hw->rx_csum = priv->plat->rx_coe; in stmmac_set_features()
6025 for (chan = 0; chan < priv->plat->rx_queues_to_use; chan++) in stmmac_set_features()
6043 u32 rx_cnt = priv->plat->rx_queues_to_use; in stmmac_common_interrupt()
6044 u32 tx_cnt = priv->plat->tx_queues_to_use; in stmmac_common_interrupt()
6049 xmac = priv->plat->has_gmac4 || priv->plat->has_xgmac; in stmmac_common_interrupt()
6063 if ((priv->plat->has_gmac) || xmac) { in stmmac_common_interrupt()
6079 !(priv->plat->flags & STMMAC_FLAG_HAS_INTEGRATED_PCS)) { in stmmac_common_interrupt()
6360 u32 rx_count = priv->plat->rx_queues_to_use; in stmmac_rings_status_show()
6361 u32 tx_count = priv->plat->tx_queues_to_use; in stmmac_rings_status_show()
6439 if (priv->plat->has_xgmac) { in stmmac_dma_cap_show()
6463 if (priv->plat->has_xgmac) in stmmac_dma_cap_show()
6472 priv->plat->has_xgmac) { in stmmac_dma_cap_show()
6838 stmmac_init_rx_chan(priv, priv->ioaddr, priv->plat->dma_cfg, in stmmac_enable_rx_queue()
6900 stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg, in stmmac_enable_tx_queue()
6928 for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++) in stmmac_xdp_release()
6953 u32 rx_cnt = priv->plat->rx_queues_to_use; in stmmac_xdp_open()
6954 u32 tx_cnt = priv->plat->tx_queues_to_use; in stmmac_xdp_open()
6981 stmmac_init_chan(priv, priv->ioaddr, priv->plat->dma_cfg, chan); in stmmac_xdp_open()
6992 stmmac_init_rx_chan(priv, priv->ioaddr, priv->plat->dma_cfg, in stmmac_xdp_open()
7019 stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg, in stmmac_xdp_open()
7048 for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++) in stmmac_xdp_open()
7072 if (queue >= priv->plat->rx_queues_to_use || in stmmac_xsk_wakeup()
7073 queue >= priv->plat->tx_queues_to_use) in stmmac_xsk_wakeup()
7097 u32 tx_cnt = priv->plat->tx_queues_to_use; in stmmac_get_stats64()
7098 u32 rx_cnt = priv->plat->rx_queues_to_use; in stmmac_get_stats64()
7212 if (priv->plat->flags & STMMAC_FLAG_HAS_SUN8I) in stmmac_hw_init()
7231 priv->plat->enh_desc = priv->dma_cap.enh_desc; in stmmac_hw_init()
7232 priv->plat->pmt = priv->dma_cap.pmt_remote_wake_up && in stmmac_hw_init()
7233 !(priv->plat->flags & STMMAC_FLAG_USE_PHY_WOL); in stmmac_hw_init()
7234 priv->hw->pmt = priv->plat->pmt; in stmmac_hw_init()
7243 if (priv->plat->force_thresh_dma_mode) in stmmac_hw_init()
7244 priv->plat->tx_coe = 0; in stmmac_hw_init()
7246 priv->plat->tx_coe = priv->dma_cap.tx_coe; in stmmac_hw_init()
7249 priv->plat->rx_coe = priv->dma_cap.rx_coe; in stmmac_hw_init()
7252 priv->plat->rx_coe = STMMAC_RX_COE_TYPE2; in stmmac_hw_init()
7254 priv->plat->rx_coe = STMMAC_RX_COE_TYPE1; in stmmac_hw_init()
7260 if (priv->plat->rx_coe) { in stmmac_hw_init()
7261 priv->hw->rx_csum = priv->plat->rx_coe; in stmmac_hw_init()
7266 if (priv->plat->tx_coe) in stmmac_hw_init()
7269 if (priv->plat->pmt) { in stmmac_hw_init()
7278 priv->plat->rx_queues_to_use > priv->dma_cap.number_rx_queues) { in stmmac_hw_init()
7281 priv->plat->rx_queues_to_use); in stmmac_hw_init()
7282 priv->plat->rx_queues_to_use = priv->dma_cap.number_rx_queues; in stmmac_hw_init()
7285 priv->plat->tx_queues_to_use > priv->dma_cap.number_tx_queues) { in stmmac_hw_init()
7288 priv->plat->tx_queues_to_use); in stmmac_hw_init()
7289 priv->plat->tx_queues_to_use = priv->dma_cap.number_tx_queues; in stmmac_hw_init()
7293 priv->plat->rx_fifo_size > priv->dma_cap.rx_fifo_size) { in stmmac_hw_init()
7296 priv->plat->rx_fifo_size); in stmmac_hw_init()
7297 priv->plat->rx_fifo_size = priv->dma_cap.rx_fifo_size; in stmmac_hw_init()
7300 priv->plat->tx_fifo_size > priv->dma_cap.tx_fifo_size) { in stmmac_hw_init()
7303 priv->plat->tx_fifo_size); in stmmac_hw_init()
7304 priv->plat->tx_fifo_size = priv->dma_cap.tx_fifo_size; in stmmac_hw_init()
7308 (priv->plat->flags & STMMAC_FLAG_VLAN_FAIL_Q_EN); in stmmac_hw_init()
7309 priv->hw->vlan_fail_q = priv->plat->vlan_fail_q; in stmmac_hw_init()
7324 (priv->plat->has_xgmac)) && (!priv->plat->riwt_off)) { in stmmac_hw_init()
7338 maxq = max(priv->plat->rx_queues_to_use, priv->plat->tx_queues_to_use); in stmmac_napi_add()
7347 if (queue < priv->plat->rx_queues_to_use) { in stmmac_napi_add()
7350 if (queue < priv->plat->tx_queues_to_use) { in stmmac_napi_add()
7354 if (queue < priv->plat->rx_queues_to_use && in stmmac_napi_add()
7355 queue < priv->plat->tx_queues_to_use) { in stmmac_napi_add()
7367 maxq = max(priv->plat->rx_queues_to_use, priv->plat->tx_queues_to_use); in stmmac_napi_del()
7372 if (queue < priv->plat->rx_queues_to_use) in stmmac_napi_del()
7374 if (queue < priv->plat->tx_queues_to_use) in stmmac_napi_del()
7376 if (queue < priv->plat->rx_queues_to_use && in stmmac_napi_del()
7377 queue < priv->plat->tx_queues_to_use) { in stmmac_napi_del()
7393 priv->plat->rx_queues_to_use = rx_cnt; in stmmac_reinit_queues()
7394 priv->plat->tx_queues_to_use = tx_cnt; in stmmac_reinit_queues()
7438 if (priv->plat->has_gmac4 || priv->plat->has_xgmac) in stmmac_xdp_rx_timestamp()
7444 ns -= priv->plat->cdc_error_adj; in stmmac_xdp_rx_timestamp()
7500 priv->plat = plat_dat; in stmmac_dvr_probe()
7503 priv->plat->dma_cfg->multi_msi_en = in stmmac_dvr_probe()
7504 (priv->plat->flags & STMMAC_FLAG_MULTI_MSI_EN); in stmmac_dvr_probe()
7545 priv->plat->phy_addr = phyaddr; in stmmac_dvr_probe()
7547 if (priv->plat->stmmac_rst) { in stmmac_dvr_probe()
7548 ret = reset_control_assert(priv->plat->stmmac_rst); in stmmac_dvr_probe()
7549 reset_control_deassert(priv->plat->stmmac_rst); in stmmac_dvr_probe()
7554 reset_control_reset(priv->plat->stmmac_rst); in stmmac_dvr_probe()
7557 ret = reset_control_deassert(priv->plat->stmmac_ahb_rst); in stmmac_dvr_probe()
7573 priv->plat->dma_cfg->dche = false; in stmmac_dvr_probe()
7592 if ((priv->plat->flags & STMMAC_FLAG_TSO_EN) && (priv->dma_cap.tsoen)) { in stmmac_dvr_probe()
7594 if (priv->plat->has_gmac4) in stmmac_dvr_probe()
7601 !(priv->plat->flags & STMMAC_FLAG_SPH_DISABLE)) { in stmmac_dvr_probe()
7613 if (priv->plat->host_dma_width) in stmmac_dvr_probe()
7614 priv->dma_cap.host_dma_width = priv->plat->host_dma_width; in stmmac_dvr_probe()
7630 priv->plat->dma_cfg->eame = true; in stmmac_dvr_probe()
7647 if (priv->plat->has_gmac4) { in stmmac_dvr_probe()
7666 rxq = priv->plat->rx_queues_to_use; in stmmac_dvr_probe()
7671 if (priv->dma_cap.rssen && priv->plat->rss_en) in stmmac_dvr_probe()
7678 if (priv->plat->has_xgmac) in stmmac_dvr_probe()
7680 else if ((priv->plat->enh_desc) || (priv->synopsys_id >= DWMAC_CORE_4_00)) in stmmac_dvr_probe()
7684 /* Will not overwrite ndev->max_mtu if plat->maxmtu > ndev->max_mtu in stmmac_dvr_probe()
7685 * as well as plat->maxmtu < ndev->min_mtu which is a invalid range. in stmmac_dvr_probe()
7687 if ((priv->plat->maxmtu < ndev->max_mtu) && in stmmac_dvr_probe()
7688 (priv->plat->maxmtu >= ndev->min_mtu)) in stmmac_dvr_probe()
7689 ndev->max_mtu = priv->plat->maxmtu; in stmmac_dvr_probe()
7690 else if (priv->plat->maxmtu < ndev->min_mtu) in stmmac_dvr_probe()
7693 __func__, priv->plat->maxmtu); in stmmac_dvr_probe()
7710 if (priv->plat->clk_csr >= 0) in stmmac_dvr_probe()
7711 priv->clk_csr = priv->plat->clk_csr; in stmmac_dvr_probe()
7726 priv->plat->bus_id); in stmmac_dvr_probe()
7730 if (priv->plat->speed_mode_2500) in stmmac_dvr_probe()
7731 priv->plat->speed_mode_2500(ndev, priv->plat->bsp_priv); in stmmac_dvr_probe()
7754 if (priv->plat->dump_debug_regs) in stmmac_dvr_probe()
7755 priv->plat->dump_debug_regs(priv->plat->bsp_priv); in stmmac_dvr_probe()
7802 if (priv->plat->stmmac_rst) in stmmac_dvr_remove()
7803 reset_control_assert(priv->plat->stmmac_rst); in stmmac_dvr_remove()
7804 reset_control_assert(priv->plat->stmmac_ahb_rst); in stmmac_dvr_remove()
7840 for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++) in stmmac_suspend()
7851 if (priv->plat->serdes_powerdown) in stmmac_suspend()
7852 priv->plat->serdes_powerdown(ndev, priv->plat->bsp_priv); in stmmac_suspend()
7855 if (device_may_wakeup(priv->device) && priv->plat->pmt) { in stmmac_suspend()
7866 if (device_may_wakeup(priv->device) && !priv->plat->pmt) in stmmac_suspend()
7870 device_may_wakeup(priv->device) && priv->plat->pmt); in stmmac_suspend()
7905 u32 rx_cnt = priv->plat->rx_queues_to_use; in stmmac_reset_queues_param()
7906 u32 tx_cnt = priv->plat->tx_queues_to_use; in stmmac_reset_queues_param()
7937 if (device_may_wakeup(priv->device) && priv->plat->pmt) { in stmmac_resume()
7949 if (!(priv->plat->flags & STMMAC_FLAG_SERDES_UP_AFTER_PHY_LINKUP) && in stmmac_resume()
7950 priv->plat->serdes_powerup) { in stmmac_resume()
7951 ret = priv->plat->serdes_powerup(ndev, in stmmac_resume()
7952 priv->plat->bsp_priv); in stmmac_resume()
7990 if (device_may_wakeup(priv->device) && !priv->plat->pmt) in stmmac_resume()