usb: finally get rid of USE_ROCKBOX_USB in Sansa bootloader, use bootloader usb

For some reason, the bootloader and config files didn't define
HAVE_BOOTLOADER_USB_MODE, also remove the special cases in usb.c which they
implied.

Change-Id: I68c29be7d03627e64cac4ff7678e0c211e087a8c
diff --git a/bootloader/sansa_as3525.c b/bootloader/sansa_as3525.c
index 3558d01..14cb2ab 100644
--- a/bootloader/sansa_as3525.c
+++ b/bootloader/sansa_as3525.c
@@ -29,10 +29,10 @@
 #include "gcc_extensions.h"
 #include "../kernel-internal.h"
 #include "lcd.h"
-#ifdef USE_ROCKBOX_USB
+#ifdef HAVE_BOOTLOADER_USB_MODE
 #include "usb.h"
 #include "sysfont.h"
-#endif /* USE_ROCKBOX_USB */
+#endif /* HAVE_BOOTLOADER_USB_MODE */
 #include "backlight.h"
 #include "button-target.h"
 #include "common.h"
@@ -46,7 +46,7 @@
 
 void show_logo(void);
 
-#ifdef USE_ROCKBOX_USB
+#ifdef HAVE_BOOTLOADER_USB_MODE
 static void usb_mode(void)
 {
     if(usb_detect() != USB_INSERTED)
@@ -73,7 +73,7 @@
     reset_screen();
     lcd_update();
 }
-#endif /* USE_ROCKBOX_USB */
+#endif /* HAVE_BOOTLOADER_USB_MODE */
 
 void main(void) NORETURN_ATTR;
 void main(void)
@@ -122,7 +122,7 @@
 
     filesystem_init();
 
-#ifdef USE_ROCKBOX_USB
+#ifdef HAVE_BOOTLOADER_USB_MODE
     usb_init();
 
     /* Enter USB mode if USB is plugged and SELECT button is pressed */
@@ -131,11 +131,11 @@
         if(usb_detect() == USB_INSERTED)
             usb_mode();
     }
