diff options
author | Michal Simek <michal.simek@xilinx.com> | 2015-12-09 09:29:12 +0100 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2015-12-18 13:15:58 +0100 |
commit | bcdfef7a26170bc9ec9bfe19469cad68ee07312d (patch) | |
tree | 5d32cf3915951351095455546c49a74a216bb145 /drivers/net | |
parent | 7bbf825492ef8399146a5885f5e4e90d296baf55 (diff) | |
download | u-boot-imx-bcdfef7a26170bc9ec9bfe19469cad68ee07312d.zip u-boot-imx-bcdfef7a26170bc9ec9bfe19469cad68ee07312d.tar.gz u-boot-imx-bcdfef7a26170bc9ec9bfe19469cad68ee07312d.tar.bz2 |
net: gem: Setup default phy address to -1
Undefined phy address is -1 not 0.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/zynq_gem.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c index 0a41281..b0755f5 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) |