Most platform glue drivers need DM USB, if one of these driver is
enabled along with SPL without DM the build break. As the SPL might
still want to use the core DWC3 put the DM glue drivers under
ifdef CONFIG_$(SPL_)DM_USB.

Signed-off-by: Alban Bedel <[email protected]>
---
 drivers/usb/dwc3/Makefile | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/dwc3/Makefile b/drivers/usb/dwc3/Makefile
index 0dd1ba87cd94..34355048b7af 100644
--- a/drivers/usb/dwc3/Makefile
+++ b/drivers/usb/dwc3/Makefile
@@ -7,10 +7,13 @@ dwc3-y                                        := core.o
 obj-$(CONFIG_USB_DWC3_GADGET)          += gadget.o ep0.o

 obj-$(CONFIG_USB_DWC3_OMAP)            += dwc3-omap.o
+obj-$(CONFIG_USB_DWC3_UNIPHIER)                += dwc3-uniphier.o
+obj-$(CONFIG_USB_DWC3_PHY_OMAP)                += ti_usb_phy.o
+obj-$(CONFIG_USB_DWC3_PHY_SAMSUNG)     += samsung_usb_phy.o
+
+ifdef CONFIG_$(SPL_)DM_USB
 obj-$(CONFIG_USB_DWC3_MESON_G12A)      += dwc3-meson-g12a.o
 obj-$(CONFIG_USB_DWC3_MESON_GXL)       += dwc3-meson-gxl.o
 obj-$(CONFIG_USB_DWC3_GENERIC)         += dwc3-generic.o
-obj-$(CONFIG_USB_DWC3_UNIPHIER)                += dwc3-uniphier.o
 obj-$(CONFIG_USB_DWC3_LAYERSCAPE)      += dwc3-layerscape.o
-obj-$(CONFIG_USB_DWC3_PHY_OMAP)                += ti_usb_phy.o
-obj-$(CONFIG_USB_DWC3_PHY_SAMSUNG)     += samsung_usb_phy.o
+endif
--
2.32.0

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to