Skip to contentSkip to conversation

omap3: evm: Drop old musb omap3 driver

PATCH In review Tom Rini 3 participants 9 messages Sep 26, 2025 – Sep 30, 2025

Subsystems (9)
lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH v2 1/5 omap3: evm: Drop old musb omap3 driver

From: Peter Robinson <[email protected]>

The USB_OMAP3 driver was (re)added in commit e74e9f620a6 as part of migrating to DM_USB but the config already had MUSB_OMAP2PLUS which is the newer musb driver and what other omap3 devices use. So drop it so we can drop the old driver.

---
Changes in v2:
- None

---
 configs/omap3_evm_defconfig | 1 -
 1 file changed, 1 deletion(-)
configs/omap3_evm_defconfig +0 -1
index a813d216787c..f99798ac1a57 100644
@@ -78,7 +78,6 @@ CONFIG_OMAP3_SPI=y
 CONFIG_USB=y
 # CONFIG_SPL_DM_USB is not set
 CONFIG_USB_EHCI_HCD=y
-CONFIG_USB_OMAP3=y
 CONFIG_USB_MUSB_GADGET=y
 CONFIG_USB_MUSB_OMAP2PLUS=y
 CONFIG_USB_HOST_ETHER=y
Signature · 1 line
2.43.0
author
#1 lore raw

PATCH v2 2/5 usb: musb: drop musb legacy drivers

From: Peter Robinson <[email protected]>

The last of the users of the legacy musb drivers have been migrated so now remove the old musb stack, all users should now be using the new musb stack if they need this functionality.

[trini: Remove a Makefile reference that was missed in v1]

---
Changes in v2:
- Remove a reference to the old musb code directory from the top-level Makefile

---
 Makefile                      |    1 -
 drivers/usb/Kconfig           |    2 -
 drivers/usb/musb/Kconfig      |   20 -
 drivers/usb/musb/Makefile     |    9 -
 drivers/usb/musb/am35x.c      |  138 ----
 drivers/usb/musb/am35x.h      |   81 ---
 drivers/usb/musb/musb_core.c  |  150 -----
 drivers/usb/musb/musb_core.h  |  343 ----------
 drivers/usb/musb/musb_debug.h |  191 ------
 drivers/usb/musb/musb_hcd.c   | 1161 ---------------------------------
 drivers/usb/musb/musb_hcd.h   |   93 ---
 drivers/usb/musb/musb_udc.c   |  953 ---------------------------
 drivers/usb/musb/omap3.c      |  129 ----
 drivers/usb/musb/omap3.h      |   38 --
 14 files changed, 3309 deletions(-)
 delete mode 100644 drivers/usb/musb/Kconfig
 delete mode 100644 drivers/usb/musb/Makefile
 delete mode 100644 drivers/usb/musb/am35x.c
 delete mode 100644 drivers/usb/musb/am35x.h
 delete mode 100644 drivers/usb/musb/musb_core.c
 delete mode 100644 drivers/usb/musb/musb_core.h
 delete mode 100644 drivers/usb/musb/musb_debug.h
 delete mode 100644 drivers/usb/musb/musb_hcd.c
 delete mode 100644 drivers/usb/musb/musb_hcd.h
 delete mode 100644 drivers/usb/musb/musb_udc.c
 delete mode 100644 drivers/usb/musb/omap3.c
 delete mode 100644 drivers/usb/musb/omap3.h
Makefile +0 -1
index 0dc7da6ddac7..1697e95c0a06 100644
@@ -1040,7 +1040,6 @@ libs-$(CONFIG_USB_GADGET) += drivers/usb/gadget/
 libs-$(CONFIG_USB_GADGET) += drivers/usb/gadget/udc/
 libs-y += drivers/usb/host/
 libs-y += drivers/usb/mtu3/
