Skip to content

Commit ceabd79

Browse files
tsbogendgregkh
authored andcommitted
Revert "MIPS: pci: lantiq: restore reset gpio polarity"
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]>
1 parent 3ae15c0 commit ceabd79

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

arch/mips/pci/pci-lantiq.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,14 +124,14 @@ static int ltq_pci_startup(struct platform_device *pdev)
124124
clk_disable(clk_external);
125125

126126
/* setup reset gpio used by pci */
127-
reset_gpio = devm_gpiod_get_optional(&pdev->dev, "reset", GPIOD_ASIS);
127+
reset_gpio = devm_gpiod_get_optional(&pdev->dev, "reset",
128+
GPIOD_OUT_LOW);
128129
error = PTR_ERR_OR_ZERO(reset_gpio);
129130
if (error) {
130131
dev_err(&pdev->dev, "failed to request gpio: %d\n", error);
131132
return error;
132133
}
133134
gpiod_set_consumer_name(reset_gpio, "pci_reset");
134-
gpiod_direction_output(reset_gpio, 1);
135135

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

195195
/* toggle reset pin */
196196
if (reset_gpio) {
197-
gpiod_set_value_cansleep(reset_gpio, 0);
197+
gpiod_set_value_cansleep(reset_gpio, 1);
198198
wmb();
199199
mdelay(1);
200-
gpiod_set_value_cansleep(reset_gpio, 1);
200+
gpiod_set_value_cansleep(reset_gpio, 0);
201201
}
202202
return 0;
203203
}

0 commit comments

Comments
 (0)