Re: [U-Boot] [PATCH 2/3] fix: mvebu: pcie_dw: Allow probing empty PCIe slots

2017-05-09 Thread Stefan Roese

On 28.03.2017 17:36, kos...@marvell.com wrote:

From: Konstantin Porotchkin 

This patch allows probing all PCIe nodes defined in DTS
even if there no device connected to such node (no link).
Without this fix the driver returns -ENODEV when the PCIe
link is down. As result the pci_init function stops
scanning bus on first empty PCIe slot and all devices
located in higher numbered buses are not discovered.

Signed-off-by: Konstantin Porotchkin 
Cc: Stefan Roese 
Cc: Igal Liberman 
Cc: Nadav Haklai 


Applied to u-boot-marvell/master.

Thanks,
Stefan
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 2/3] fix: mvebu: pcie_dw: Allow probing empty PCIe slots

2017-03-30 Thread Stefan Roese

On 28.03.2017 17:36, kos...@marvell.com wrote:

From: Konstantin Porotchkin 

This patch allows probing all PCIe nodes defined in DTS
even if there no device connected to such node (no link).
Without this fix the driver returns -ENODEV when the PCIe
link is down. As result the pci_init function stops
scanning bus on first empty PCIe slot and all devices
located in higher numbered buses are not discovered.

Signed-off-by: Konstantin Porotchkin 
Cc: Stefan Roese 
Cc: Igal Liberman 
Cc: Nadav Haklai 
---
 drivers/pci/pcie_dw_mvebu.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/pci/pcie_dw_mvebu.c b/drivers/pci/pcie_dw_mvebu.c
index d4776a9..05a0660 100644
--- a/drivers/pci/pcie_dw_mvebu.c
+++ b/drivers/pci/pcie_dw_mvebu.c
@@ -487,13 +487,13 @@ static int pcie_dw_mvebu_probe(struct udevice *dev)
/* Don't register host if link is down */
if (!pcie_dw_mvebu_pcie_link_up(pcie->ctrl_base, LINK_SPEED_GEN_3)) {
printf("PCIE-%d: Link down\n", dev->seq);
-   return -ENODEV;
+   } else {
+   printf("PCIE-%d: Link up (Gen%d-x%d, Bus%d)\n", dev->seq,
+  pcie_dw_get_link_speed(pcie->ctrl_base),
+  pcie_dw_get_link_width(pcie->ctrl_base),
+  hose->first_busno);
}

-   printf("PCIE-%d: Link up (Gen%d-x%d, Bus%d)\n", dev->seq,
-  pcie_dw_get_link_speed(pcie->ctrl_base),
-  pcie_dw_get_link_width(pcie->ctrl_base), hose->first_busno);
-
pcie_dw_regions_setup(pcie);

/* Set the CLASS_REV of RC CFG header to PCI_CLASS_BRIDGE_PCI */



Reviewed-by: Stefan Roese 

Thanks,
Stefan
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH 2/3] fix: mvebu: pcie_dw: Allow probing empty PCIe slots

2017-03-28 Thread kostap
From: Konstantin Porotchkin 

This patch allows probing all PCIe nodes defined in DTS
even if there no device connected to such node (no link).
Without this fix the driver returns -ENODEV when the PCIe
link is down. As result the pci_init function stops
scanning bus on first empty PCIe slot and all devices
located in higher numbered buses are not discovered.

Signed-off-by: Konstantin Porotchkin 
Cc: Stefan Roese 
Cc: Igal Liberman 
Cc: Nadav Haklai 
---
 drivers/pci/pcie_dw_mvebu.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/pci/pcie_dw_mvebu.c b/drivers/pci/pcie_dw_mvebu.c
index d4776a9..05a0660 100644
--- a/drivers/pci/pcie_dw_mvebu.c
+++ b/drivers/pci/pcie_dw_mvebu.c
@@ -487,13 +487,13 @@ static int pcie_dw_mvebu_probe(struct udevice *dev)
/* Don't register host if link is down */
if (!pcie_dw_mvebu_pcie_link_up(pcie->ctrl_base, LINK_SPEED_GEN_3)) {
printf("PCIE-%d: Link down\n", dev->seq);
-   return -ENODEV;
+   } else {
+   printf("PCIE-%d: Link up (Gen%d-x%d, Bus%d)\n", dev->seq,
+  pcie_dw_get_link_speed(pcie->ctrl_base),
+  pcie_dw_get_link_width(pcie->ctrl_base),
+  hose->first_busno);
}
 
-   printf("PCIE-%d: Link up (Gen%d-x%d, Bus%d)\n", dev->seq,
-  pcie_dw_get_link_speed(pcie->ctrl_base),
-  pcie_dw_get_link_width(pcie->ctrl_base), hose->first_busno);
-
pcie_dw_regions_setup(pcie);
 
/* Set the CLASS_REV of RC CFG header to PCI_CLASS_BRIDGE_PCI */
-- 
2.7.4

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot