On some boards the phy needs to be powered up through a gpio, add support for
this.

Signed-off-by: Hans de Goede <hdego...@redhat.com>
---
 arch/arm/cpu/armv7/sunxi/board.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/cpu/armv7/sunxi/board.c b/arch/arm/cpu/armv7/sunxi/board.c
index 8f2cef3..f2cedbb 100644
--- a/arch/arm/cpu/armv7/sunxi/board.c
+++ b/arch/arm/cpu/armv7/sunxi/board.c
@@ -129,6 +129,11 @@ int cpu_eth_init(bd_t *bis)
 {
        __maybe_unused int rc;
 
+#ifdef CONFIG_MACPWR
+       gpio_direction_output(CONFIG_MACPWR, 1);
+       mdelay(200);
+#endif
+
 #ifdef CONFIG_SUNXI_EMAC
        rc = sunxi_emac_initialize(bis);
        if (rc < 0) {
-- 
2.0.1

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to