UPSTREAM: usb: dwc3: core: Move the mode setting to the right place

When dwc3 core enters into suspend mode, the system (especially for mobile
device) may power off the dwc3 controller for power saving, that will cause
dwc3 controller lost the mode operation when resuming dwc3 core.

Thus we can move the mode setting into dwc3_core_init() function to avoid this

Signed-off-by: Baolin Wang <>
Signed-off-by: Felipe Balbi <>

TEST=Run suspend_stress_test with USB3 flash drives in both Type-C ports

(cherry picked from commit 00af62330c39a6c88615a08e7f9d068944e4af69)
Signed-off-by: Guenter Roeck <>

Change-Id: If30c32bea2855bcfedb8793747e710e213f9ab6f
Commit-Ready: Guenter Roeck <>
Tested-by: Guenter Roeck <>
Reviewed-by: Douglas Anderson <>
Reviewed-by: Matthias Kaehlcke <>
(cherry picked from commit d8cee134288dfc5abce5a01cfeed0d09f4d1704b)
Tested-by: Douglas Anderson <>
1 file changed