On Mon, 2015-01-19 at 20:19 -0700, Simon Glass wrote: > In commit a62e84d the old functionality of obtaining a PCI address from the > 'reg' property was lost. Add it back, so we can support both a compatible > string list and a 'reg' property. > > This patch fixes PCIe ethernet on Tegra boards. > > Signed-off-by: Simon Glass <s...@chromium.org> > --- > > lib/fdtdec.c | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) > > diff --git a/lib/fdtdec.c b/lib/fdtdec.c > index 89dac4c..0488607 100644 > --- a/lib/fdtdec.c > +++ b/lib/fdtdec.c > @@ -219,8 +219,14 @@ int fdtdec_get_pci_bdf(const void *blob, int node, > > /* get vendor id & device id from the compatible string */ > ret = fdtdec_get_pci_vendev(blob, node, &dt_vendor, &dt_device); > - if (ret) > - return ret; > + if (ret) { > + /* Fall back to using the 'reg' property */ > + ret = fdtdec_get_int(blob, node, "reg", -1); > + if (ret == -1) > + return -ENOENT; > + *bdf = ret & 0xffffff; > + return 0; > + }
Unless I'm missing something, this makes no sense. the 'reg' property should contain the physical address of the PCI device which this function already gets as one of its input parameters. Unless there is some valid case where the passed address isn't correct for the node ? -- Sjoerd Simons <sjoerd.sim...@collabora.co.uk> Collabora Ltd.
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot