diff mbox series

[v2,2/2] usb: dwc3: Don't build DM drivers in SPL unless DM USB is available

Message ID 20220420092605.146805-3-alban.bedel@aerq.com
State Deferred
Delegated to: Tom Rini
Headers show
Series usb: dwc3: Fix build without driver model | expand

Commit Message

Bedel, Alban April 20, 2022, 9:26 a.m. UTC
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 <alban.bedel@aerq.com>
---
 drivers/usb/dwc3/Makefile | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
diff mbox series

Patch

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