Skip to content

Commit f14bcc0

Browse files
baruchsiachbjorn-helgaas
authored andcommitted
Revert "PCI: armada8k: Add support for gpio controlled reset signal"
Revert commit 3d71746 ("PCI: armada8k: Add support for gpio controlled reset signal"). That commit breaks boot on Macchiatobin board when a Mellanox NIC is present in the PCIe slot. It turns out that full reset cycle requires first comphy serdes initialization. Reset signal toggle without comphy initialization makes access to PCI configuration registers stall indefinitely. U-Boot toggles the Macchiatobin PCIe reset line already at boot, after initializing the comphy serdes. So while commit 3d71746 ("PCI: armada8k: Add support for gpio controlled reset signal") enables PCIe on platforms that U-Boot does not touch the reset line (like Clearfog GT-8K), it breaks PCIe (and boot) on the Macchiatobin board. Revert commit 3d71746 ("PCI: armada8k: Add support for gpio controlled reset signal") entirely to fix the Macchiatobin regression. Reported-by: Sven Auhagen <sven.auhagen@voleatech.de> Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
1 parent 432dd70 commit f14bcc0

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

drivers/pci/controller/dwc/pcie-armada8k.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,13 @@
2222
#include <linux/resource.h>
2323
#include <linux/of_pci.h>
2424
#include <linux/of_irq.h>
25-
#include <linux/gpio/consumer.h>
2625

2726
#include "pcie-designware.h"
2827

2928
struct armada8k_pcie {
3029
struct dw_pcie *pci;
3130
struct clk *clk;
3231
struct clk *clk_reg;
33-
struct gpio_desc *reset_gpio;
3432
};
3533

3634
#define PCIE_VENDOR_REGS_OFFSET 0x8000
@@ -139,12 +137,6 @@ static int armada8k_pcie_host_init(struct pcie_port *pp)
139137
struct dw_pcie *pci = to_dw_pcie_from_pp(pp);
140138
struct armada8k_pcie *pcie = to_armada8k_pcie(pci);
141139

142-
if (pcie->reset_gpio) {
143-
/* assert and then deassert the reset signal */
144-
gpiod_set_value_cansleep(pcie->reset_gpio, 1);
145-
msleep(100);
146-
gpiod_set_value_cansleep(pcie->reset_gpio, 0);
147-
}
148140
dw_pcie_setup_rc(pp);
149141
armada8k_pcie_establish_link(pcie);
150142

@@ -257,14 +249,6 @@ static int armada8k_pcie_probe(struct platform_device *pdev)
257249
goto fail_clkreg;
258250
}
259251

260-
/* Get reset gpio signal and hold asserted (logically high) */
261-
pcie->reset_gpio = devm_gpiod_get_optional(dev, "reset",
262-
GPIOD_OUT_HIGH);
263-
if (IS_ERR(pcie->reset_gpio)) {
264-
ret = PTR_ERR(pcie->reset_gpio);
265-
goto fail_clkreg;
266-
}
267-
268252
platform_set_drvdata(pdev, pcie);
269253

270254
ret = armada8k_add_pcie_port(pcie, pdev);

0 commit comments

Comments
 (0)