Skip to content

Commit

Permalink
Revert "MIPS: pci: lantiq: restore reset gpio polarity"
Browse files Browse the repository at this point in the history
commit 6e5aee0 upstream.

This reverts commit 277a036.

While fixing old boards with broken DTs, this change will break
newer ones with correct gpio polarity annotation.

Signed-off-by: Thomas Bogendoerfer <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
tsbogend authored and gregkh committed Jul 5, 2024
1 parent d0be1c8 commit 9b95f63
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions arch/mips/pci/pci-lantiq.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,14 @@ static int ltq_pci_startup(struct platform_device *pdev)
clk_disable(clk_external);

/* setup reset gpio used by pci */
reset_gpio = devm_gpiod_get_optional(&pdev->dev, "reset", GPIOD_ASIS);
reset_gpio = devm_gpiod_get_optional(&pdev->dev, "reset",
GPIOD_OUT_LOW);
error = PTR_ERR_OR_ZERO(reset_gpio);
if (error) {
dev_err(&pdev->dev, "failed to request gpio: %d\n", error);
return error;
}
gpiod_set_consumer_name(reset_gpio, "pci_reset");
gpiod_direction_output(reset_gpio, 1);

/* enable auto-switching between PCI and EBU */
ltq_pci_w32(0xa, PCI_CR_CLK_CTRL);
Expand Down Expand Up @@ -194,10 +194,10 @@ static int ltq_pci_startup(struct platform_device *pdev)

/* toggle reset pin */
if (reset_gpio) {
gpiod_set_value_cansleep(reset_gpio, 0);
gpiod_set_value_cansleep(reset_gpio, 1);
wmb();
mdelay(1);
gpiod_set_value_cansleep(reset_gpio, 1);
gpiod_set_value_cansleep(reset_gpio, 0);
}
return 0;
}
Expand Down

0 comments on commit 9b95f63

Please sign in to comment.