Signed-off-by: Rafał Miłecki <[email protected]>
---
 ...X-Check-all-32-GPIOs-when-looking-for-a-p.patch | 30 ++++++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 
target/linux/brcm47xx/patches-3.10/143-MIPS-BCM47XX-Check-all-32-GPIOs-when-looking-for-a-p.patch

diff --git 
a/target/linux/brcm47xx/patches-3.10/143-MIPS-BCM47XX-Check-all-32-GPIOs-when-looking-for-a-p.patch
 
b/target/linux/brcm47xx/patches-3.10/143-MIPS-BCM47XX-Check-all-32-GPIOs-when-looking-for-a-p.patch
new file mode 100644
index 0000000..42ce9fe
--- /dev/null
+++ 
b/target/linux/brcm47xx/patches-3.10/143-MIPS-BCM47XX-Check-all-32-GPIOs-when-looking-for-a-p.patch
@@ -0,0 +1,30 @@
+From 4fe2169acecb6e62821dfe14bc5c5852870b516f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <[email protected]>
+Date: Thu, 13 Feb 2014 17:48:12 +0100
+Subject: MIPS: BCM47XX: Check all (32) GPIOs when looking for a pin
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Broadcom boards support 32 GPIOs and NVRAM may have entires for higher
+ones too. Example:
+gpio23=wombo_reset
+
+Signed-off-by: Rafa? Mi?ecki <[email protected]>
+Acked-by: Hauke Mehrtens <[email protected]>
+Cc: [email protected]
+Cc: Rafał Miłecki <[email protected]>
+Patchwork: https://patchwork.linux-mips.org/patch/6547/
+Signed-off-by: Ralf Baechle <[email protected]>
+
+--- a/arch/mips/bcm47xx/nvram.c
++++ b/arch/mips/bcm47xx/nvram.c
+@@ -197,7 +197,7 @@ int bcm47xx_nvram_gpio_pin(const char *n
+       char nvram_var[10];
+       char buf[30];
+ 
+-      for (i = 0; i < 16; i++) {
++      for (i = 0; i < 32; i++) {
+               err = snprintf(nvram_var, sizeof(nvram_var), "gpio%i", i);
+               if (err <= 0)
+                       continue;
-- 
1.8.4.5
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to