usb: dwc3-generic: Fix ref clock enable error check
A message that is not in the archive (sent off-list or not yet received): [email protected]
Marek Vasut
Reviewed-byQuoted 17 lines · Jonas Karlman
The commit
84de44e5e71e("usb: dwc3-generic: fix ref clock lookup indexing wrongclk_bulkarray") introduced aclk_enable()call for the ref clock.However,
clk_enable()may return-ENOSYSwhen a clock driver does not implement the .enable ops, i.e., for most Rockchip SoCs where most/all clocks typically are un-gated out of system reset.The new
clk_enable()call may cause USB to fail on such platforms, e.g.:=> ums mmc 0
UMS: LUN 0, dev mmc 0, hwpart 0, sector0x0, count0x3a3e000dwc3-generic-peripheral usb@fcc00000: failed to enable ref clock: -38 dwc3-generic-peripheral usb@fcc00000: failed to enable ref clock: -38 No USB device found
Couldn't init USB controller.
Quoted 5 lines
Ignore
-ENOSYSerrors fromclk_enable()to restore DWC3 to a working state on affected platforms.Fixes 84de44e5e71e ("usb: dwc3-generic: fix ref clock lookup indexing wrong clk_bulk array")Signed-off-by Jonas Karlman <[email protected]>
Tom, can you please pick this directly into main ?
Thank you!
Quoted 17 lines · Jonas Karlman
The commit
84de44e5e71e("usb: dwc3-generic: fix ref clock lookup indexing wrongclk_bulkarray") introduced aclk_enable()call for the ref clock.However,
clk_enable()may return-ENOSYSwhen a clock driver does not implement the .enable ops, i.e., for most Rockchip SoCs where most/all clocks typically are un-gated out of system reset.The new
clk_enable()call may cause USB to fail on such platforms, e.g.:=> ums mmc 0
UMS: LUN 0, dev mmc 0, hwpart 0, sector0x0, count0x3a3e000dwc3-generic-peripheral usb@fcc00000: failed to enable ref clock: -38 dwc3-generic-peripheral usb@fcc00000: failed to enable ref clock: -38 No USB device found
Couldn't init USB controller.
Quoted 6 lines
Ignore
-ENOSYSerrors fromclk_enable()to restore DWC3 to a working state on affected platforms.Fixes 84de44e5e71e ("usb: dwc3-generic: fix ref clock lookup indexing wrong clk_bulk array")Signed-off-by Jonas Karlman <[email protected]>Reviewed-by Marek Vasut <[email protected]>
Applied to u-boot/main, thanks!
Signature · 1 line
Tom