config: Targets must opt-in to bootloader USB storage support

ie by only using HAVE_BOOTLOADER_USB_MODE, instead of blanket-enabling
USB_ENABLE_STORAGE for numerous SoC families

Change-Id: Ief433a1d693876072779e714883438c0012ba2e0
This commit is contained in:
Solomon Peachy 2026-01-27 07:21:37 -05:00
parent 33678c6c3c
commit e1d10c938a
7 changed files with 19 additions and 19 deletions

View file

@ -47,13 +47,13 @@ void main(void)
int buffer_size;
int(*kernel_entry)(void);
int ret;
/* Make sure interrupts are disabled */
set_irq_level(IRQ_DISABLED);
set_fiq_status(FIQ_DISABLED);
system_init();
kernel_init();
/* Now enable interrupts */
set_irq_level(IRQ_ENABLED);
set_fiq_status(FIQ_ENABLED);
@ -70,18 +70,18 @@ void main(void)
reset_screen();
printf("Rockbox boot loader");
printf("Version %s", rbversion);
ret = storage_init();
if(ret)
printf("ATA error: %d", ret);
filesystem_init();
/* If no button is held, start the OF */
if(button_read_device() == 0)
{
printf("Loading Creative firmware...");
loadbuffer = (unsigned char*)0x00A00000;
ret = load_minifs_file("creativeos.jrm", loadbuffer);
if(ret != -1)
@ -99,7 +99,7 @@ void main(void)
ret = disk_mount_all();
if (ret <= 0)
error(EDISK, ret, true);
printf("Loading Rockbox firmware...");
loadbuffer = (unsigned char*)0x00900000;
@ -113,8 +113,8 @@ void main(void)
ret = kernel_entry();
printf("FAILED!");
}
storage_sleepnow();
while(1);
}

View file

@ -1025,12 +1025,12 @@ Lyre prototype 1 */
#define USB_DETECT_BY_REQUEST
#endif
#if defined(HAVE_USBSTACK) && CONFIG_USBOTG == USBOTG_ARC
#if CONFIG_USBOTG == USBOTG_ARC
#define INCLUDE_TIMEOUT_API
#define USB_DRIVER_CLOSE
#endif
#if defined(HAVE_USBSTACK) && CONFIG_USBOTG == USBOTG_TNETV105
#if CONFIG_USBOTG == USBOTG_TNETV105
#define INCLUDE_TIMEOUT_API
#define USB_DRIVER_CLOSE
#endif
@ -1384,11 +1384,7 @@ Lyre prototype 1 */
#ifdef BOOTLOADER
/* enable usb storage for targets that do bootloader usb */
#if defined(HAVE_BOOTLOADER_USB_MODE) || \
defined(CREATIVE_ZVx) || defined(CPU_TCC780X) || \
CONFIG_USBOTG == USBOTG_JZ4740 || CONFIG_USBOTG == USBOTG_AS3525 || \
CONFIG_USBOTG == USBOTG_S3C6400X || CONFIG_USBOTG == USBOTG_DESIGNWARE || \
CONFIG_USBOTG == USBOTG_JZ4760
#if defined(HAVE_BOOTLOADER_USB_MODE)
#define USB_ENABLE_STORAGE
#endif

View file

@ -222,6 +222,7 @@
/* logf() over USB serial (http://www.rockbox.org/wiki/PortalPlayerUsb) */
//#define USB_ENABLE_SERIAL
#define HAVE_USBSTACK
#define HAVE_BOOTLOADER_USB_MODE
#define HAVE_USB_HID_MOUSE
#define USB_VENDOR_ID 0x05AC
#define USB_PRODUCT_ID 0x1260

View file

@ -157,7 +157,8 @@
#define CONFIG_USBOTG USBOTG_ISP1583
#define HAVE_USBSTACK
#define USB_VENDOR_ID 0x041e
#define HAVE_BOOTLOADER_USB_MODE
#define USB_VENDOR_ID 0x041e
#define USB_PRODUCT_ID 0x4133
#define USB_NUM_ENDPOINTS 7

View file

@ -158,7 +158,8 @@
#define CONFIG_USBOTG USBOTG_ISP1583
#define HAVE_USBSTACK
#define USB_VENDOR_ID 0x041e
#define HAVE_BOOTLOADER_USB_MODE
#define USB_VENDOR_ID 0x041e
#define USB_PRODUCT_ID 0x4133
#define USB_NUM_ENDPOINTS 7

View file

@ -158,7 +158,8 @@
/* #define CONFIG_USBOTG USBOTG_ISP1761 */
#define CONFIG_USBOTG USBOTG_ISP1583
#define HAVE_USBSTACK
#define USB_VENDOR_ID 0x041e
#define HAVE_BOOTLOADER_USB_MODE
#define USB_VENDOR_ID 0x041e
#define USB_PRODUCT_ID 0x4133
#define USB_NUM_ENDPOINTS 7

View file

@ -104,7 +104,7 @@ static inline int set_interrupt_status(int status, int mask)
unsigned long cpsr;
int oldstatus;
/* Read the old levels and set the new ones */
#if (defined(CREATIVE_ZVM) || defined(CREATIVE_ZV)) && defined(BOOTLOADER)
#if defined(CREATIVE_ZVx) && defined(BOOTLOADER)
// FIXME: This workaround is for a problem with inlining;
// for some reason 'mask' gets treated as a variable/non-immediate constant
// but only on this build. All others (including the nearly-identical mrobe500boot) are fine