diff options
author | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2015-01-20 18:06:53 +0100 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-01-23 17:25:30 -0700 |
commit | 053b86e6d8e50359412e626c33bae3f7bafd74dd (patch) | |
tree | e9124bbc3254834651ee9e46a7386477f73fca70 /drivers | |
parent | fea1c47f5481871f9aad70a02dc8c66b91332774 (diff) | |
download | u-boot-imx-053b86e6d8e50359412e626c33bae3f7bafd74dd.zip u-boot-imx-053b86e6d8e50359412e626c33bae3f7bafd74dd.tar.gz u-boot-imx-053b86e6d8e50359412e626c33bae3f7bafd74dd.tar.bz2 |
pci: tegra: Fix port information parsing
commit a62e84d7b1824a202dd incorrectly changed the tegra pci code to the
new fdtdec pci helpers. To get the device index of the root port, the
"reg" property should be parsed from the dtb (as was previously the
case).
With this patch i can successfully network boot my jetson tk1
Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Tested-by: Thierry Reding <treding@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pci/pci_tegra.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/pci/pci_tegra.c b/drivers/pci/pci_tegra.c index f9e05ad..67b5fdf 100644 --- a/drivers/pci/pci_tegra.c +++ b/drivers/pci/pci_tegra.c @@ -459,7 +459,6 @@ static int tegra_pcie_parse_port_info(const void *fdt, int node, unsigned int *lanes) { struct fdt_pci_addr addr; - pci_dev_t bdf; int err; err = fdtdec_get_int(fdt, node, "nvidia,num-lanes", 0); @@ -470,13 +469,13 @@ static int tegra_pcie_parse_port_info(const void *fdt, int node, *lanes = err; - err = fdtdec_get_pci_bdf(fdt, node, &addr, &bdf); + err = fdtdec_get_pci_addr(fdt, node, 0, "reg", &addr); if (err < 0) { error("failed to parse \"reg\" property"); return err; } - *index = PCI_DEV(bdf) - 1; + *index = PCI_DEV(addr.phys_hi) - 1; return 0; } |