Skip to contentSkip to conversation

usb: gadget: designware-udc: Drop the driver

PATCH In review Marek Vasut 2 participants 4 messages Aug 23, 2022 – Aug 24, 2022 USB

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 usb: gadget: designware-udc: Drop the driver

This driver is not used by any system and is long unmaintained, drop it. There is a DWC2 OTG driver which is maintained, see CONFIG_USB_GADGET_DWC2_OTG .

---
Cc: Heiko Schocher <[email protected]>
Cc: Patrice Chotard <[email protected]>
Cc: Patrick Delaunay <[email protected]>

---
 drivers/serial/usbtty.h             |    2 -
 drivers/usb/gadget/Makefile         |    1 -
 drivers/usb/gadget/designware_udc.c | 1021 ---------------------------
 include/usb/designware_udc.h        |  183 -----
 4 files changed, 1207 deletions(-)
 delete mode 100644 drivers/usb/gadget/designware_udc.c
 delete mode 100644 include/usb/designware_udc.h
drivers/serial/usbtty.h +0 -2
index 0d89fc085fb..e27aa368c9a 100644
@@ -13,8 +13,6 @@
 #include <usbdevice.h>
 #if defined(CONFIG_PPC)
 #include <usb/mpc8xx_udc.h>
-#elif defined(CONFIG_DW_UDC)
-#include <usb/designware_udc.h>
 #elif defined(CONFIG_CI_UDC)
 #include <usb/ci_udc.h>
 #endif
drivers/usb/gadget/Makefile +0 -1
index 306dd3127f4..dd09ee01959 100644
@@ -42,6 +42,5 @@ else
 ifdef CONFIG_USB_DEVICE
 obj-y += core.o
 obj-y += ep0.o
-obj-$(CONFIG_DW_UDC) += designware_udc.o
 endif
 endif
drivers/usb/gadget/designware_udc.c deleted +0 -1021

1,021 lines not on this page · raw message

include/usb/designware_udc.h deleted +0 -183

183 lines not on this page · raw message

Signature · 1 line
2.35.1
#1 lore raw

PATCH 2/2 usb: gadget: Clean up Makefile ifdeffery

Take the USB_ETHER ifdef block apart and make use of obj-$(VAR) instead to include the source files in build. The duplicate CI_UDC entry is now removed, the USB_DEVICE ifdef is now reduced to core.o ep.o addition, the ether.o can be conditionally compiled in using USB_ETHER.

No functional change.

---
Cc: Heiko Schocher <[email protected]>
Cc: Patrice Chotard <[email protected]>
Cc: Patrick Delaunay <[email protected]>

---
 drivers/usb/gadget/Makefile | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)
drivers/usb/gadget/Makefile +7 -10
index dd09ee01959..9c04403da30 100644
@@ -21,7 +21,6 @@ obj-$(CONFIG_USB_GADGET_DWC2_OTG) += dwc2_udc_otg.o
 obj-$(CONFIG_USB_GADGET_DWC2_OTG_PHY) += dwc2_udc_otg_phy.o
 obj-$(CONFIG_USB_GADGET_FOTG210) += fotg210.o
 obj-$(CONFIG_USB_GADGET_MAX3420) += max3420_udc.o
-obj-$(CONFIG_CI_UDC)	+= ci_udc.o
 ifndef CONFIG_SPL_BUILD
 obj-$(CONFIG_USB_GADGET_DOWNLOAD) += g_dnl.o
 obj-$(CONFIG_USB_FUNCTION_THOR) += f_thor.o
@@ -33,14 +32,12 @@ obj-$(CONFIG_USB_FUNCTION_ROCKUSB) += f_rockusb.o
 obj-$(CONFIG_USB_FUNCTION_ACM)	+= f_acm.o
 endif
 endif
-ifdef CONFIG_USB_ETHER
-obj-y += ether.o
+
+obj-$(CONFIG_CI_UDC) += ci_udc.o
+
+obj-$(CONFIG_USB_ETHER) += ether.o
 obj-$(CONFIG_USB_ETH_RNDIS) += rndis.o
-obj-$(CONFIG_CI_UDC)	+= ci_udc.o
-else
+
 # Devices not related to the new gadget layer depend on CONFIG_USB_DEVICE
-ifdef CONFIG_USB_DEVICE
-obj-y += core.o
-obj-y += ep0.o
-endif
-endif
+# This is really only N900 and USBTTY now.
+obj-$(CONFIG_USB_DEVICE) += core.o ep0.o
Signature · 1 line
2.35.1
Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] usb: gadget: Clean up Makefile ifdeffery

Hi Marek

Quoted 5 lines · Marek Vasut

Take the USB_ETHER ifdef block apart and make use of obj-$(VAR) instead to include the source files in build. The duplicate CI_UDC entry is now removed, the USB_DEVICE ifdef is now reduced to core.o ep.o addition, the ether.o can be conditionally compiled in using USB_ETHER.

Quoted 8 lines

No functional change.

---
Cc: Heiko Schocher <[email protected]>
Cc: Patrice Chotard <[email protected]>
Cc: Patrick Delaunay <[email protected]>
---

Thanks
Patrice

Reviewed-by on v1 1/2
#3 lore raw
In reply to Marek Vasut

Hi Marek

Quoted 8 lines · Marek Vasut

This driver is not used by any system and is long unmaintained, drop it. There is a DWC2 OTG driver which is maintained, see CONFIG_USB_GADGET_DWC2_OTG .

---
Cc: Heiko Schocher <[email protected]>
Cc: Patrice Chotard <[email protected]>
Cc: Patrick Delaunay <[email protected]>

Thanks
Patrice