diff options
author | blogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-03-14 18:42:29 +0000 |
---|---|---|
committer | blogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-03-14 18:42:29 +0000 |
commit | 9d15912357a1e78fa578780782752d6159d53b90 (patch) | |
tree | 1305b5b94ec649d510dfbd63ccedc77446db1517 /target/linux/lantiq/patches-3.8/0018-MIPS-lantiq-improve-pci-reset-gpio-handling.patch | |
parent | 6816ad29166ac86b0742c90a22a04d00b4d1a2ec (diff) |
[lantiq] bump to v3.8
Signed-off-by: John Crispin <blogic@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36014 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/lantiq/patches-3.8/0018-MIPS-lantiq-improve-pci-reset-gpio-handling.patch')
-rw-r--r-- | target/linux/lantiq/patches-3.8/0018-MIPS-lantiq-improve-pci-reset-gpio-handling.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/target/linux/lantiq/patches-3.8/0018-MIPS-lantiq-improve-pci-reset-gpio-handling.patch b/target/linux/lantiq/patches-3.8/0018-MIPS-lantiq-improve-pci-reset-gpio-handling.patch new file mode 100644 index 000000000..c41e8e1c8 --- /dev/null +++ b/target/linux/lantiq/patches-3.8/0018-MIPS-lantiq-improve-pci-reset-gpio-handling.patch @@ -0,0 +1,40 @@ +From b6684dd3036513e4f91986fe982356512458f711 Mon Sep 17 00:00:00 2001 +From: John Crispin <blogic@openwrt.org> +Date: Sat, 19 Jan 2013 08:54:26 +0000 +Subject: [PATCH 18/40] MIPS: lantiq: improve pci reset gpio handling + +We need to make sure that the reset gpio is available and also set a sane +default state. + +Signed-off-by: John Crispin <blogic@openwrt.org> +Patchwork: http://patchwork.linux-mips.org/patch/4817/ +--- + arch/mips/pci/pci-lantiq.c | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +diff --git a/arch/mips/pci/pci-lantiq.c b/arch/mips/pci/pci-lantiq.c +index 9568178..f32664b 100644 +--- a/arch/mips/pci/pci-lantiq.c ++++ b/arch/mips/pci/pci-lantiq.c +@@ -129,8 +129,16 @@ static int ltq_pci_startup(struct platform_device *pdev) + + /* 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); +-- +1.7.10.4 + |