usb: dwc2: host: create a function to handle port_resume
authorGregory Herrero <gregory.herrero@intel.com>
Tue, 22 Sep 2015 13:16:38 +0000 (15:16 +0200)
committerFelipe Balbi <balbi@ti.com>
Thu, 1 Oct 2015 17:40:14 +0000 (12:40 -0500)
commit30db103c3ddeb0b616eedb8fd030b88efb1af96f
treed6562703bb3f1bd1213227ae9670d4875177ef6e
parentcc047ce4be6188d3bd3997b44ec724ce390fbdcb
usb: dwc2: host: create a function to handle port_resume

port resume sequence may be used in different places. Create a
function to handle it. Make hprt0 read-modify-write atomic and
clear HPRT0_SUSP for both writes as it is a "read, write-set,
and self-clear (R_WS_SC)" bit. Since the lock is released
between the writes, read hprt0 again.

Since the phy clock is stopped in dwc2_port_suspend(), enable it
here and remove the PCGCTL write from dwc2_hcd_hub_control()

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>
drivers/usb/dwc2/hcd.c