From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH] usb: gadget: i.MX: Move PBL USB gadget driver to arch/
Date: Fri, 10 Nov 2023 14:02:46 +0100 [thread overview]
Message-ID: <20231110130246.2222936-1-s.hauer@pengutronix.de> (raw)
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
reply other threads:[~2023-11-10 13:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231110130246.2222936-1-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox