[PATCH v4 3/5] usb: dwc3-generic: Relax unsupported dr_mode check

Marek Vasut marex at denx.de
Fri Jul 28 16:01:17 CEST 2023


On 7/28/23 14:40, Jonas Karlman wrote:
> When dr_mode is peripheral or otg and U-Boot has not been built with
> DM_USB_GADGET support, booting such device may end up with:
> 
>    dwc3_glue_bind_common: subnode name: usb at fcc00000
>    Error binding driver 'dwc3-generic-wrapper': -6
>    Some drivers failed to bind
>    initcall sequence 00000000effbca08 failed at call 0000000000a217c8 (err=-6)
>    ### ERROR ### Please RESET the board ###
> 
> Instead fail gracfully with ENODEV to allow board continue booting.
> 
>    dwc3_glue_bind_common: subnode name: usb at fcc00000
>    dwc3_glue_bind_common: unsupported dr_mode 3
> 
> Also use CONFIG_IS_ENABLED(USB_HOST) and change switch to if statements
> to improve readability of the code.
> 
> Fixes: 446e3a205b87 ("dwc3-generic: Handle the PHYs, the clocks and the reset lines")
> Signed-off-by: Jonas Karlman <jonas at kwiboo.se>

Reviewed-by: Marek Vasut <marex at denx.de>


More information about the U-Boot mailing list