-libs-y += drivers/usb/musb/
 libs-y += drivers/usb/musb-new/
 libs-y += drivers/usb/isp1760/
 libs-y += drivers/usb/phy/
drivers/usb/Kconfig +0 -2
index daf2240ffd92..93c5ee69b253 100644
@@ -78,8 +78,6 @@ source "drivers/usb/dwc3/Kconfig"
 
 source "drivers/usb/mtu3/Kconfig"
 
-source "drivers/usb/musb/Kconfig"
-
 source "drivers/usb/musb-new/Kconfig"
 
 source "drivers/usb/emul/Kconfig"
drivers/usb/musb/Kconfig deleted +0 -20
deleted file mode 100644
index 2508b6ed0d13..000000000000
@@ -1,20 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0+
-#
-# (C) Copyright 2017
-# Adam Ford, Logic PD, [email protected]
-
-comment "Legacy MUSB Support"
-
-config USB_MUSB_HCD
-	bool "Legacy MUSB Host Controller"
-
-config USB_MUSB_UDC
-	bool "Legacy USB Device Controller"
-
-config USB_OMAP3
-	bool "Legacy MUSB OMAP3 / OMAP4"
-	depends on ARCH_OMAP2PLUS
-
-config USB_AM35X
-	bool"Legacy MUSB AM35x"
-	depends on ARCH_OMAP2PLUS && !USB_OMAP3
drivers/usb/musb/Makefile deleted +0 -9
deleted file mode 100644
index 744f2cfaa294..000000000000
@@ -1,9 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0+
-#
-# (C) Copyright 2000-2007
-# Wolfgang Denk, DENX Software Engineering, [email protected].
-
-obj-$(CONFIG_USB_MUSB_HCD) += musb_hcd.o musb_core.o
-obj-$(CONFIG_USB_MUSB_UDC) += musb_udc.o musb_core.o
-obj-$(CONFIG_USB_OMAP3) += omap3.o
-obj-$(CONFIG_USB_AM35X) += am35x.o
drivers/usb/musb/am35x.c deleted +0 -138

138 lines not on this page · raw message

drivers/usb/musb/am35x.h deleted +0 -81

81 lines not on this page · raw message

drivers/usb/musb/musb_core.c deleted +0 -150

150 lines not on this page · raw message

drivers/usb/musb/musb_core.h deleted +0 -343

343 lines not on this page · raw message

drivers/usb/musb/musb_debug.h deleted +0 -191

191 lines not on this page · raw message

drivers/usb/musb/musb_hcd.c deleted +0 -1161

1,161 lines not on this page · raw message

drivers/usb/musb/musb_hcd.h deleted +0 -93

93 lines not on this page · raw message

drivers/usb/musb/musb_udc.c deleted +0 -953

799 lines not on this page · raw message

drivers/usb/musb/omap3.c deleted +0 -129

129 lines not on this page · raw message

drivers/usb/musb/omap3.h deleted +0 -38
deleted file mode 100644
index 78fdb2959bbf..000000000000

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.43.0

Part of the diff is not shown here. View the raw message.

author
#2 lore raw

PATCH v2 3/5 usb: gadget: Tighten the dependency for DWC2 OTG support

In reply to Tom Rini

The DWC2 OTG driver depends on an ARM-specific header file to compile, so make it depend on ARM.

---
Changes in v2:
- None

Cc Marek Vasut <[email protected]>
---
 drivers/usb/gadget/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/gadget/Kconfig +1 -0
index 0121f9872ae6..9065e14768ad 100644
@@ -109,6 +109,7 @@ config USB_GADGET_AT91
 
 config USB_GADGET_DWC2_OTG
 	bool "DesignWare USB2.0 HS OTG controller (gadget mode)"
+	depends on ARM
 	select USB_GADGET_DUALSPEED
 	help
 	  The Designware USB2.0 high-speed gadget controller
Signature · 1 line
2.43.0
Reviewed-by on v2 3/5
#3 lore raw

