From: Siva Durga Prasad Paladugu Date: Tue, 4 Sep 2018 13:38:53 +0000 (+0530) Subject: net: zynq_gem: Fix reading of max-speed property X-Git-Tag: v2018.11-rc1~81^2~2 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f213dbbdeca6d2444bfe90d9b422de056bc4d369;p=oweals%2Fu-boot.git 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 Acked-by: Joe Hershberger Signed-off-by: Michal Simek --- 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,