linux/drivers/usb/dwc3
Thinh Nguyen 9d6173e125 usb: dwc3: Fix dr_mode validation
This patch follows the similar fix in dwc2. See
commit 5268ed9d2e ("usb: dwc2: Fix dr_mode validation")

Currently, the dr_mode is only checked against the module configuration.
It also needs to be checked against the hardware capablities.

The driver now checks if both the module configuration and hardware are
capable of the dr_mode value. If not, then it will issue a warning and
fall back to a supported value. If it is unable to fall back to a
suitable value, then the probe will fail.

Behavior summary:

      module          :  actual
 HW   config  dr_mode :  dr_mode
---------------------------------
 host  host   any     :  host
 host  dev    any     :  INVALID
 host  otg    any     :  host

 dev   host   any     :  INVALID
 dev   dev    any     :  dev
 dev   otg    any     :  dev

 otg   host   any     :  host
 otg   dev    any     :  dev
 otg   otg    any     :  dr_mode

Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-09-07 13:29:20 +03:00
..
core.c usb: dwc3: Fix dr_mode validation 2016-09-07 13:29:20 +03:00
core.h usb: dwc3: Fix dr_mode validation 2016-09-07 13:29:20 +03:00
debug.c usb: dwc3: add tracepoints to aid debugging 2014-09-05 09:55:51 -05:00
debug.h usb: dwc3: gadget: improve gcmd trace 2016-06-20 12:32:41 +03:00
debugfs.c usb: dwc3: add DWC3_GUCTL1 reg for debug 2016-06-20 12:32:46 +03:00
dwc3-exynos.c usb: dwc3: exynos: Fix deferred probing storm. 2016-05-31 11:12:42 +03:00
dwc3-keystone.c usb: dwc3: keystone: drop dma_mask configuration 2016-04-06 16:36:01 +03:00
dwc3-of-simple.c usb: dwc3: of-simple: add compatible for rockchip rk3399 2016-08-25 12:13:12 +03:00
dwc3-omap.c usb: dwc3: omap: Pass VBUS and ID events transparently 2016-06-20 12:32:47 +03:00
dwc3-pci.c usb: dwc3: pci: add Intel Kabylake PCI ID 2016-08-10 14:15:58 +03:00
dwc3-st.c - Final patches fixing Reset API change 2016-07-01 15:17:16 -07:00
ep0.c usb: dwc3: remove trailing newline from dwc3_trace 2016-06-20 12:32:48 +03:00
gadget.c usb: dwc3: gadget: stop kicking if we run out of space 2016-08-25 12:13:21 +03:00
gadget.h usb: dwc3: gadget: add a pointer to endpoint registers 2016-06-20 12:32:35 +03:00
host.c usb: dwc3: host: Fix broken XHCI host 2016-07-01 08:59:44 -07:00
io.h usb: dwc3: gadget: add a pointer to endpoint registers 2016-06-20 12:32:35 +03:00
Kconfig usb: dwc3: remove dwc3-qcom in favor of dwc3-of-simple 2015-12-15 09:12:41 -06:00
Makefile usb: dwc3: remove dwc3-qcom in favor of dwc3-of-simple 2015-12-15 09:12:41 -06:00
trace.c usb: dwc3: add tracepoints to aid debugging 2014-09-05 09:55:51 -05:00
trace.h usb: dwc3: gadget: keep track of allocated and queued reqs 2016-06-20 12:32:49 +03:00
ulpi.c usb: dwc3: ulpi: make dwc3_ulpi_ops constant 2016-09-06 10:47:26 +03:00