diff options
author | Hauke Mehrtens <hauke@openwrt.org> | 2014-03-30 19:07:46 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@openwrt.org> | 2014-03-30 19:07:46 +0000 |
commit | 30de67d40915074d15e73cc57baa73cf9898a560 (patch) | |
tree | 39469149c0d8d4074ef96fa31649caf4fd3992d0 /target/linux/brcm47xx/patches-3.10 | |
parent | ec78ae869e42da9b32fc3eb664e551b5beb97b53 (diff) | |
download | upstream-30de67d40915074d15e73cc57baa73cf9898a560.tar.gz upstream-30de67d40915074d15e73cc57baa73cf9898a560.tar.bz2 upstream-30de67d40915074d15e73cc57baa73cf9898a560.zip |
brcm47xx: backport 3.14 patch for nvram GPIO pin read
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40346 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm47xx/patches-3.10')
-rw-r--r-- | target/linux/brcm47xx/patches-3.10/143-MIPS-BCM47XX-Check-all-32-GPIOs-when-looking-for-a-p.patch | 30 |
1 files changed, 30 insertions, 0 deletions
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 0000000000..42ce9feaee --- /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?= <zajec5@gmail.com> +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 <zajec5@gmail.com> +Acked-by: Hauke Mehrtens <hauke@hauke-m.de> +Cc: linux-mips@linux-mips.org +Cc: Rafał Miłecki <zajec5@gmail.com> +Patchwork: https://patchwork.linux-mips.org/patch/6547/ +Signed-off-by: Ralf Baechle <ralf@linux-mips.org> + +--- 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; |