u-boot/drivers/usb/dwc3
Jonas Karlman 6913c30516 usb: dwc3-generic: Relax unsupported dr_mode check
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@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@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: 446e3a205b ("dwc3-generic: Handle the PHYs, the clocks and the reset lines")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Marek Vasut <marex@denx.de>
2023-07-31 14:40:38 +08:00
..
core.c usb: dwc3: Drop support for "snps, ref-clock-period-ns" DT property 2022-11-27 15:34:56 +01:00
core.h usb: dwc3: Program GFLADJ 2022-11-27 15:34:56 +01:00
dwc3-generic.c usb: dwc3-generic: Relax unsupported dr_mode check 2023-07-31 14:40:38 +08:00
dwc3-generic.h usb: dwc3-generic: Add the size of regs property to glue structure 2023-02-22 19:40:11 +01:00
dwc3-layerscape.c usb: dwc3: add layerscape support 2021-11-09 17:18:23 +05:30
dwc3-meson-g12a.c usb: dwc3-meson-g12a: force mode on child add/removal 2023-01-17 09:27:17 +01:00
dwc3-meson-gxl.c usb: dwc3-meson-gxl: force mode on child add/removal 2023-01-20 16:21:31 +01:00
dwc3-omap.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
dwc3-uniphier.c usb: dwc3-uniphier: Use dwc3-generic instead of xhci-dwc3 2023-02-22 19:40:11 +01:00
ep0.c usb: dwc3: Fix not calling dev_xxx with a device 2020-09-30 08:53:54 -04:00
gadget.c WS cleanup: remove SPACE(s) followed by TAB 2021-09-30 09:08:16 -04:00
gadget.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
io.h common: Move ARM cache operations out of common.h 2019-12-02 18:24:58 -05:00
Kconfig usb: dwc3-meson-g12a: Select PHY instead of imply PHY 2023-03-02 22:42:27 +01:00
linux-compat.h lib: string: Implement strlcat 2021-04-12 17:44:55 -04:00
Makefile usb: dwc3: add a SPL_USB_DWC3_GENERIC option for the dwc3 driver 2022-07-15 14:10:39 +02:00
samsung_usb_phy.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
ti_usb_phy.c usb: dwc3: ti: Fix not calling dev_err with a device 2020-09-30 08:53:58 -04:00