mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-22 15:02:32 +00:00
0de0955931
SVN-Revision: 35355
21 lines
662 B
Diff
21 lines
662 B
Diff
--- a/arch/mips/pci/pci-lantiq.c
|
|
+++ b/arch/mips/pci/pci-lantiq.c
|
|
@@ -129,8 +129,15 @@ static int __devinit ltq_pci_startup(str
|
|
|
|
/* setup reset gpio used by pci */
|
|
reset_gpio = of_get_named_gpio(node, "gpio-reset", 0);
|
|
- if (gpio_is_valid(reset_gpio))
|
|
- devm_gpio_request(&pdev->dev, reset_gpio, "pci-reset");
|
|
+ if (gpio_is_valid(reset_gpio)) {
|
|
+ int ret = devm_gpio_request(&pdev->dev, reset_gpio, "pci-reset");
|
|
+ if (ret) {
|
|
+ dev_err(&pdev->dev,
|
|
+ "failed to request gpio %d\n", reset_gpio);
|
|
+ return ret;
|
|
+ }
|
|
+ gpio_direction_output(reset_gpio, 1);
|
|
+ }
|
|
|
|
/* enable auto-switching between PCI and EBU */
|
|
ltq_pci_w32(0xa, PCI_CR_CLK_CTRL);
|