UPSTREAM: usb: dwc2: Improve handling of host and device hwparams
authorJohn Youn <John.Youn@synopsys.com>
Thu, 17 Dec 2015 19:17:31 +0000 (11:17 -0800)
committerHuang, Tao <huangtao@rock-chips.com>
Tue, 3 Jan 2017 10:47:51 +0000 (18:47 +0800)
commitf1d08ed2b02c571664c46cfce96a03bc8e9f1a43
treeaa6d9221764105883bae883bbb86fc4e2e660be5
parentcdef4b1644cda6807c24a26dd0c10e59f1045815
UPSTREAM: usb: dwc2: Improve handling of host and device hwparams

Adds separate functions to get the host and device specific hardware
parameters. The functions check whether the parameters need to be read
at all, depending on dr_mode, and forces the mode only if necessary.
This saves some delays during probe. This also adds two device mode
parameters that will be used by the gadget.

Change-Id: I474f447fa750c9d5daa98a6ebd37b7929d0b4515
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
(cherry picked from commit 55e1040e424b59063da627fb580ec953f4c01de7)
drivers/usb/dwc2/core.c
drivers/usb/dwc2/core.h