]> git.baikalelectronics.ru Git - kernel.git/commit
usb: dwc3: core: improve reset sequence
authorFelipe Balbi <felipe.balbi@linux.intel.com>
Fri, 11 Mar 2016 08:51:52 +0000 (10:51 +0200)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 29 Mar 2016 06:30:31 +0000 (09:30 +0300)
commit7213250026537af793727626a6fa31000146ecad
treeb61057df86df875d35a2b4b5dcf836226f659fde
parent0b81317232ff5a5b95b5432fc9c3beb10f50538f
usb: dwc3: core: improve reset sequence

According to Synopsys Databook, we shouldn't be
relying on GCTL.CORESOFTRESET bit as that's only for
debugging purposes. Instead, let's use DCTL.CSFTRST
if we're OTG or PERIPHERAL mode.

Host side block will be reset by XHCI driver if
necessary. Note that this reduces amount of time
spent on dwc3_probe() by a long margin.

We're still gonna wait for reset to finish for a
long time (default to 1ms max), but tests show that
the reset polling loop executed at most 19 times
(modprobe dwc3 && modprobe -r dwc3 executed 1000
times in a row).

Suggested-by: Mian Yousaf Kaukab <yousaf.kaukab@intel.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc3/core.c