Skip to contentSkip to conversation

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

PATCH In review Rafał Miłecki 3 participants 6 messages Feb 13, 2014 – Mar 19, 2014

Subsystems (2)
lore
Share & tools
lore

Rafał Miłecki

author maintainer
#0 lore raw

PATCH 1/1 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

---
Preferably this should go as a fix for 3.14. It's really trivial and allows support for some devices that require reset by GPIO after boot.

---
 arch/mips/bcm47xx/nvram.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/bcm47xx/nvram.c +1 -1
index 6decb27..2bed73a 100644
@@ -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;
Signature · 1 line
1.8.4.5
author maintainer
#1 lore raw

2014-02-13 17:48 GMT+01:00 Rafał Miłecki <[email protected]>:

Quoted 3 lines

Broadcom boards support 32 GPIOs and NVRAM may have entires for higher ones too. Example:
gpio23=wombo_reset

Ping? Guys?

author maintainer
#2 lore raw

2014-02-28 7:27 GMT+01:00 Rafał Miłecki <[email protected]>:

Quoted 6 lines

2014-02-13 17:48 GMT+01:00 Rafał Miłecki <[email protected]>:

Quoted 3 lines

Broadcom boards support 32 GPIOs and NVRAM may have entires for higher ones too. Example:
gpio23=wombo_reset

Ping? Guys?

Anyone? I've posted this patch a month ago.

maintainer Acked-by on v1 1/1
#3 lore raw
In reply to Rafał Miłecki
Quoted 5 lines · Rafał Miłecki

Broadcom boards support 32 GPIOs and NVRAM may have entires for higher ones too. Example:
gpio23=wombo_reset

Quoted 21 lines

---
Preferably this should go as a fix for 3.14. It's really trivial and allows support for some devices that require reset by GPIO after boot.

---
 arch/mips/bcm47xx/nvram.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/bcm47xx/nvram.c +1 -1
index 6decb27..2bed73a 100644
@@ -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;
#5 lore raw
Quoted 15 lines · Rafał Miłecki

Date: Wed, 19 Mar 2014 07:43:17 +0100
From: Rafał Miłecki <[email protected]>
To: Hauke Mehrtens <[email protected]>
Cc: "[email protected]" <[email protected]>, Ralf Baechle
<[email protected]>
Subject: Re: [3.14 FIX][PATCH] MIPS: BCM47XX: Check all (32) GPIOs when
looking for a pin
Content-Type: text/plain; charset=UTF-8

2014-03-14 22:30 GMT+01:00 Hauke Mehrtens <[email protected]>:

Quoted 5 lines · Rafał Miłecki
Quoted 4 lines

Broadcom boards support 32 GPIOs and NVRAM may have entires for higher ones too. Example:
gpio23=wombo_reset

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

Ralf: could you get it for 3.15 at least, please?

Funny, I applied your patch minutes before seeing this email.

Ralf