From: Michal Simek Date: Wed, 9 Dec 2015 08:29:12 +0000 (+0100) Subject: net: gem: Setup default phy address to -1 X-Git-Tag: v2016.01-rc3~17^2~11 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=bcdfef7a26170bc9ec9bfe19469cad68ee07312d;p=oweals%2Fu-boot.git net: gem: Setup default phy address to -1 Undefined phy address is -1 not 0. Signed-off-by: Michal Simek Acked-by: Joe Hershberger --- diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c index 0a41281e90..b0755f5e3b 100644 --- a/drivers/net/zynq_gem.c +++ b/drivers/net/zynq_gem.c @@ -666,11 +666,12 @@ static int zynq_gem_ofdata_to_platdata(struct udevice *dev) priv->iobase = (struct zynq_gem_regs *)pdata->iobase; /* Hardcode for now */ priv->emio = 0; + priv->phyaddr = -1; offset = fdtdec_lookup_phandle(gd->fdt_blob, dev->of_offset, "phy-handle"); if (offset > 0) - priv->phyaddr = fdtdec_get_int(gd->fdt_blob, offset, "reg", 0); + priv->phyaddr = fdtdec_get_int(gd->fdt_blob, offset, "reg", -1); phy_mode = fdt_getprop(gd->fdt_blob, dev->of_offset, "phy-mode", NULL); if (phy_mode)