mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] usb: gadget: i.MX: Move PBL USB gadget driver to arch/
@ 2023-11-10 13:02 Sascha Hauer
  0 siblings, 0 replies; only message in thread
From: Sascha Hauer @ 2023-11-10 13:02 UTC (permalink / raw)
  To: Barebox List

The i.MX PBL USB gadget driver is currently selected by architecture
Kconfig options. When USB gadget support is disabled then the build
system doesn't descend into the directory where the driver is, leading
to undefined references. We could change that and descend into the
directory unconditionally, but as the driver doesn't have any
dependencies to the USB gadget framework we can also move the driver
to arch/arm/mach-imx/ to solve this problem.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/mach-imx/Kconfig                                      | 3 +++
 arch/arm/mach-imx/Makefile                                     | 1 +
 .../gadget/udc/fsl_udc_pbl.c => arch/arm/mach-imx/imx-udc.c    | 0
 drivers/usb/gadget/Kconfig                                     | 3 ---
 drivers/usb/gadget/udc/Makefile                                | 1 -
 5 files changed, 4 insertions(+), 4 deletions(-)
 rename drivers/usb/gadget/udc/fsl_udc_pbl.c => arch/arm/mach-imx/imx-udc.c (100%)

diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index 6a7d90e2c8..13d914cdb6 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -27,6 +27,9 @@ config BAREBOX_UPDATE_IMX_EXTERNAL_NAND
 	depends on MTD_WRITE
 	default y
 
+config USB_GADGET_DRIVER_ARC_PBL
+	bool
+
 config RESET_IMX_SRC
 	def_bool y
 	depends on ARCH_IMX6 || ARCH_IMX50 || ARCH_IMX51 || ARCH_IMX53
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
index f49bbea2b4..9e8cb5eeb7 100644
--- a/arch/arm/mach-imx/Makefile
+++ b/arch/arm/mach-imx/Makefile
@@ -28,6 +28,7 @@ obj-$(CONFIG_CMD_BOOTROM) += bootrom-cmd.o
 obj-pbl-y += esdctl.o boot.o
 obj-$(CONFIG_BAREBOX_UPDATE) += imx-bbu-internal.o
 obj-$(CONFIG_BAREBOX_UPDATE_IMX_EXTERNAL_NAND) += imx-bbu-external-nand.o
+pbl-$(CONFIG_USB_GADGET_DRIVER_ARC_PBL) += imx-udc.o
 obj-$(CONFIG_RESET_IMX_SRC) += src.o
 lwl-y += cpu_init.o
 pbl-y += xload-spi.o xload-common.o xload-imx-nand.o xload-gpmi-nand.o
diff --git a/drivers/usb/gadget/udc/fsl_udc_pbl.c b/arch/arm/mach-imx/imx-udc.c
similarity index 100%
rename from drivers/usb/gadget/udc/fsl_udc_pbl.c
rename to arch/arm/mach-imx/imx-udc.c
diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
index ffaf355936..517255f477 100644
--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -5,9 +5,6 @@ menuconfig USB_GADGET
 	select NLS
 	bool "USB gadget support"
 
-config USB_GADGET_DRIVER_ARC_PBL
-	bool
-
 if USB_GADGET
 
 config USB_GADGET_DUALSPEED
diff --git a/drivers/usb/gadget/udc/Makefile b/drivers/usb/gadget/udc/Makefile
index f52660fcf5..6e79e80cfa 100644
--- a/drivers/usb/gadget/udc/Makefile
+++ b/drivers/usb/gadget/udc/Makefile
@@ -3,6 +3,5 @@
 obj-$(CONFIG_USB_GADGET) += core.o
 
 obj-$(CONFIG_USB_GADGET_DRIVER_ARC) += fsl_udc.o
-pbl-$(CONFIG_USB_GADGET_DRIVER_ARC_PBL) += fsl_udc_pbl.o
 obj-$(CONFIG_USB_GADGET_DRIVER_AT91) += at91_udc.o
 obj-$(CONFIG_USB_GADGET_DRIVER_PXA27X) += pxa27x_udc.o
-- 
2.39.2




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-11-10 13:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-10 13:02 [PATCH] usb: gadget: i.MX: Move PBL USB gadget driver to arch/ Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox