Skip to contentSkip to conversation

sunxi: Request macpwr gpio before using it

PATCH New Hans de Goede 3 participants 3 messages Jun 7, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sunxi: Request macpwr gpio before using it

This fixes ethernet no longer working on boards which use a gpio to enable the phy.

---
 arch/arm/cpu/armv7/sunxi/board.c | 1 +
 1 file changed, 1 insertion(+)
arch/arm/cpu/armv7/sunxi/board.c +1 -0
index 215551f..bd0d819 100644
@@ -241,6 +241,7 @@ int cpu_eth_init(bd_t *bis)
 	__maybe_unused int rc;
 
 #ifdef CONFIG_MACPWR
+	gpio_request(CONFIG_MACPWR, "macpwr");
 	gpio_direction_output(CONFIG_MACPWR, 1);
 	mdelay(200);
 #endif
Signature · 1 line
2.4.2
#1 lore raw

PATCH 1/1 sunxi: Request macpwr gpio before using it

Quoted 4 lines · Hans de Goede

This fixes ethernet no longer working on boards which use a gpio to enable the phy.

Quoted 16 lines
---
 arch/arm/cpu/armv7/sunxi/board.c | 1 +
 1 file changed, 1 insertion(+)
arch/arm/cpu/armv7/sunxi/board.c +1 -0
index 215551f..bd0d819 100644
@@ -241,6 +241,7 @@ int cpu_eth_init(bd_t *bis)
 	__maybe_unused int rc;
 
 #ifdef CONFIG_MACPWR
+	gpio_request(CONFIG_MACPWR, "macpwr");
 	gpio_direction_output(CONFIG_MACPWR, 1);
 	mdelay(200);
 #endif
#2 lore raw

PATCH 1/1 sunxi: Request macpwr gpio before using it

In reply to Hans de Goede

Hi,

Quoted 5 lines · Hans de Goede

This fixes ethernet no longer working on boards which use a gpio to enable the phy.

---

Looks like we sent the same patch to the mailing list today :)
http://lists.denx.de/pipermail/u-boot/2015-June/216084.html

Quoted 17 lines
 arch/arm/cpu/armv7/sunxi/board.c | 1 +
 1 file changed, 1 insertion(+)
arch/arm/cpu/armv7/sunxi/board.c +1 -0
index 215551f..bd0d819 100644
@@ -241,6 +241,7 @@ int cpu_eth_init(bd_t *bis)
 	__maybe_unused int rc;
 
 #ifdef CONFIG_MACPWR
+	gpio_request(CONFIG_MACPWR, "macpwr");
 	gpio_direction_output(CONFIG_MACPWR, 1);
 	mdelay(200);
 #endif
Signature · 1 line
2.4.2

Tested the same on a Banana Pi board and if it matters,

Best Regards,
Maxin