svn commit: r352852 - head/sys/dev/dwc
Emmanuel Vadot
manu at FreeBSD.org
Sat Sep 28 22:23:22 UTC 2019
Author: manu
Date: Sat Sep 28 22:23:21 2019
New Revision: 352852
URL: https://svnweb.freebsd.org/changeset/base/352852
Log:
dwc: Add more delay for chip reset
On rockchip board it seems that the value in the DTS
are not enough for reseting the chip, I don't know if
the value are really incorrect or if DELAY is not precise
enough or if the rockchip gpio driver have some "lag" of some
kind or not.
For now just add more delay.
Modified:
head/sys/dev/dwc/if_dwc.c
Modified: head/sys/dev/dwc/if_dwc.c
==============================================================================
--- head/sys/dev/dwc/if_dwc.c Sat Sep 28 22:21:16 2019 (r352851)
+++ head/sys/dev/dwc/if_dwc.c Sat Sep 28 22:23:21 2019 (r352852)
@@ -1074,16 +1074,13 @@ dwc_reset(device_t dev)
if (OF_hasprop(node, "snps,reset-active-low"))
pin_value = GPIO_PIN_HIGH;
- if (flags & GPIO_ACTIVE_LOW)
- pin_value = !pin_value;
-
GPIO_PIN_SETFLAGS(gpio, pin, GPIO_PIN_OUTPUT);
GPIO_PIN_SET(gpio, pin, pin_value);
- DELAY(delay_prop[0]);
+ DELAY(delay_prop[0] * 5);
GPIO_PIN_SET(gpio, pin, !pin_value);
- DELAY(delay_prop[1]);
+ DELAY(delay_prop[1] * 5);
GPIO_PIN_SET(gpio, pin, pin_value);
- DELAY(delay_prop[2]);
+ DELAY(delay_prop[2] * 5);
return (0);
}
More information about the svn-src-all
mailing list