UPSTREAM: usb: dwc2: Avoid more calls to dwc2_core_reset()
authorJacob Chen <jacob2.chen@rock-chips.com>
Tue, 16 Aug 2016 01:13:16 +0000 (09:13 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Thu, 18 Aug 2016 10:50:25 +0000 (18:50 +0800)
commita4dac316c91a9930dfdf74d2274db41362a10b53
treeab8dae100cd9001558ac89d13ef756a85cc1d9fb
parentb7e9324dbe33e278fb624d61d7537395262c639a
UPSTREAM: usb: dwc2: Avoid more calls to dwc2_core_reset()

Calls to dwc2_core_reset() are currently very slow, taking at least
150ms (possibly more).  It behooves us to take as many of these calls
out as possible.

It turns out that the calls in dwc2_fs_phy_init() and dwc2_hs_phy_init()
should (as documented in the code) only be needed if we need to do a PHY
SELECT.  That means that if we see that we can avoid the PHY SELECT then
we can avoid the reset.

This patch appears to successfully bypass two resets (one per USB
device) on rk3288-based ARM Chromebooks.

Change-Id: If9f7275d61af6fd8558124ff9ebc7c3622c1f4a3
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
(cherry picked from commit 7d56cc2620f523eba7a831daa22186c8ae5bbdfe)
drivers/usb/dwc2/core.c