-#endif /* USE_ROCKBOX_USB */
+#endif /* HAVE_BOOTLOADER_USB_MODE */
 
     while((ret = disk_mount_all()) <= 0)
     {
-#ifdef USE_ROCKBOX_USB
+#ifdef HAVE_BOOTLOADER_USB_MODE
         error(EDISK, ret, false);
         usb_mode();
 #else
@@ -150,7 +150,7 @@
 
     while((ret = load_firmware(loadbuffer, BOOTFILE, buffer_size)) <= EFILE_EMPTY)
     {
-#ifdef USE_ROCKBOX_USB
+#ifdef HAVE_BOOTLOADER_USB_MODE
         error(EBOOTFILE, ret, false);
         usb_mode();
 #else
diff --git a/firmware/export/config/sansac200v2.h b/firmware/export/config/sansac200v2.h
index 9e9c8b8..0da8b6a 100644
--- a/firmware/export/config/sansac200v2.h
+++ b/firmware/export/config/sansac200v2.h
@@ -187,6 +187,7 @@
 //#define USB_ENABLE_SERIAL
 #define USB_VENDOR_ID 0x0781
 #define USB_PRODUCT_ID 0x7452
+#define HAVE_BOOTLOADER_USB_MODE
 #define HAVE_USB_HID_MOUSE
 
 /* Define this if you have adjustable CPU frequency */
diff --git a/firmware/export/config/sansaclip.h b/firmware/export/config/sansaclip.h
index 5450040..43a24cb 100644
--- a/firmware/export/config/sansaclip.h
+++ b/firmware/export/config/sansaclip.h
@@ -182,6 +182,7 @@
 #define USB_VENDOR_ID 0x0781
 #define USB_PRODUCT_ID 0x7433
 #define HAVE_USB_HID_MOUSE
+#define HAVE_BOOTLOADER_USB_MODE
 
 /* Define this if you have adjustable CPU frequency */
 #define HAVE_ADJUSTABLE_CPU_FREQ
diff --git a/firmware/export/config/sansaclipplus.h b/firmware/export/config/sansaclipplus.h
index dc9ad90..a2df3d2 100644
--- a/firmware/export/config/sansaclipplus.h
+++ b/firmware/export/config/sansaclipplus.h
@@ -188,7 +188,7 @@
 #define HAVE_USBSTACK
 #define USB_VENDOR_ID 0x0781
 #define USB_PRODUCT_ID 0x74d1
-
+#define HAVE_BOOTLOADER_USB_MODE
 
 /* Virtual LED (icon) */
 #define CONFIG_LED LED_VIRTUAL
diff --git a/firmware/export/config/sansaclipv2.h b/firmware/export/config/sansaclipv2.h
index a61d5ba..8b0b84c 100644
--- a/firmware/export/config/sansaclipv2.h
+++ b/firmware/export/config/sansaclipv2.h
@@ -184,6 +184,7 @@
 #define HAVE_USBSTACK
 #define USB_VENDOR_ID 0x0781
 #define USB_PRODUCT_ID 0x7435
+#define HAVE_BOOTLOADER_USB_MODE
 
 /* Virtual LED (icon) */
 #define CONFIG_LED LED_VIRTUAL
diff --git a/firmware/export/config/sansaclipzip.h b/firmware/export/config/sansaclipzip.h
index 50147b9..9743261 100644
--- a/firmware/export/config/sansaclipzip.h
+++ b/firmware/export/config/sansaclipzip.h
@@ -187,7 +187,7 @@
 #define HAVE_USBSTACK
 #define USB_VENDOR_ID 0x0781
 #define USB_PRODUCT_ID 0x74e5
-
+#define HAVE_BOOTLOADER_USB_MODE
 
 /* Virtual LED (icon) */
 #define CONFIG_LED LED_VIRTUAL
diff --git a/firmware/export/config/sansae200v2.h b/firmware/export/config/sansae200v2.h
index 23bee8c..3541e0f 100644
--- a/firmware/export/config/sansae200v2.h
+++ b/firmware/export/config/sansae200v2.h
@@ -204,6 +204,7 @@
 #define USB_VENDOR_ID 0x0781
 #define USB_PRODUCT_ID 0x7423
 #define HAVE_USB_HID_MOUSE
+#define HAVE_BOOTLOADER_USB_MODE
 
 /* Define this if you have adjustable CPU frequency */
 #define HAVE_ADJUSTABLE_CPU_FREQ
diff --git a/firmware/export/config/sansafuze.h b/firmware/export/config/sansafuze.h
index b2cdf06..f15d424 100644
--- a/firmware/export/config/sansafuze.h
+++ b/firmware/export/config/sansafuze.h
@@ -205,6 +205,7 @@
 #define USB_VENDOR_ID 0x0781
 #define USB_PRODUCT_ID 0x74c1
 #define HAVE_USB_HID_MOUSE
+#define HAVE_BOOTLOADER_USB_MODE
 
 /* Define this if you have adjustable CPU frequency */
 #define HAVE_ADJUSTABLE_CPU_FREQ
diff --git a/firmware/export/config/sansafuzev2.h b/firmware/export/config/sansafuzev2.h
index a0197bf..f53c287 100644
--- a/firmware/export/config/sansafuzev2.h
+++ b/firmware/export/config/sansafuzev2.h
@@ -205,6 +205,7 @@
 #define HAVE_USBSTACK
 #define USB_VENDOR_ID 0x0781
 #define USB_PRODUCT_ID 0x74c3   /* MSC = 0x74c3, MTP = 0x74c2 */
+#define HAVE_BOOTLOADER_USB_MODE
 
 /* Define this if you have adjustable CPU frequency */
 //#define HAVE_ADJUSTABLE_CPU_FREQ
diff --git a/firmware/export/config/sansam200v4.h b/firmware/export/config/sansam200v4.h
index 99e84e6..d905d10 100644
--- a/firmware/export/config/sansam200v4.h
+++ b/firmware/export/config/sansam200v4.h
@@ -148,6 +148,7 @@
 #define USB_VENDOR_ID 0x0781
 #define USB_PRODUCT_ID 0x7431
 #define HAVE_USB_HID_MOUSE
+#define HAVE_BOOTLOADER_USB_MODE
 
 #define CONFIG_LCD LCD_SSD1815
 
diff --git a/firmware/usb.c b/firmware/usb.c
index e5210ef..ee6ed2c 100644
--- a/firmware/usb.c
+++ b/firmware/usb.c
@@ -48,10 +48,8 @@
      (defined(HAVE_USBSTACK) && defined(HAVE_BOOTLOADER_USB_MODE)) || \
      (defined(HAVE_USBSTACK) && (defined(CREATIVE_ZVx))) || \
      (defined(HAVE_USBSTACK) && (defined(OLYMPUS_MROBE_500))) || \
-     (defined(HAVE_USBSTACK) && CONFIG_USBOTG == USBOTG_S3C6400X) || \
      defined(CPU_TCC77X) || defined(CPU_TCC780X) || \
-     (CONFIG_USBOTG == USBOTG_JZ4740) || \
-     (defined(HAVE_USBSTACK) && CONFIG_USBOTG == USBOTG_AS3525)
+     (CONFIG_USBOTG == USBOTG_JZ4740)
 #define USB_FULL_INIT
 #endif