diff options
author | John Stultz <john.stultz@linaro.org> | 2018-05-19 03:49:03 +0300 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2018-05-21 10:35:46 +0300 |
commit | d98c624ab3bf9c3c988c3b7d0f24e703061a172f (patch) | |
tree | feed631fac97180666845d2212d32a8b01cced99 | |
parent | 6fb914d788133fd2298af87c50aefe1863cf1445 (diff) | |
download | linux-d98c624ab3bf9c3c988c3b7d0f24e703061a172f.tar.xz |
usb: dwc2: Fix HiKey regression caused by power_down feature
In 4.17-rc, commit 03ea6d6e9e1f ("usb: dwc2: Enable power down")
caused the HiKey board to not correctly handle switching between
usb-gadget and usb-host mode.
Unplugging the OTG port would result in:
[ 42.240973] dwc2 f72c0000.usb: dwc2_restore_host_registers: no host registers to restore
[ 42.249066] dwc2 f72c0000.usb: dwc2_host_exit_hibernation: failed to restore host registers
And the USB-host ports would not function.
And plugging in the OTG port, we would see:
[ 46.046557] WARNING: CPU: 3 PID: 6 at drivers/usb/dwc2/gadget.c:260 dwc2_hsotg_init_fifo+0x194/0x1a0
[ 46.055761] CPU: 3 PID: 6 Comm: kworker/u16:0 Not tainted 4.17.0-rc5-00030-ge67da8c #231
[ 46.055767] Hardware name: HiKey Development Board (DT)
[ 46.055784] Workqueue: dwc2 dwc2_conn_id_status_change
...
Thus, this patch sets the hisi params to disable the power_down
flag by default, and gets thing working again.
Cc: John Youn <johnyoun@synopsys.com>
Cc: Vardan Mikayelyan <mvardan@synopsys.com>
Cc: Artur Petrosyan <arturp@synopsys.com>
Cc: Grigor Tovmasyan <tovmasya@synopsys.com>
Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
Cc: linux-usb@vger.kernel.org
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-rw-r--r-- | drivers/usb/dwc2/params.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c index b43d8c6a749d..a24ba13a2f15 100644 --- a/drivers/usb/dwc2/params.c +++ b/drivers/usb/dwc2/params.c @@ -70,6 +70,7 @@ static void dwc2_set_his_params(struct dwc2_hsotg *hsotg) GAHBCFG_HBSTLEN_SHIFT; p->uframe_sched = false; p->change_speed_quirk = true; + p->power_down = false; } static void dwc2_set_rk_params(struct dwc2_hsotg *hsotg) |