public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] pci: tegra: Fix port information parsing
@ 2015-01-20 17:06 Sjoerd Simons
  2015-01-20 19:05 ` Simon Glass
  2015-01-21  9:50 ` Thierry Reding
  0 siblings, 2 replies; 24+ messages in thread
From: Sjoerd Simons @ 2015-01-20 17:06 UTC (permalink / raw)
  To: u-boot

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>
---
 drivers/pci/pci_tegra.c | 5 ++---
 1 file 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;
 }
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2015-01-31 14:41 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-20 17:06 [U-Boot] [PATCH] pci: tegra: Fix port information parsing Sjoerd Simons
2015-01-20 19:05 ` Simon Glass
2015-01-21  2:37   ` Bin Meng
2015-01-21  8:24     ` Thierry Reding
2015-01-21  9:15       ` Bin Meng
2015-01-21  9:40         ` Thierry Reding
2015-01-21 16:04           ` Bin Meng
2015-01-23 10:19             ` Thierry Reding
2015-01-23 16:49               ` Stephen Warren
2015-01-24  4:37                 ` Bin Meng
2015-01-24  6:35                   ` Stephen Warren
2015-01-24 13:24                     ` Simon Glass
2015-01-26 17:44                       ` Stephen Warren
2015-01-26 18:18                         ` Simon Glass
2015-01-24  4:19               ` Bin Meng
2015-01-30 12:24                 ` Thierry Reding
2015-01-30 16:29                   ` Simon Glass
2015-01-31 14:41                   ` Bin Meng
2015-01-21  9:19       ` Sjoerd Simons
2015-01-21  8:59   ` Thierry Reding
2015-01-21  9:50 ` Thierry Reding
2015-01-21 16:07   ` Bin Meng
2015-01-22 16:37     ` Simon Glass
2015-01-24  3:33       ` Simon Glass

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox