bootloaders: Don't build usb_core without HAVE_BOOTLOADER_USB_MODE
rockbox-gerrit-noreply--- via rockbox-cvs <[email protected]>
| Newsgroups | gmane.comp.systems.archos.rockbox.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit 80aaaaa2af5eabacd6bdefd4d728295600b92f0a Author: Solomon Peachy <[email protected]> Date: Tue Jan 27 14:50:44 2026 -0500 bootloaders: Don't build usb_core without HAVE_BOOTLOADER_USB_MODE This way we don't need to stub out a bunch of functionality when we don't have any actual USB class drivers enabled. Change-Id: Ia0ecf5be4bb41bebfcd347090959f3204a2aba59 diff --git a/firmware/SOURCES b/firmware/SOURCES index c992b2010c..7d1b582c64 100644 --- a/firmware/SOURCES +++ b/firmware/SOURCES @@ -947,8 +947,7 @@ target/arm/s5l8702/lcd-asm-s5l8702.S #endif /* USB Stack */ -// TODO: This needs to be HAVE_USBSTACK && (!BOOTLOADER || HAVE_USB_BOOTLOADER_MODE) -#ifdef HAVE_USBSTACK +#if defined(HAVE_USBSTACK) && (!defined(BOOTLOADER) || defined(HAVE_BOOTLOADER_USB_MODE)) usbstack/usb_core.c #ifdef USB_ENABLE_STORAGE usbstack/usb_storage.c @@ -985,6 +984,8 @@ target/arm/rk27xx/usb-drv-rk27xx.c drivers/isp1362.c #elif CONFIG_USBOTG == USBOTG_M5636 drivers/m5636.c +#elif CONFIG_USBOTG == USBOTG_ARC +target/arm/usb-drv-arc.c #endif #endif /* !defined(HAVE_USBSTACK) */ diff --git a/firmware/storage.c b/firmware/storage.c index 5134e0f0e3..f6a168dabb 100644 --- a/firmware/storage.c +++ b/firmware/storage.c @@ -229,7 +229,7 @@ static void NORETURN_ATTR storage_thread(void) break; #endif /* HAVE_HOTSWAP */ -#ifndef USB_NONE +#if !defined(USB_NONE) && (!defined(BOOTLOADER) || defined(HAVE_BOOTLOADER_USB_MODE)) case SYS_USB_CONNECTED: case SYS_USB_DISCONNECTED: bdcast = 0; diff --git a/firmware/usb.c b/firmware/usb.c index e1d0909613..2645d3b290 100644 --- a/firmware/usb.c +++ b/firmware/usb.c @@ -705,33 +705,7 @@ void usb_acknowledge(long id, intptr_t seqnum) { queue_post(&usb_queue, id, seqnum); } -#else /* !USB_FULL_INIT */ -/* TODO: All of this can go away once usb_core.c is no longer built - with BOOTLOADER && !HAVE_USB_BOOTLOADER_MODE */ -#ifdef HAVE_USBSTACK -void usb_signal_transfer_completion( - struct usb_transfer_completion_event_data* event_data) -{ - (void)event_data; -} -#endif -void usb_clear_pending_transfer_completion_events(void) -{ -} -void usb_release_exclusive_storage(void) -{ -} -void usb_signal_notify(long id, intptr_t data) -{ - (void)id; - (void)data; -} -void usb_acknowledge(long id, intptr_t seqnum) -{ - (void)id; - (void)seqnum; -} -#endif /* !USB_FULL_INIT */ +#endif /* USB_FULL_INIT */ void usb_init(void) { -- rockbox-cvs mailing list [email protected] https://lists.haxx.se/mailman/listinfo/rockbox-cvs