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

Alban Bedel alban.bedel at aerq.com
Wed Apr 20 11:26:05 CEST 2022


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 at aerq.com>
---
 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3627 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20220420/62f4eb18/attachment.bin>


More information about the U-Boot mailing list