summaryrefslogtreecommitdiff
path: root/drivers/net/dwc_eth_qos_imx.c
diff options
context:
space:
mode:
authorPhilip Oberfichtner <pro@denx.de>2024-08-02 11:25:37 +0200
committerTom Rini <trini@konsulko.com>2024-09-03 09:12:00 -0600
commitbeabef651139574ba372e6d0ba004fad1ce64759 (patch)
tree52135c7ed449d958430f74e6e2cb9afa25c74bef /drivers/net/dwc_eth_qos_imx.c
parent14b237a8bd169c81faef1c62c9bcb21c655cf5a4 (diff)
net: dwc_eth_qos: Adapt probe() for PCI devices
PCI devices do not necessarily use a device tree. In that case, the driver currently fails to find eqos->config and eqos->regs. This commit factors out the respective functionality. Device tree usage remains default, but board specific implementations will be possible as well. Signed-off-by: Philip Oberfichtner <pro@denx.de>
Diffstat (limited to 'drivers/net/dwc_eth_qos_imx.c')
-rw-r--r--drivers/net/dwc_eth_qos_imx.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/dwc_eth_qos_imx.c b/drivers/net/dwc_eth_qos_imx.c
index d6bed278ca7..642432834f5 100644
--- a/drivers/net/dwc_eth_qos_imx.c
+++ b/drivers/net/dwc_eth_qos_imx.c
@@ -47,6 +47,12 @@ static int eqos_probe_resources_imx(struct udevice *dev)
debug("%s(dev=%p):\n", __func__, dev);
+ ret = eqos_get_base_addr_dt(dev);
+ if (ret) {
+ dev_dbg(dev, "eqos_get_base_addr_dt failed: %d", ret);
+ goto err_probe;
+ }
+
interface = eqos->config->interface(dev);
if (interface == PHY_INTERFACE_MODE_NA) {