net: zynq_gem: Fix reading of max-speed property
authorSiva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Tue, 4 Sep 2018 13:38:53 +0000 (19:08 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Wed, 26 Sep 2018 08:15:00 +0000 (10:15 +0200)
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>
drivers/net/zynq_gem.c

index 68d1c2fceaffa0758020e540d6b4e12e265e0928..d5c3fbe75a0666e4d2db9086b38a56abdeea6bc7 100644 (file)
@@ -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,