summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2014-07-26 17:09:13 +0200
committerHans de Goede <hdegoede@redhat.com>2014-07-31 15:37:23 +0200
commitfc703001365262b7dae6d11d2e32b2c8894a5e43 (patch)
tree1940e66843103645014b725cdcabf6e0def7be5d
parent0061e46462da670ba0f6811d407df438692f137d (diff)
downloadu-boot-imx-fc703001365262b7dae6d11d2e32b2c8894a5e43.zip
u-boot-imx-fc703001365262b7dae6d11d2e32b2c8894a5e43.tar.gz
u-boot-imx-fc703001365262b7dae6d11d2e32b2c8894a5e43.tar.bz2
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 <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
-rw-r--r--arch/arm/cpu/armv7/sunxi/board.c5
1 files changed, 5 insertions, 0 deletions
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) {