Re: [PATCH v2 3/5] usb: gadget: Tighten the dependency for DWC2 OTG support

Quoted 10 lines · Tom Rini

The DWC2 OTG driver depends on an ARM-specific header file to compile, so make it depend on ARM.

---
Changes in v2:
- None

Cc Marek Vasut <[email protected]>
Quoted 19 lines
---
 drivers/usb/gadget/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/gadget/Kconfig +1 -1
index 0121f9872ae6..9065e14768ad 100644
@@ -109,6 +109,7 @@ config USB_GADGET_AT91
 
 config USB_GADGET_DWC2_OTG
        bool "DesignWare USB2.0 HS OTG controller (gadget mode)"
+       depends on ARM
        select USB_GADGET_DUALSPEED
        help
          The Designware USB2.0 high-speed gadget controller
--

2.43.0

Reviewed-by on v2 3/5
#4 lore raw

Re: [PATCH v2 3/5] usb: gadget: Tighten the dependency for DWC2 OTG support

In reply to Tom Rini

Hi Tom,

Thank you for the patch.

Quoted 4 lines · Tom Rini

The DWC2 OTG driver depends on an ARM-specific header file to compile, so make it depend on ARM.

Quoted 23 lines

---
Changes in v2:
- None

Cc Marek Vasut <[email protected]>
---
 drivers/usb/gadget/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/gadget/Kconfig +1 -0
index 0121f9872ae6..9065e14768ad 100644
@@ -109,6 +109,7 @@ config USB_GADGET_AT91
 
 config USB_GADGET_DWC2_OTG
 	bool "DesignWare USB2.0 HS OTG controller (gadget mode)"
+	depends on ARM
 	select USB_GADGET_DUALSPEED
 	help
 	  The Designware USB2.0 high-speed gadget controller
Signature · 1 line
2.43.0
author
#5 lore raw

PATCH v2 4/5 usb: host: xhci: Make U_BOOT_DRIVER entries unique

In reply to Tom Rini

All instances of the U_BOOT_DRIVER must use a unique name or they will lead to link time failures due to name space conflicts when both are present. Most of the XHCI drivers follow pattern of xhci_xxx in their name, but a few used "usb_xhci". Change these to follow the pattern of the rest of the XHCI glue drivers.

---
Changes in v2:
- None

Cc Marek Vasut <[email protected]>
---
 drivers/usb/host/xhci-brcm.c    | 2 +-
 drivers/usb/host/xhci-exynos5.c | 2 +-
 drivers/usb/host/xhci-generic.c | 2 +-
 drivers/usb/host/xhci-mtk.c     | 2 +-
 drivers/usb/host/xhci-mvebu.c   | 2 +-
 drivers/usb/host/xhci-rcar.c    | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)
drivers/usb/host/xhci-brcm.c +1 -1
index 2ffad148dea6..595839fac3c9 100644
@@ -85,7 +85,7 @@ static const struct udevice_id xhci_brcm_ids[] = {
 	{ }
 };
 
