linux_dsm_epyc7002/drivers/usb/dwc2
Vardan Mikayelyan 13b1f8e25b usb: dwc2: Force mode optimizations
If the dr_mode is USB_DR_MODE_OTG, forcing the mode is needed during
driver probe to get the host and device specific HW parameters. Then we
clear the force mode bits so that the core operates in OTG mode.

The force mode bits should not be touched at any other time during the
driver lifetime and they should be preserved whenever the GUSBCFG
register is written to. The force mode bit values will persist across
soft resets of the core.

If the dr_mode is either USB_DR_MODE_HOST or USB_DR_MODE_PERIPHERAL, the
force mode is set just once at probe to configure the core as either a
host or peripheral.

Given the above, we no longer need any other reset delays, force delays,
or any forced modes anywhere else in the driver. So replace all calls to
dwc2_core_reset_and_force_dr_mode() with dwc2_core_reset() and remove
all other unnecessary delays.

Also remove the dwc2_force_mode_if_needed() function since the "if
needed" part is already taken care of by the polling in
dwc2_force_mode().

Finally, remove all other calls to dwc2_clear_force_mode().

Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Vardan Mikayelyan <mvardan@synopsys.com>
Signed-off-by: Grigor Tovmasyan <tovmasya@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2018-03-13 10:47:58 +02:00
..
core_intr.c usb: dwc2: Add dwc2_handle_gpwrdn_intr() handler 2018-03-13 10:47:57 +02:00
core.c usb: dwc2: Force mode optimizations 2018-03-13 10:47:58 +02:00
core.h usb: dwc2: Force mode optimizations 2018-03-13 10:47:58 +02:00
debug.h USB: dwc2: Remove redundant license text 2017-11-07 15:45:01 +01:00
debugfs.c usb: dwc2: Rename hibernation to partial_power_down 2018-03-13 10:47:53 +02:00
gadget.c usb: dwc2: Add host/device hibernation functions 2018-03-13 10:47:56 +02:00
hcd_ddma.c USB: add SPDX identifiers to all remaining files in drivers/usb/ 2017-11-04 11:48:02 +01:00
hcd_intr.c usb: dwc2: host: Don't retry NAKed transactions right away 2017-12-13 11:27:53 +02:00
hcd_queue.c usb: dwc2: host: Don't retry NAKed transactions right away 2017-12-13 11:27:53 +02:00
hcd.c usb: dwc2: Force mode optimizations 2018-03-13 10:47:58 +02:00
hcd.h usb: dwc2: Delete unused functionality 2018-03-13 10:47:42 +02:00
hw.h usb: dwc2: Rename GLPMCFG... definitions 2018-03-13 10:47:47 +02:00
Kconfig usb: add CONFIG_USB_PCI for system have both PCI HW and non-PCI based USB HW 2017-03-17 13:16:56 +09:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
params.c usb: dwc2: Force mode optimizations 2018-03-13 10:47:58 +02:00
pci.c usb: dwc2: pci: Handle error cleanup in probe 2018-03-13 10:47:45 +02:00
platform.c usb: dwc2: Force mode optimizations 2018-03-13 10:47:58 +02:00