summaryrefslogtreecommitdiff
path: root/sys/arch/armv7/imx
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2016-08-19 18:25:54 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2016-08-19 18:25:54 +0000
commitf0200c8f9f3fb180f20086dff9e64e4ced729428 (patch)
tree78dc56b8431888f5f8356bf622162d4e197d1bfa /sys/arch/armv7/imx
parent86a30b3cf08420597ac63110a02f1980dcfadbf2 (diff)
Seems we need to hold the PHY into reset a little bit longer. Without it
Theo's Cubox-i comes up without working Ethernet after a warm boot. ok deraadt@
Diffstat (limited to 'sys/arch/armv7/imx')
-rw-r--r--sys/arch/armv7/imx/if_fec.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/arch/armv7/imx/if_fec.c b/sys/arch/armv7/imx/if_fec.c
index d15b789dade..a20ab89f4c4 100644
--- a/sys/arch/armv7/imx/if_fec.c
+++ b/sys/arch/armv7/imx/if_fec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_fec.c,v 1.15 2016/08/06 17:18:38 kettenis Exp $ */
+/* $OpenBSD: if_fec.c,v 1.16 2016/08/19 18:25:53 kettenis Exp $ */
/*
* Copyright (c) 2012-2013 Patrick Wildt <patrick@blueri.se>
*
@@ -320,10 +320,14 @@ fec_attach(struct device *parent, struct device *self, void *aux)
* active-high.
*/
phy_reset_gpio[2] = GPIO_ACTIVE_LOW;
-
gpio_controller_config_pin(phy_reset_gpio, GPIO_CONFIG_OUTPUT);
+
+ /*
+ * On some Cubox-i machines we need to hold the PHY in
+ * reset a little bit longer than specified.
+ */
gpio_controller_set_pin(phy_reset_gpio, 1);
- delay(phy_reset_duration * 1000);
+ delay((phy_reset_duration + 1) * 1000);
gpio_controller_set_pin(phy_reset_gpio, 0);
delay(1000);
}