]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
sunxi: Add CONFIG_MACPWR option
authorHans de Goede <hdegoede@redhat.com>
Sat, 26 Jul 2014 15:09:13 +0000 (17:09 +0200)
committerHans de Goede <hdegoede@redhat.com>
Thu, 31 Jul 2014 13:37:23 +0000 (15:37 +0200)
On some boards the ethernet-phy needs to be powered up through a gpio,
add support for this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
arch/arm/cpu/armv7/sunxi/board.c

index 8f2cef332f4f90d1329957216d0f3f9e20a4c43e..f2cedbb1568a8eaf5dd7c8a3c6ef4acc085286a1 100644 (file)
@@ -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) {