linux/drivers/usb/dwc2
Gregory Herrero 5634e016cf usb: dwc2: host: wait 3ms for controller stabilization
Some high speed mass storage devices fail to enumerate with following
error:

Cannot enable port %i.  Maybe the USB cable is bad?

This happens only when the device is plugged while the controller
is in hibernation state. After exiting hibernation, the controller
detects the device as a low speed device and fail to enumerate it.

Problem occurs only if HPRT0.PWR bit is programmed in a too short
delay after exiting hibernation. Dumping hprt register in
_dwc2_hcd_resume() directly after dwc2_exit_hibernation() shows that
HPRT0.LNSTS (D+/D- level) becomes valid approximately 2ms after
exiting hibernation.

Since dwc2_exit_hibernation() is called from atomic context, move the
delay out of this function.

Delay value is experimental and not mentioned in Synopsys
documentation. To be on the safe side 3ms delay is used.

Signed-off-by: Gregory Herrero <gregory.herrero@intel.com>
Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@intel.com>
Tested-by: Robert Baldyga <r.baldyga@samsung.com>
Tested-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Tested-by: John Youn <johnyoun@synopsys.com>
Acked-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-10-01 12:40:18 -05:00
..
core_intr.c usb: dwc2: host: ignore wakeup interrupt if hibernation supported 2015-10-01 12:40:16 -05:00
core.c usb: dwc2: host: clear pending interrupts prior hibernation 2015-10-01 12:40:17 -05:00
core.h usb: dwc2: host: add flag to reflect bus state 2015-10-01 12:40:15 -05:00
debug.h usb: dwc2: move debugfs code to a separate file 2015-04-29 15:18:25 -05:00
debugfs.c usb: dwc2: Use platform endianness when accessing registers 2015-09-27 10:54:31 -05:00
gadget.c usb: dwc2: Use platform endianness when accessing registers 2015-09-27 10:54:31 -05:00
hcd_ddma.c usb: dwc2: Use platform endianness when accessing registers 2015-09-27 10:54:31 -05:00
hcd_intr.c usb: dwc2: Use platform endianness when accessing registers 2015-09-27 10:54:31 -05:00
hcd_queue.c usb: dwc2: host: reset frame number after suspend 2015-10-01 12:40:16 -05:00
hcd.c usb: dwc2: host: wait 3ms for controller stabilization 2015-10-01 12:40:18 -05:00
hcd.h usb: dwc2: Use platform endianness when accessing registers 2015-09-27 10:54:31 -05:00
hw.h usb: dwc2: gadget: replace constants with defines 2015-01-30 10:34:11 -06:00
Kconfig usb: dwc2: remove dwc2_platform.ko 2015-04-29 15:20:11 -05:00
Makefile usb: dwc2: remove dwc2_platform.ko 2015-04-29 15:20:11 -05:00
pci.c usb: dwc2: pci: Add device mode to the dwc2-pci driver 2015-03-11 15:08:17 -05:00
platform.c usb: common: of_usb_get_dr_mode to usb_get_dr_mode 2015-09-27 10:54:31 -05:00