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

rockbox-gerrit-noreply--- via rockbox-cvs <[email protected]>
Newsgroups gmane.comp.systems.archos.rockbox.cvs
Message-ID <[email protected]>
commit e1d10c938a9b4bbc0480e3967060c6268da83dbb
Author: Solomon Peachy <[email protected]>
Date:   Tue Jan 27 07:21:37 2026 -0500

    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

diff --git a/bootloader/creativezvm.c b/bootloader/creativezvm.c
index 415cab1ea3..db7a8c7459 100644
--- a/bootloader/creativezvm.c
+++ b/bootloader/creativezvm.c
@@ -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);
 }
diff --git a/firmware/export/config.h b/firmware/export/config.h
index b89cab6bbd..b38732d554 100644
--- a/firmware/export/config.h
+++ b/firmware/export/config.h
@@ -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
 
diff --git a/firmware/export/config/ipodnano2g.h b/firmware/export/config/ipodnano2g.h
index 81054e0141..621f4e27a5 100644
--- a/firmware/export/config/ipodnano2g.h
+++ b/firmware/export/config/ipodnano2g.h
@@ -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
diff --git a/firmware/export/config/zenvision.h b/firmware/export/config/zenvision.h
index b832f3b744..d8b75876ae 100644
--- a/firmware/export/config/zenvision.h
+++ b/firmware/export/config/zenvision.h
@@ -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
 
diff --git a/firmware/export/config/zenvisionm30gb.h b/firmware/export/config/zenvisionm30gb.h
index bede49d3d0..974783540a 100644
--- a/firmware/export/config/zenvisionm30gb.h
+++ b/firmware/export/config/zenvisionm30gb.h
@@ -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
 
diff --git a/firmware/export/config/zenvisionm60gb.h b/firmware/export/config/zenvisionm60gb.h
index dfdc4c7210..0209d8ed6e 100644
--- a/firmware/export/config/zenvisionm60gb.h
+++ b/firmware/export/config/zenvisionm60gb.h
@@ -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
 
diff --git a/firmware/target/arm/system-arm-classic.h b/firmware/target/arm/system-arm-classic.h
index 66f6467dc1..bc648e43ed 100644
--- a/firmware/target/arm/system-arm-classic.h
+++ b/firmware/target/arm/system-arm-classic.h
@@ -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
-- 
rockbox-cvs mailing list
[email protected]
https://lists.haxx.se/mailman/listinfo/rockbox-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.