diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2016-08-19 18:25:54 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2016-08-19 18:25:54 +0000 |
commit | f0200c8f9f3fb180f20086dff9e64e4ced729428 (patch) | |
tree | 78dc56b8431888f5f8356bf622162d4e197d1bfa /sys/arch/armv7/imx | |
parent | 86a30b3cf08420597ac63110a02f1980dcfadbf2 (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.c | 10 |
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); } |