diff options
author | Amelie Delaunay <amelie.delaunay@foss.st.com> | 2021-10-05 11:53:04 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-10-21 12:49:00 +0200 |
commit | 8d387f61b0240854e81450c261beb775065bad5d (patch) | |
tree | 803351af108e3e21caea08969b5a79d09d04bd3e /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | b2cab2a24fb5d13ce1d384ecfb6de827fa08a048 (diff) |
usb: dwc2: drd: fix dwc2_drd_role_sw_set when clock could be disabled
In case of USB_DR_MODE_PERIPHERAL, the OTG clock is disabled at the end of
the probe (it is not the case if USB_DR_MODE_HOST or USB_DR_MODE_OTG).
The clock is then enabled on udc_start.
If dwc2_drd_role_sw_set is called before udc_start (it is the case if the
usb cable is plugged at boot), GOTGCTL and GUSBCFG registers cannot be
read/written, so session cannot be overridden.
To avoid this case, check the ll_hw_enabled value and enable the clock if
it is available, and disable it after the override.
Fixes: 17f934024e84 ("usb: dwc2: override PHY input signals with usb role switch support")
Acked-by: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
Link: https://lore.kernel.org/r/20211005095305.66397-3-amelie.delaunay@foss.st.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions