summaryrefslogtreecommitdiff
path: root/drivers/net/zynq_gem.c
diff options
context:
space:
mode:
authorSiva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>2018-09-04 19:08:53 +0530
committerMichal Simek <michal.simek@xilinx.com>2018-09-26 10:15:00 +0200
commitf213dbbdeca6d2444bfe90d9b422de056bc4d369 (patch)
tree26bf9d6757b7b5c6be93214ed8032dbc0b567b4a /drivers/net/zynq_gem.c
parent975e78932359230986bb0d2c9a0694285c163621 (diff)
downloadu-boot-f213dbbdeca6d2444bfe90d9b422de056bc4d369.tar.gz
net: zynq_gem: Fix reading of max-speed property
max-speed property is part of phynode and it has to be read using ofnode_read_u32_default(). This fixes the issue of incorrect max-speed read from DT. Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'drivers/net/zynq_gem.c')
-rw-r--r--drivers/net/zynq_gem.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index 68d1c2fcea..d5c3fbe75a 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -716,7 +716,8 @@ static int zynq_gem_ofdata_to_platdata(struct udevice *dev)
}
priv->interface = pdata->phy_interface;
- priv->max_speed = dev_read_u32_default(dev, "max-speed", SPEED_1000);
+ priv->max_speed = ofnode_read_u32_default(phandle_args.node,
+ "max-speed", SPEED_1000);
priv->int_pcs = dev_read_bool(dev, "is-internal-pcspma");
printf("ZYNQ GEM: %lx, phyaddr %x, interface %s\n", (ulong)priv->iobase,