From: Hans de Goede Date: Sat, 26 Jul 2014 15:09:13 +0000 (+0200) Subject: sunxi: Add CONFIG_MACPWR option X-Git-Tag: v2014.10-rc2~51^2~5^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fc703001365262b7dae6d11d2e32b2c8894a5e43;p=platform%2Fkernel%2Fu-boot.git sunxi: Add CONFIG_MACPWR option On some boards the ethernet-phy needs to be powered up through a gpio, add support for this. Signed-off-by: Hans de Goede Acked-by: Ian Campbell --- 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) {