summaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3
diff options
context:
space:
mode:
authorJohn Youn <John.Youn@synopsys.com>2015-12-17 11:16:31 -0800
committerFelipe Balbi <balbi@ti.com>2015-12-22 11:57:35 -0600
commit5268ed9d2e3b52f703f3661eef14cecbb2b572d4 (patch)
tree847550f1122e545615311314c78faf4a7a42673d /drivers/usb/dwc3
parent6bea962053e76a4407f0d138184a8737eea960ee (diff)
usb: dwc2: Fix dr_mode validation
The dr_mode parameter was being checked against how the dwc2 module was being configured at compile time. But it wasn't checked against the hardware capabilities, nor were the hardware capabilities checked against the compilation parameters. This commit adds those checks and adjusts dr_mode to an appropriate value, if needed. If the hardware capabilities and module compilation do not match then we fail as it wouldn't be possible to run properly. The hardware, module, and dr_mode, can each be set to host, device, or otg. Check that all these values are compatible and adjust the value of dr_mode if possible. The following table summarizes the behavior: actual HW MOD dr_mode dr_mode ------------------------------ HST HST any : HST HST DEV any : --- HST OTG any : HST DEV HST any : --- DEV DEV any : DEV DEV OTG any : DEV OTG HST any : HST OTG DEV any : DEV OTG OTG any : dr_mode Signed-off-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc3')
0 files changed, 0 insertions, 0 deletions