From 7b60cd933bc1db31c94483f6aeb9289722427c5e Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Tue, 24 Feb 2026 09:45:04 -0600 Subject: [PATCH 1/3] usb: gadget: Mark udc_disconnect as static With the last external callers of udc_disconnect long removed, mark this function as static now and remove it from headers. Signed-off-by: Tom Rini Reviewed-by: Mattijs Korpershoek Link: https://patch.msgid.link/20260224154504.85301-1-trini@konsulko.com Signed-off-by: Mattijs Korpershoek --- arch/arm/include/asm/bootm.h | 2 -- drivers/usb/gadget/ci_udc.c | 2 +- include/usb.h | 9 --------- include/usb/udc.h | 1 - 4 files changed, 1 insertion(+), 13 deletions(-) diff --git a/arch/arm/include/asm/bootm.h b/arch/arm/include/asm/bootm.h index 439e43c2d01..762f00e6900 100644 --- a/arch/arm/include/asm/bootm.h +++ b/arch/arm/include/asm/bootm.h @@ -8,8 +8,6 @@ #ifndef ARM_BOOTM_H #define ARM_BOOTM_H -extern void udc_disconnect(void); - #ifdef CONFIG_SUPPORT_PASSING_ATAGS # define BOOTM_ENABLE_TAGS 1 #else diff --git a/drivers/usb/gadget/ci_udc.c b/drivers/usb/gadget/ci_udc.c index 046bb335ecb..4729570c525 100644 --- a/drivers/usb/gadget/ci_udc.c +++ b/drivers/usb/gadget/ci_udc.c @@ -990,7 +990,7 @@ int dm_usb_gadget_handle_interrupts(struct udevice *dev) return value; } -void udc_disconnect(void) +static void udc_disconnect(void) { struct ci_udc *udc = (struct ci_udc *)controller.ctrl->hcor; /* disable pullup */ diff --git a/include/usb.h b/include/usb.h index be37ed272e1..dab23753f0c 100644 --- a/include/usb.h +++ b/include/usb.h @@ -208,15 +208,6 @@ void *poll_int_queue(struct usb_device *dev, struct int_queue *queue); #define USB_UHCI_VEND_ID 0x8086 #define USB_UHCI_DEV_ID 0x7112 -/* - * PXA25x can only act as USB device. There are drivers - * which works with USB CDC gadgets implementations. - * Some of them have common routines which can be used - * in boards init functions e.g. udc_disconnect() used for - * forced device disconnection from host. - */ -extern void udc_disconnect(void); - /* * board-specific hardware initialization, called by * usb drivers and u-boot commands diff --git a/include/usb/udc.h b/include/usb/udc.h index 749b3a3f015..c5e431813be 100644 --- a/include/usb/udc.h +++ b/include/usb/udc.h @@ -39,7 +39,6 @@ int udc_endpoint_write(struct usb_endpoint_instance *endpoint); void udc_setup_ep(struct usb_device_instance *device, unsigned int ep, struct usb_endpoint_instance *endpoint); void udc_connect(void); -void udc_disconnect(void); void udc_enable(struct usb_device_instance *device); void udc_disable(void); void udc_startup_events(struct usb_device_instance *device); From 433a17aca15481cde866a9bc636b61584360fbb3 Mon Sep 17 00:00:00 2001 From: Siddharth Vadapalli Date: Thu, 5 Mar 2026 16:08:14 +0530 Subject: [PATCH 2/3] common: spl: spl_dfu.c: Fix warning associated with PCI subclass_code The subclass_code member of the pci_ep_header structure is a 1-byte field. The macro PCI_CLASS_MEMORY_RAM is a concetation of baseclass_code and subclass_code as follows: PCI_BASE_CLASS_MEMORY: 0x05 Subclass Code for RAM: 0x00 PCI_CLASS_MEMORY_RAM: 0x0500 Hence, instead of extracting it via an implicity type conversion from int to u8 which throws a warning, explicitly mask the bits to extract the subclass_code. Fixes: cde77583cf0b ("spl: Add support for Device Firmware Upgrade (DFU) over PCIe") Signed-off-by: Siddharth Vadapalli Tested-by: Anshul Dalal Reviewed-by: Mattijs Korpershoek Tested-by: Mattijs Korpershoek # am62x_evm_a53 Link: https://lore.kernel.org/r/20260305103815.999886-1-s-vadapalli@ti.com Signed-off-by: Mattijs Korpershoek --- common/spl/spl_dfu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/spl/spl_dfu.c b/common/spl/spl_dfu.c index b09f82790c9..7d21bb4d16a 100644 --- a/common/spl/spl_dfu.c +++ b/common/spl/spl_dfu.c @@ -64,7 +64,7 @@ static int dfu_over_pcie(void) hdr.deviceid = CONFIG_SPL_PCI_DFU_DEVICE_ID; hdr.vendorid = CONFIG_SPL_PCI_DFU_VENDOR_ID; hdr.baseclass_code = PCI_BASE_CLASS_MEMORY; - hdr.subclass_code = PCI_CLASS_MEMORY_RAM; + hdr.subclass_code = PCI_CLASS_MEMORY_RAM & 0xff; ret = pci_ep_write_header(dev, fn, &hdr); if (ret) { From 4b77b07811c2fb48b4a65ae14c387540ae6b8998 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Tue, 10 Mar 2026 10:26:21 -0600 Subject: [PATCH 3/3] dfu: Make the DFU_WRITE_ALT symbol available outside of DFU The DFU_WRITE_ALT symbol is used both directly and indirectly (via UPDATE_COMMON) for EFI capsule updates (FIT or raw), but does not depend on DFU itself. Move this symbol outside of "if DFU" to remove a Kconfig dependency problem. Signed-off-by: Tom Rini Reviewed-by: Ilias Apalodimas Reviewed-by: Mattijs Korpershoek Link: https://lore.kernel.org/r/20260310162621.1163932-1-trini@konsulko.com Signed-off-by: Mattijs Korpershoek --- drivers/dfu/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dfu/Kconfig b/drivers/dfu/Kconfig index 2cf4289b448..962bda40ad2 100644 --- a/drivers/dfu/Kconfig +++ b/drivers/dfu/Kconfig @@ -13,10 +13,10 @@ config DFU_OVER_TFTP bool depends on NET -if DFU config DFU_WRITE_ALT bool +if DFU config DFU_TFTP bool "DFU via TFTP" depends on NETDEVICES