-U_BOOT_DRIVER(usb_xhci) = {
+U_BOOT_DRIVER(xhci_brcm) = {
 	.name				= "xhci_brcm",
 	.id				= UCLASS_USB,
 	.probe				= xhci_brcm_probe,
drivers/usb/host/xhci-exynos5.c +1 -1
index 6a2d422c4b8e..9a7c0f29dc8f 100644
@@ -247,7 +247,7 @@ static const struct udevice_id xhci_usb_ids[] = {
 	{ }
 };
 
-U_BOOT_DRIVER(usb_xhci) = {
+U_BOOT_DRIVER(xhci_exynos) = {
 	.name	= "xhci_exynos",
 	.id	= UCLASS_USB,
 	.of_match = xhci_usb_ids,
drivers/usb/host/xhci-generic.c +1 -1
index 355d4883176d..8bb4e2774230 100644
@@ -61,7 +61,7 @@ static const struct udevice_id xhci_usb_ids[] = {
 	{ }
 };
 
-U_BOOT_DRIVER(usb_xhci) = {
+U_BOOT_DRIVER(xhci_generic) = {
 	.name	= "xhci_generic",
 	.id	= UCLASS_USB,
 	.of_match = xhci_usb_ids,
drivers/usb/host/xhci-mtk.c +1 -1
index 7e288f0575b6..ffe80c0bbdc6 100644
@@ -357,7 +357,7 @@ static const struct udevice_id xhci_mtk_ids[] = {
 	{ }
 };
 
-U_BOOT_DRIVER(usb_xhci) = {
+U_BOOT_DRIVER(xhci_mtk) = {
 	.name = "xhci-mtk",
 	.id = UCLASS_USB,
 	.of_match = xhci_mtk_ids,
drivers/usb/host/xhci-mvebu.c +1 -1
index 1338b1021c64..12dc61aee9db 100644
@@ -87,7 +87,7 @@ static const struct udevice_id xhci_usb_ids[] = {
 	{ }
 };
 
-U_BOOT_DRIVER(usb_xhci) = {
+U_BOOT_DRIVER(xhci_mvebu) = {
 	.name	= "xhci_mvebu",
 	.id	= UCLASS_USB,
 	.of_match = xhci_usb_ids,
drivers/usb/host/xhci-rcar.c +1 -1
index b72807053c42..95dfa2c3f874 100644
@@ -149,7 +149,7 @@ static const struct udevice_id xhci_rcar_ids[] = {
 	{ }
 };
 
-U_BOOT_DRIVER(usb_xhci) = {
+U_BOOT_DRIVER(xhci_rcar) = {
 	.name		= "xhci_rcar",
 	.id		= UCLASS_USB,
 	.probe		= xhci_rcar_probe,
Signature · 1 line
2.43.0
Reviewed-by on v2 4/5
#6 lore raw

Re: [PATCH v2 4/5] usb: host: xhci: Make U_BOOT_DRIVER entries unique

Quoted 8 lines · Tom Rini

All instances of the U_BOOT_DRIVER must use a unique name or they will lead to link time failures due to name space conflicts when both are present. Most of the XHCI drivers follow pattern of xhci_xxx in their name, but a few used "usb_xhci". Change these to follow the pattern of the rest of the XHCI glue drivers.

Quoted 95 lines

---
Changes in v2:
- None

Cc Marek Vasut <[email protected]>
---
 drivers/usb/host/xhci-brcm.c    | 2 +-
 drivers/usb/host/xhci-exynos5.c | 2 +-
 drivers/usb/host/xhci-generic.c | 2 +-
 drivers/usb/host/xhci-mtk.c     | 2 +-
 drivers/usb/host/xhci-mvebu.c   | 2 +-
 drivers/usb/host/xhci-rcar.c    | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)
drivers/usb/host/xhci-brcm.c +1 -1
index 2ffad148dea6..595839fac3c9 100644
@@ -85,7 +85,7 @@ static const struct udevice_id xhci_brcm_ids[] = {
        { }
 };
 
-U_BOOT_DRIVER(usb_xhci) = {
+U_BOOT_DRIVER(xhci_brcm) = {
        .name                           = "xhci_brcm",
        .id                             = UCLASS_USB,
        .probe                          = xhci_brcm_probe,
drivers/usb/host/xhci-exynos5.c +1 -1
index 6a2d422c4b8e..9a7c0f29dc8f 100644
@@ -247,7 +247,7 @@ static const struct udevice_id xhci_usb_ids[] = {
        { }
 };
 
-U_BOOT_DRIVER(usb_xhci) = {
+U_BOOT_DRIVER(xhci_exynos) = {
        .name   = "xhci_exynos",
        .id     = UCLASS_USB,
        .of_match = xhci_usb_ids,
drivers/usb/host/xhci-generic.c +1 -1
index 355d4883176d..8bb4e2774230 100644
@@ -61,7 +61,7 @@ static const struct udevice_id xhci_usb_ids[] = {
        { }
 };
 
-U_BOOT_DRIVER(usb_xhci) = {
+U_BOOT_DRIVER(xhci_generic) = {
        .name   = "xhci_generic",
        .id     = UCLASS_USB,
        .of_match = xhci_usb_ids,
drivers/usb/host/xhci-mtk.c +1 -1
index 7e288f0575b6..ffe80c0bbdc6 100644
@@ -357,7 +357,7 @@ static const struct udevice_id xhci_mtk_ids[] = {
        { }
 };
 
-U_BOOT_DRIVER(usb_xhci) = {
+U_BOOT_DRIVER(xhci_mtk) = {
        .name = "xhci-mtk",
        .id = UCLASS_USB,
        .of_match = xhci_mtk_ids,
drivers/usb/host/xhci-mvebu.c +1 -1
index 1338b1021c64..12dc61aee9db 100644
@@ -87,7 +87,7 @@ static const struct udevice_id xhci_usb_ids[] = {
        { }
 };
 
-U_BOOT_DRIVER(usb_xhci) = {
+U_BOOT_DRIVER(xhci_mvebu) = {
        .name   = "xhci_mvebu",
        .id     = UCLASS_USB,
        .of_match = xhci_usb_ids,
drivers/usb/host/xhci-rcar.c +1 -2
index b72807053c42..95dfa2c3f874 100644
@@ -149,7 +149,7 @@ static const struct udevice_id xhci_rcar_ids[] = {
        { }
 };
 
-U_BOOT_DRIVER(usb_xhci) = {
+U_BOOT_DRIVER(xhci_rcar) = {
        .name           = "xhci_rcar",
        .id             = UCLASS_USB,
        .probe          = xhci_rcar_probe,
--

2.43.0

author
#7 lore raw

PATCH v2 5/5 usb: gadget: Tighten CI_UDC dependencies

In reply to Tom Rini

This driver cannot build when DM_USB_GADGET is enabled as both options control building of files that use the same global namespace and functionality. In this case make CI_UDC depend on DM_USB_GADGET being disabled as non-DM support is the legacy choice.

---
Changes in v2:
- None

Cc Marek Vasut <[email protected]>
---
 drivers/usb/gadget/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/gadget/Kconfig +1 -0
index 9065e14768ad..9f817967a08b 100644
@@ -152,6 +152,7 @@ config USB_GADGET_OS_DESCRIPTORS
 
 config CI_UDC
 	bool "ChipIdea device controller"
+	depends on !DM_USB_GADGET
 	select USB_GADGET_DUALSPEED
 	help
 	  Say Y here to enable device controller functionality of the
Signature · 1 line
2.43.0
Reviewed-by on v2 5/5
#8 lore raw

Re: [PATCH v2 5/5] usb: gadget: Tighten CI_UDC dependencies

Hi Tom,

Thank you for the patch.

Quoted 6 lines · Tom Rini

This driver cannot build when DM_USB_GADGET is enabled as both options control building of files that use the same global namespace and functionality. In this case make CI_UDC depend on DM_USB_GADGET being disabled as non-DM support is the legacy choice.

Quoted 23 lines

---
Changes in v2:
- None

Cc Marek Vasut <[email protected]>
---
 drivers/usb/gadget/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/gadget/Kconfig +1 -0
index 9065e14768ad..9f817967a08b 100644
@@ -152,6 +152,7 @@ config USB_GADGET_OS_DESCRIPTORS
 
 config CI_UDC
 	bool "ChipIdea device controller"
+	depends on !DM_USB_GADGET
 	select USB_GADGET_DUALSPEED
 	help
 	  Say Y here to enable device controller functionality of the
Signature · 1 line
2.43.0