Date: Sat, 28 Sep 2019 22:23:21 +0000 (UTC) From: Emmanuel Vadot <manu@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352852 - head/sys/dev/dwc Message-ID: <201909282223.x8SMNLH3020879@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909282223.x8SMNLH3020879>