MIPS: BCM47XX: Check all (32) GPIOs when looking for a pin
authorRafał Miłecki <zajec5@gmail.com>
Thu, 13 Feb 2014 16:48:12 +0000 (17:48 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Wed, 19 Mar 2014 08:28:10 +0000 (09:28 +0100)
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>
arch/mips/bcm47xx/nvram.c

index 6decb27cf48b4343e9358283775f82df82ed0aa5..2bed73a684aea021b4a296076880fed6a2ec489b 100644 (file)
@@ -196,7 +196,7 @@ int bcm47xx_nvram_gpio_pin(const char *name)
        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;