Commit 4fe2169a authored by Rafał Miłecki's avatar Rafał Miłecki Committed by Ralf Baechle

MIPS: BCM47XX: Check all (32) GPIOs when looking for a pin

Broadcom boards support 32 GPIOs and NVRAM may have entires for higher
ones too. Example:
gpio23=wombo_reset
Signed-off-by: default avatarRafa? Mi?ecki <zajec5@gmail.com>
Acked-by: default avatarHauke 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: default avatarRalf Baechle <ralf@linux-mips.org>
parent e4362d1e
...@@ -196,7 +196,7 @@ int bcm47xx_nvram_gpio_pin(const char *name) ...@@ -196,7 +196,7 @@ int bcm47xx_nvram_gpio_pin(const char *name)
char nvram_var[10]; char nvram_var[10];
char buf[30]; 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); err = snprintf(nvram_var, sizeof(nvram_var), "gpio%i", i);
if (err <= 0) if (err <= 0)
continue; continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment