Lines Matching +full:axi +full:- +full:config
1 // SPDX-License-Identifier: GPL-2.0-only
5 Copyright (C) 2007-2011 STMicroelectronics Ltd
25 * dwmac1000_validate_mcast_bins - validates the number of Multicast filter bins
56 * dwmac1000_validate_ucast_entries - validate the Unicast address entries
87 * stmmac_axi_setup - parse DT parameters for programming the AXI register
90 * if required, from device-tree the AXI internal register can be tuned
96 struct stmmac_axi *axi; in stmmac_axi_setup() local
98 np = of_parse_phandle(pdev->dev.of_node, "snps,axi-config", 0); in stmmac_axi_setup()
102 axi = devm_kzalloc(&pdev->dev, sizeof(*axi), GFP_KERNEL); in stmmac_axi_setup()
103 if (!axi) { in stmmac_axi_setup()
105 return ERR_PTR(-ENOMEM); in stmmac_axi_setup()
108 axi->axi_lpi_en = of_property_read_bool(np, "snps,lpi_en"); in stmmac_axi_setup()
109 axi->axi_xit_frm = of_property_read_bool(np, "snps,xit_frm"); in stmmac_axi_setup()
110 axi->axi_kbbe = of_property_read_bool(np, "snps,axi_kbbe"); in stmmac_axi_setup()
111 axi->axi_fb = of_property_read_bool(np, "snps,axi_fb"); in stmmac_axi_setup()
112 axi->axi_mb = of_property_read_bool(np, "snps,axi_mb"); in stmmac_axi_setup()
113 axi->axi_rb = of_property_read_bool(np, "snps,axi_rb"); in stmmac_axi_setup()
115 if (of_property_read_u32(np, "snps,wr_osr_lmt", &axi->axi_wr_osr_lmt)) in stmmac_axi_setup()
116 axi->axi_wr_osr_lmt = 1; in stmmac_axi_setup()
117 if (of_property_read_u32(np, "snps,rd_osr_lmt", &axi->axi_rd_osr_lmt)) in stmmac_axi_setup()
118 axi->axi_rd_osr_lmt = 1; in stmmac_axi_setup()
119 of_property_read_u32_array(np, "snps,blen", axi->axi_blen, AXI_BLEN); in stmmac_axi_setup()
122 return axi; in stmmac_axi_setup()
126 * stmmac_mtl_setup - parse DT parameters for multiple queues configuration
139 /* For backwards-compatibility with device trees that don't have any in stmmac_mtl_setup()
140 * snps,mtl-rx-config or snps,mtl-tx-config properties, we fall back in stmmac_mtl_setup()
143 plat->rx_queues_to_use = 1; in stmmac_mtl_setup()
144 plat->tx_queues_to_use = 1; in stmmac_mtl_setup()
150 plat->rx_queues_cfg[0].mode_to_use = MTL_QUEUE_DCB; in stmmac_mtl_setup()
151 plat->tx_queues_cfg[0].mode_to_use = MTL_QUEUE_DCB; in stmmac_mtl_setup()
153 rx_node = of_parse_phandle(pdev->dev.of_node, "snps,mtl-rx-config", 0); in stmmac_mtl_setup()
157 tx_node = of_parse_phandle(pdev->dev.of_node, "snps,mtl-tx-config", 0); in stmmac_mtl_setup()
163 /* Processing RX queues common config */ in stmmac_mtl_setup()
164 if (of_property_read_u32(rx_node, "snps,rx-queues-to-use", in stmmac_mtl_setup()
165 &plat->rx_queues_to_use)) in stmmac_mtl_setup()
166 plat->rx_queues_to_use = 1; in stmmac_mtl_setup()
168 if (of_property_read_bool(rx_node, "snps,rx-sched-sp")) in stmmac_mtl_setup()
169 plat->rx_sched_algorithm = MTL_RX_ALGORITHM_SP; in stmmac_mtl_setup()
170 else if (of_property_read_bool(rx_node, "snps,rx-sched-wsp")) in stmmac_mtl_setup()
171 plat->rx_sched_algorithm = MTL_RX_ALGORITHM_WSP; in stmmac_mtl_setup()
173 plat->rx_sched_algorithm = MTL_RX_ALGORITHM_SP; in stmmac_mtl_setup()
175 /* Processing individual RX queue config */ in stmmac_mtl_setup()
177 if (queue >= plat->rx_queues_to_use) in stmmac_mtl_setup()
180 if (of_property_read_bool(q_node, "snps,dcb-algorithm")) in stmmac_mtl_setup()
181 plat->rx_queues_cfg[queue].mode_to_use = MTL_QUEUE_DCB; in stmmac_mtl_setup()
182 else if (of_property_read_bool(q_node, "snps,avb-algorithm")) in stmmac_mtl_setup()
183 plat->rx_queues_cfg[queue].mode_to_use = MTL_QUEUE_AVB; in stmmac_mtl_setup()
185 plat->rx_queues_cfg[queue].mode_to_use = MTL_QUEUE_DCB; in stmmac_mtl_setup()
187 if (of_property_read_u32(q_node, "snps,map-to-dma-channel", in stmmac_mtl_setup()
188 &plat->rx_queues_cfg[queue].chan)) in stmmac_mtl_setup()
189 plat->rx_queues_cfg[queue].chan = queue; in stmmac_mtl_setup()
193 &plat->rx_queues_cfg[queue].prio)) { in stmmac_mtl_setup()
194 plat->rx_queues_cfg[queue].prio = 0; in stmmac_mtl_setup()
195 plat->rx_queues_cfg[queue].use_prio = false; in stmmac_mtl_setup()
197 plat->rx_queues_cfg[queue].use_prio = true; in stmmac_mtl_setup()
201 if (of_property_read_bool(q_node, "snps,route-avcp")) in stmmac_mtl_setup()
202 plat->rx_queues_cfg[queue].pkt_route = PACKET_AVCPQ; in stmmac_mtl_setup()
203 else if (of_property_read_bool(q_node, "snps,route-ptp")) in stmmac_mtl_setup()
204 plat->rx_queues_cfg[queue].pkt_route = PACKET_PTPQ; in stmmac_mtl_setup()
205 else if (of_property_read_bool(q_node, "snps,route-dcbcp")) in stmmac_mtl_setup()
206 plat->rx_queues_cfg[queue].pkt_route = PACKET_DCBCPQ; in stmmac_mtl_setup()
207 else if (of_property_read_bool(q_node, "snps,route-up")) in stmmac_mtl_setup()
208 plat->rx_queues_cfg[queue].pkt_route = PACKET_UPQ; in stmmac_mtl_setup()
209 else if (of_property_read_bool(q_node, "snps,route-multi-broad")) in stmmac_mtl_setup()
210 plat->rx_queues_cfg[queue].pkt_route = PACKET_MCBCQ; in stmmac_mtl_setup()
212 plat->rx_queues_cfg[queue].pkt_route = 0x0; in stmmac_mtl_setup()
216 if (queue != plat->rx_queues_to_use) { in stmmac_mtl_setup()
217 ret = -EINVAL; in stmmac_mtl_setup()
218 dev_err(&pdev->dev, "Not all RX queues were configured\n"); in stmmac_mtl_setup()
222 /* Processing TX queues common config */ in stmmac_mtl_setup()
223 if (of_property_read_u32(tx_node, "snps,tx-queues-to-use", in stmmac_mtl_setup()
224 &plat->tx_queues_to_use)) in stmmac_mtl_setup()
225 plat->tx_queues_to_use = 1; in stmmac_mtl_setup()
227 if (of_property_read_bool(tx_node, "snps,tx-sched-wrr")) in stmmac_mtl_setup()
228 plat->tx_sched_algorithm = MTL_TX_ALGORITHM_WRR; in stmmac_mtl_setup()
229 else if (of_property_read_bool(tx_node, "snps,tx-sched-wfq")) in stmmac_mtl_setup()
230 plat->tx_sched_algorithm = MTL_TX_ALGORITHM_WFQ; in stmmac_mtl_setup()
231 else if (of_property_read_bool(tx_node, "snps,tx-sched-dwrr")) in stmmac_mtl_setup()
232 plat->tx_sched_algorithm = MTL_TX_ALGORITHM_DWRR; in stmmac_mtl_setup()
233 else if (of_property_read_bool(tx_node, "snps,tx-sched-sp")) in stmmac_mtl_setup()
234 plat->tx_sched_algorithm = MTL_TX_ALGORITHM_SP; in stmmac_mtl_setup()
236 plat->tx_sched_algorithm = MTL_TX_ALGORITHM_SP; in stmmac_mtl_setup()
240 /* Processing individual TX queue config */ in stmmac_mtl_setup()
242 if (queue >= plat->tx_queues_to_use) in stmmac_mtl_setup()
246 &plat->tx_queues_cfg[queue].weight)) in stmmac_mtl_setup()
247 plat->tx_queues_cfg[queue].weight = 0x10 + queue; in stmmac_mtl_setup()
249 if (of_property_read_bool(q_node, "snps,dcb-algorithm")) { in stmmac_mtl_setup()
250 plat->tx_queues_cfg[queue].mode_to_use = MTL_QUEUE_DCB; in stmmac_mtl_setup()
252 "snps,avb-algorithm")) { in stmmac_mtl_setup()
253 plat->tx_queues_cfg[queue].mode_to_use = MTL_QUEUE_AVB; in stmmac_mtl_setup()
257 &plat->tx_queues_cfg[queue].send_slope)) in stmmac_mtl_setup()
258 plat->tx_queues_cfg[queue].send_slope = 0x0; in stmmac_mtl_setup()
260 &plat->tx_queues_cfg[queue].idle_slope)) in stmmac_mtl_setup()
261 plat->tx_queues_cfg[queue].idle_slope = 0x0; in stmmac_mtl_setup()
263 &plat->tx_queues_cfg[queue].high_credit)) in stmmac_mtl_setup()
264 plat->tx_queues_cfg[queue].high_credit = 0x0; in stmmac_mtl_setup()
266 &plat->tx_queues_cfg[queue].low_credit)) in stmmac_mtl_setup()
267 plat->tx_queues_cfg[queue].low_credit = 0x0; in stmmac_mtl_setup()
269 plat->tx_queues_cfg[queue].mode_to_use = MTL_QUEUE_DCB; in stmmac_mtl_setup()
273 &plat->tx_queues_cfg[queue].prio)) { in stmmac_mtl_setup()
274 plat->tx_queues_cfg[queue].prio = 0; in stmmac_mtl_setup()
275 plat->tx_queues_cfg[queue].use_prio = false; in stmmac_mtl_setup()
277 plat->tx_queues_cfg[queue].use_prio = true; in stmmac_mtl_setup()
282 if (queue != plat->tx_queues_to_use) { in stmmac_mtl_setup()
283 ret = -EINVAL; in stmmac_mtl_setup()
284 dev_err(&pdev->dev, "Not all TX queues were configured\n"); in stmmac_mtl_setup()
297 * stmmac_dt_phy - parse device-tree driver parameters to allocate PHY resources
303 * it will be NULL if the fixed-link is configured.
304 * If there is the "snps,dwmac-mdio" sub-node the mdio will be allocated
305 * in any case (for DSA, mdio must be registered even if fixed-link).
307 * -------------------------------
308 * snps,phy-addr | Y
309 * -------------------------------
310 * phy-handle | Y
311 * -------------------------------
312 * fixed-link | N
313 * -------------------------------
314 * snps,dwmac-mdio |
316 * fixed-link |
317 * -------------------------------
319 * It returns 0 in case of success otherwise -ENODEV.
326 { .compatible = "snps,dwc-qos-ethernet-4.10" }, in stmmac_dt_phy()
331 plat->mdio_node = of_get_child_by_name(np, "mdio"); in stmmac_dt_phy()
334 * If snps,dwmac-mdio is passed from DT, always register in stmmac_dt_phy()
337 for_each_child_of_node(np, plat->mdio_node) { in stmmac_dt_phy()
338 if (of_device_is_compatible(plat->mdio_node, in stmmac_dt_phy()
339 "snps,dwmac-mdio")) in stmmac_dt_phy()
344 if (plat->mdio_node) { in stmmac_dt_phy()
350 plat->mdio_bus_data = in stmmac_dt_phy()
353 if (!plat->mdio_bus_data) in stmmac_dt_phy()
354 return -ENOMEM; in stmmac_dt_phy()
356 plat->mdio_bus_data->needs_reset = true; in stmmac_dt_phy()
363 * stmmac_of_get_mac_mode - retrieves the interface of the MAC
364 * @np: - device-tree node
367 * the device-tree) the interface mode on the MAC side. This assumes
368 * that there is mode converter in-between the MAC & PHY
369 * (e.g. GMII-to-RGMII).
376 err = of_property_read_string(np, "mac-mode", &pm); in stmmac_of_get_mac_mode()
385 return -ENODEV; in stmmac_of_get_mac_mode()
389 * stmmac_probe_config_dt - parse device-tree driver parameters
393 * this function is to read the driver parameters from device-tree and
399 struct device_node *np = pdev->dev.of_node; in stmmac_probe_config_dt()
404 plat = devm_kzalloc(&pdev->dev, sizeof(*plat), GFP_KERNEL); in stmmac_probe_config_dt()
406 return ERR_PTR(-ENOMEM); in stmmac_probe_config_dt()
410 if (PTR_ERR(*mac) == -EPROBE_DEFER) in stmmac_probe_config_dt()
416 plat->phy_interface = device_get_phy_mode(&pdev->dev); in stmmac_probe_config_dt()
417 if (plat->phy_interface < 0) in stmmac_probe_config_dt()
418 return ERR_PTR(plat->phy_interface); in stmmac_probe_config_dt()
420 plat->interface = stmmac_of_get_mac_mode(np); in stmmac_probe_config_dt()
421 if (plat->interface < 0) in stmmac_probe_config_dt()
422 plat->interface = plat->phy_interface; in stmmac_probe_config_dt()
426 plat->phy_node = of_parse_phandle(np, "phy-handle", 0); in stmmac_probe_config_dt()
428 /* PHYLINK automatically parses the phy-handle property */ in stmmac_probe_config_dt()
429 plat->phylink_node = np; in stmmac_probe_config_dt()
432 if (of_property_read_u32(np, "max-speed", &plat->max_speed)) in stmmac_probe_config_dt()
433 plat->max_speed = -1; in stmmac_probe_config_dt()
435 plat->bus_id = of_alias_get_id(np, "ethernet"); in stmmac_probe_config_dt()
436 if (plat->bus_id < 0) in stmmac_probe_config_dt()
437 plat->bus_id = 0; in stmmac_probe_config_dt()
439 /* Default to phy auto-detection */ in stmmac_probe_config_dt()
440 plat->phy_addr = -1; in stmmac_probe_config_dt()
445 plat->clk_csr = -1; in stmmac_probe_config_dt()
446 of_property_read_u32(np, "clk_csr", &plat->clk_csr); in stmmac_probe_config_dt()
448 /* "snps,phy-addr" is not a standard property. Mark it as deprecated in stmmac_probe_config_dt()
451 if (of_property_read_u32(np, "snps,phy-addr", &plat->phy_addr) == 0) in stmmac_probe_config_dt()
452 dev_warn(&pdev->dev, "snps,phy-addr property is deprecated\n"); in stmmac_probe_config_dt()
454 /* To Configure PHY by using all device-tree supported properties */ in stmmac_probe_config_dt()
455 rc = stmmac_dt_phy(plat, np, &pdev->dev); in stmmac_probe_config_dt()
459 of_property_read_u32(np, "tx-fifo-depth", &plat->tx_fifo_size); in stmmac_probe_config_dt()
461 of_property_read_u32(np, "rx-fifo-depth", &plat->rx_fifo_size); in stmmac_probe_config_dt()
463 plat->force_sf_dma_mode = in stmmac_probe_config_dt()
466 plat->en_tx_lpi_clockgating = in stmmac_probe_config_dt()
467 of_property_read_bool(np, "snps,en-tx-lpi-clockgating"); in stmmac_probe_config_dt()
472 plat->maxmtu = JUMBO_LEN; in stmmac_probe_config_dt()
475 plat->multicast_filter_bins = HASH_TABLE_SIZE; in stmmac_probe_config_dt()
478 plat->unicast_filter_entries = 1; in stmmac_probe_config_dt()
485 if (of_device_is_compatible(np, "st,spear600-gmac") || in stmmac_probe_config_dt()
486 of_device_is_compatible(np, "snps,dwmac-3.50a") || in stmmac_probe_config_dt()
487 of_device_is_compatible(np, "snps,dwmac-3.70a") || in stmmac_probe_config_dt()
489 /* Note that the max-frame-size parameter as defined in the in stmmac_probe_config_dt()
490 * ePAPR v1.1 spec is defined as max-frame-size, it's in stmmac_probe_config_dt()
493 * the definition is max-frame-size, but usage examples in stmmac_probe_config_dt()
496 of_property_read_u32(np, "max-frame-size", &plat->maxmtu); in stmmac_probe_config_dt()
497 of_property_read_u32(np, "snps,multicast-filter-bins", in stmmac_probe_config_dt()
498 &plat->multicast_filter_bins); in stmmac_probe_config_dt()
499 of_property_read_u32(np, "snps,perfect-filter-entries", in stmmac_probe_config_dt()
500 &plat->unicast_filter_entries); in stmmac_probe_config_dt()
501 plat->unicast_filter_entries = dwmac1000_validate_ucast_entries( in stmmac_probe_config_dt()
502 &pdev->dev, plat->unicast_filter_entries); in stmmac_probe_config_dt()
503 plat->multicast_filter_bins = dwmac1000_validate_mcast_bins( in stmmac_probe_config_dt()
504 &pdev->dev, plat->multicast_filter_bins); in stmmac_probe_config_dt()
505 plat->has_gmac = 1; in stmmac_probe_config_dt()
506 plat->pmt = 1; in stmmac_probe_config_dt()
509 if (of_device_is_compatible(np, "snps,dwmac-4.00") || in stmmac_probe_config_dt()
510 of_device_is_compatible(np, "snps,dwmac-4.10a") || in stmmac_probe_config_dt()
511 of_device_is_compatible(np, "snps,dwmac-4.20a") || in stmmac_probe_config_dt()
512 of_device_is_compatible(np, "snps,dwmac-5.10a")) { in stmmac_probe_config_dt()
513 plat->has_gmac4 = 1; in stmmac_probe_config_dt()
514 plat->has_gmac = 0; in stmmac_probe_config_dt()
515 plat->pmt = 1; in stmmac_probe_config_dt()
516 plat->tso_en = of_property_read_bool(np, "snps,tso"); in stmmac_probe_config_dt()
519 if (of_device_is_compatible(np, "snps,dwmac-3.610") || in stmmac_probe_config_dt()
520 of_device_is_compatible(np, "snps,dwmac-3.710")) { in stmmac_probe_config_dt()
521 plat->enh_desc = 1; in stmmac_probe_config_dt()
522 plat->bugged_jumbo = 1; in stmmac_probe_config_dt()
523 plat->force_sf_dma_mode = 1; in stmmac_probe_config_dt()
527 plat->has_xgmac = 1; in stmmac_probe_config_dt()
528 plat->pmt = 1; in stmmac_probe_config_dt()
529 plat->tso_en = of_property_read_bool(np, "snps,tso"); in stmmac_probe_config_dt()
532 dma_cfg = devm_kzalloc(&pdev->dev, sizeof(*dma_cfg), in stmmac_probe_config_dt()
536 return ERR_PTR(-ENOMEM); in stmmac_probe_config_dt()
538 plat->dma_cfg = dma_cfg; in stmmac_probe_config_dt()
540 of_property_read_u32(np, "snps,pbl", &dma_cfg->pbl); in stmmac_probe_config_dt()
541 if (!dma_cfg->pbl) in stmmac_probe_config_dt()
542 dma_cfg->pbl = DEFAULT_DMA_PBL; in stmmac_probe_config_dt()
543 of_property_read_u32(np, "snps,txpbl", &dma_cfg->txpbl); in stmmac_probe_config_dt()
544 of_property_read_u32(np, "snps,rxpbl", &dma_cfg->rxpbl); in stmmac_probe_config_dt()
545 dma_cfg->pblx8 = !of_property_read_bool(np, "snps,no-pbl-x8"); in stmmac_probe_config_dt()
547 dma_cfg->aal = of_property_read_bool(np, "snps,aal"); in stmmac_probe_config_dt()
548 dma_cfg->fixed_burst = of_property_read_bool(np, "snps,fixed-burst"); in stmmac_probe_config_dt()
549 dma_cfg->mixed_burst = of_property_read_bool(np, "snps,mixed-burst"); in stmmac_probe_config_dt()
551 plat->force_thresh_dma_mode = of_property_read_bool(np, "snps,force_thresh_dma_mode"); in stmmac_probe_config_dt()
552 if (plat->force_thresh_dma_mode) { in stmmac_probe_config_dt()
553 plat->force_sf_dma_mode = 0; in stmmac_probe_config_dt()
554 dev_warn(&pdev->dev, in stmmac_probe_config_dt()
558 of_property_read_u32(np, "snps,ps-speed", &plat->mac_port_sel_speed); in stmmac_probe_config_dt()
560 plat->axi = stmmac_axi_setup(pdev); in stmmac_probe_config_dt()
569 if (!of_device_is_compatible(np, "snps,dwc-qos-ethernet-4.10")) { in stmmac_probe_config_dt()
570 plat->stmmac_clk = devm_clk_get(&pdev->dev, in stmmac_probe_config_dt()
572 if (IS_ERR(plat->stmmac_clk)) { in stmmac_probe_config_dt()
573 dev_warn(&pdev->dev, "Cannot get CSR clock\n"); in stmmac_probe_config_dt()
574 plat->stmmac_clk = NULL; in stmmac_probe_config_dt()
576 clk_prepare_enable(plat->stmmac_clk); in stmmac_probe_config_dt()
579 plat->pclk = devm_clk_get(&pdev->dev, "pclk"); in stmmac_probe_config_dt()
580 if (IS_ERR(plat->pclk)) { in stmmac_probe_config_dt()
581 if (PTR_ERR(plat->pclk) == -EPROBE_DEFER) in stmmac_probe_config_dt()
584 plat->pclk = NULL; in stmmac_probe_config_dt()
586 clk_prepare_enable(plat->pclk); in stmmac_probe_config_dt()
588 /* Fall-back to main clock in case of no PTP ref is passed */ in stmmac_probe_config_dt()
589 plat->clk_ptp_ref = devm_clk_get(&pdev->dev, "ptp_ref"); in stmmac_probe_config_dt()
590 if (IS_ERR(plat->clk_ptp_ref)) { in stmmac_probe_config_dt()
591 plat->clk_ptp_rate = clk_get_rate(plat->stmmac_clk); in stmmac_probe_config_dt()
592 plat->clk_ptp_ref = NULL; in stmmac_probe_config_dt()
593 dev_info(&pdev->dev, "PTP uses main clock\n"); in stmmac_probe_config_dt()
595 plat->clk_ptp_rate = clk_get_rate(plat->clk_ptp_ref); in stmmac_probe_config_dt()
596 dev_dbg(&pdev->dev, "PTP rate %d\n", plat->clk_ptp_rate); in stmmac_probe_config_dt()
599 plat->stmmac_rst = devm_reset_control_get(&pdev->dev, in stmmac_probe_config_dt()
601 if (IS_ERR(plat->stmmac_rst)) { in stmmac_probe_config_dt()
602 if (PTR_ERR(plat->stmmac_rst) == -EPROBE_DEFER) in stmmac_probe_config_dt()
605 dev_info(&pdev->dev, "no reset control found\n"); in stmmac_probe_config_dt()
606 plat->stmmac_rst = NULL; in stmmac_probe_config_dt()
612 clk_disable_unprepare(plat->pclk); in stmmac_probe_config_dt()
614 clk_disable_unprepare(plat->stmmac_clk); in stmmac_probe_config_dt()
616 return ERR_PTR(-EPROBE_DEFER); in stmmac_probe_config_dt()
620 * stmmac_remove_config_dt - undo the effects of stmmac_probe_config_dt()
629 of_node_put(plat->phy_node); in stmmac_remove_config_dt()
630 of_node_put(plat->mdio_node); in stmmac_remove_config_dt()
636 return ERR_PTR(-EINVAL); in stmmac_probe_config_dt()
655 stmmac_res->irq = platform_get_irq_byname(pdev, "macirq"); in stmmac_get_platform_resources()
656 if (stmmac_res->irq < 0) in stmmac_get_platform_resources()
657 return stmmac_res->irq; in stmmac_get_platform_resources()
664 * so the driver will continue to use the mac irq (ndev->irq) in stmmac_get_platform_resources()
666 stmmac_res->wol_irq = in stmmac_get_platform_resources()
668 if (stmmac_res->wol_irq < 0) { in stmmac_get_platform_resources()
669 if (stmmac_res->wol_irq == -EPROBE_DEFER) in stmmac_get_platform_resources()
670 return -EPROBE_DEFER; in stmmac_get_platform_resources()
671 dev_info(&pdev->dev, "IRQ eth_wake_irq not found\n"); in stmmac_get_platform_resources()
672 stmmac_res->wol_irq = stmmac_res->irq; in stmmac_get_platform_resources()
675 stmmac_res->lpi_irq = in stmmac_get_platform_resources()
677 if (stmmac_res->lpi_irq < 0) { in stmmac_get_platform_resources()
678 if (stmmac_res->lpi_irq == -EPROBE_DEFER) in stmmac_get_platform_resources()
679 return -EPROBE_DEFER; in stmmac_get_platform_resources()
680 dev_info(&pdev->dev, "IRQ eth_lpi not found\n"); in stmmac_get_platform_resources()
683 stmmac_res->addr = devm_platform_ioremap_resource(pdev, 0); in stmmac_get_platform_resources()
685 return PTR_ERR_OR_ZERO(stmmac_res->addr); in stmmac_get_platform_resources()
699 struct plat_stmmacenet_data *plat = priv->plat; in stmmac_pltfr_remove()
700 int ret = stmmac_dvr_remove(&pdev->dev); in stmmac_pltfr_remove()
702 if (plat->exit) in stmmac_pltfr_remove()
703 plat->exit(pdev, plat->bsp_priv); in stmmac_pltfr_remove()
727 if (priv->plat->exit) in stmmac_pltfr_suspend()
728 priv->plat->exit(pdev, priv->plat->bsp_priv); in stmmac_pltfr_suspend()
746 if (priv->plat->init) in stmmac_pltfr_resume()
747 priv->plat->init(pdev, priv->plat->bsp_priv); in stmmac_pltfr_resume()