1 From b6684dd3036513e4f91986fe982356512458f711 Mon Sep 17 00:00:00 2001
2 From: John Crispin <blogic@openwrt.org>
3 Date: Sat, 19 Jan 2013 08:54:26 +0000
4 Subject: [PATCH 18/40] MIPS: lantiq: improve pci reset gpio handling
6 We need to make sure that the reset gpio is available and also set a sane
9 Signed-off-by: John Crispin <blogic@openwrt.org>
10 Patchwork: http://patchwork.linux-mips.org/patch/4817/
12 arch/mips/pci/pci-lantiq.c | 12 ++++++++++--
13 1 file changed, 10 insertions(+), 2 deletions(-)
15 --- a/arch/mips/pci/pci-lantiq.c
16 +++ b/arch/mips/pci/pci-lantiq.c
17 @@ -129,8 +129,16 @@ static int ltq_pci_startup(struct platfo
19 /* setup reset gpio used by pci */
20 reset_gpio = of_get_named_gpio(node, "gpio-reset", 0);
21 - if (gpio_is_valid(reset_gpio))
22 - devm_gpio_request(&pdev->dev, reset_gpio, "pci-reset");
23 + if (gpio_is_valid(reset_gpio)) {
24 + int ret = devm_gpio_request(&pdev->dev,
25 + reset_gpio, "pci-reset");
28 + "failed to request gpio %d\n", reset_gpio);
31 + gpio_direction_output(reset_gpio, 1);
34 /* enable auto-switching between PCI and EBU */
35 ltq_pci_w32(0xa, PCI_CR_CLK_CTRL);