aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/zynq_gem.c
diff options
context:
space:
mode:
authorTom Rini2022-04-15 08:09:52 -0400
committerTom Rini2022-04-15 08:10:32 -0400
commit7f418ea59852945eeb9e5d2555d306f09643d555 (patch)
tree069dbaf3a1f62b68251189e9acdbd9affcbd98c5 /drivers/net/zynq_gem.c
parent239fe55a6ce516f329687c0680428ca2acfc73ca (diff)
parent0154e6de37e8bbaac837939391f6d4a8f0b3fd18 (diff)
Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-net
- DM9000 DM support - tftp server bug fix - mdio ofnode support functions - Various phy fixes and improvements. [trini: Fixup merge conflicts in drivers/net/phy/ethernet_id.c drivers/net/phy/phy.c include/phy.h]
Diffstat (limited to 'drivers/net/zynq_gem.c')
-rw-r--r--drivers/net/zynq_gem.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index 4c83ccc1dfb..4e8dd4badd6 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -889,7 +889,6 @@ static int zynq_gem_of_to_plat(struct udevice *dev)
struct eth_pdata *pdata = dev_get_plat(dev);
struct zynq_gem_priv *priv = dev_get_priv(dev);
struct ofnode_phandle_args phandle_args;
- const char *phy_mode;
pdata->iobase = (phys_addr_t)dev_read_addr(dev);
priv->iobase = (struct zynq_gem_regs *)pdata->iobase;
@@ -923,13 +922,9 @@ static int zynq_gem_of_to_plat(struct udevice *dev)
}
}
- phy_mode = dev_read_prop(dev, "phy-mode", NULL);
- if (phy_mode)
- pdata->phy_interface = phy_get_interface_by_name(phy_mode);
- if (pdata->phy_interface == -1) {
- debug("%s: Invalid PHY interface '%s'\n", __func__, phy_mode);
+ pdata->phy_interface = dev_read_phy_mode(dev);
+ if (pdata->phy_interface == PHY_INTERFACE_MODE_NA)
return -EINVAL;
- }
priv->interface = pdata->phy_interface;
priv->int_pcs = dev_read_bool(dev, "is-internal-pcspma");