usb: dwc3: meson-g12a: fix shared reset control use
authorDan Robertson <dan@dlrobertson.com>
Mon, 13 Jul 2020 16:05:22 +0000 (12:05 -0400)
committerFelipe Balbi <balbi@kernel.org>
Fri, 24 Jul 2020 13:45:11 +0000 (16:45 +0300)
commit7a410953d1fb4dbe91ffcfdee9cbbf889d19b0d7
treeb24476eaa43efd5ee87a75dabe30348503e028be
parent916f8b627288039d9e771a9b2ab1b3c79b303039
usb: dwc3: meson-g12a: fix shared reset control use

The reset is a shared reset line, but reset_control_reset is still used
and reset_control_deassert is not guaranteed to have been called before
the first reset_control_assert call. When suspending the following
warning may be seen:

WARNING: CPU: 1 PID: 5530 at drivers/reset/core.c:355 reset_control_assert+0x184/0x19c
Hardware name: Hardkernel ODROID-N2 (DT)
[..]
pc : reset_control_assert+0x184/0x19c
lr : dwc3_meson_g12a_suspend+0x68/0x7c
[..]
Call trace:
 reset_control_assert+0x184/0x19c
 dwc3_meson_g12a_suspend+0x68/0x7c
 platform_pm_suspend+0x28/0x54
 __device_suspend+0x590/0xabc
 dpm_suspend+0x104/0x404
 dpm_suspend_start+0x84/0x1bc
 suspend_devices_and_enter+0xc4/0x4fc
 pm_suspend+0x198/0x2d4

Fixes: 6d9fa35a347a87 ("usb: dwc3: meson-g12a: get the reset as shared")
Signed-off-by: Dan Robertson <dan@dlrobertson.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
drivers/usb/dwc3/dwc3-meson-g12a.c