forked from len0rd/rockbox
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
This commit is contained in:
parent
246026cfcc
commit
761e7987c8
11 changed files with 18 additions and 13 deletions
|
@ -29,10 +29,10 @@
|
||||||
#include "gcc_extensions.h"
|
#include "gcc_extensions.h"
|
||||||
#include "../kernel-internal.h"
|
#include "../kernel-internal.h"
|
||||||
#include "lcd.h"
|
#include "lcd.h"
|
||||||
#ifdef USE_ROCKBOX_USB
|
#ifdef HAVE_BOOTLOADER_USB_MODE
|
||||||
#include "usb.h"
|
#include "usb.h"
|
||||||
#include "sysfont.h"
|
#include "sysfont.h"
|
||||||
#endif /* USE_ROCKBOX_USB */
|
#endif /* HAVE_BOOTLOADER_USB_MODE */
|
||||||
#include "backlight.h"
|
#include "backlight.h"
|
||||||
#include "button-target.h"
|
#include "button-target.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
@ -46,7 +46,7 @@
|
||||||
|
|
||||||
void show_logo(void);
|
void show_logo(void);
|
||||||
|
|
||||||
#ifdef USE_ROCKBOX_USB
|
#ifdef HAVE_BOOTLOADER_USB_MODE
|
||||||
static void usb_mode(void)
|
static void usb_mode(void)
|
||||||
{
|
{
|
||||||
if(usb_detect() != USB_INSERTED)
|
if(usb_detect() != USB_INSERTED)
|
||||||
|
@ -73,7 +73,7 @@ static void usb_mode(void)
|
||||||
reset_screen();
|
reset_screen();
|
||||||
lcd_update();
|
lcd_update();
|
||||||
}
|
}
|
||||||
#endif /* USE_ROCKBOX_USB */
|
#endif /* HAVE_BOOTLOADER_USB_MODE */
|
||||||
|
|
||||||
void main(void) NORETURN_ATTR;
|
void main(void) NORETURN_ATTR;
|
||||||
void main(void)
|
void main(void)
|
||||||
|
@ -122,7 +122,7 @@ void main(void)
|
||||||
|
|
||||||
filesystem_init();
|
filesystem_init();
|
||||||
|
|
||||||
#ifdef USE_ROCKBOX_USB
|
#ifdef HAVE_BOOTLOADER_USB_MODE
|
||||||
usb_init();
|
usb_init();
|
||||||
|
|
||||||
/* Enter USB mode if USB is plugged and SELECT button is pressed */
|
/* Enter USB mode if USB is plugged and SELECT button is pressed */
|
||||||
|
@ -131,11 +131,11 @@ void main(void)
|
||||||
if(usb_detect() == USB_INSERTED)
|
if(usb_detect() == USB_INSERTED)
|
||||||
usb_mode();
|
usb_mode();
|
||||||
}
|
}
|
||||||
#endif /* USE_ROCKBOX_USB */
|
#endif /* HAVE_BOOTLOADER_USB_MODE */
|
||||||
|
|
||||||
while((ret = disk_mount_all()) <= 0)
|
while((ret = disk_mount_all()) <= 0)
|
||||||
{
|
{
|
||||||
#ifdef USE_ROCKBOX_USB
|
#ifdef HAVE_BOOTLOADER_USB_MODE
|
||||||
error(EDISK, ret, false);
|
error(EDISK, ret, false);
|
||||||
usb_mode();
|
usb_mode();
|
||||||
#else
|
#else
|
||||||
|
@ -150,7 +150,7 @@ void main(void)
|
||||||
|
|
||||||
while((ret = load_firmware(loadbuffer, BOOTFILE, buffer_size)) <= EFILE_EMPTY)
|
while((ret = load_firmware(loadbuffer, BOOTFILE, buffer_size)) <= EFILE_EMPTY)
|
||||||
{
|
{
|
||||||
#ifdef USE_ROCKBOX_USB
|
#ifdef HAVE_BOOTLOADER_USB_MODE
|
||||||
error(EBOOTFILE, ret, false);
|
error(EBOOTFILE, ret, false);
|
||||||
usb_mode();
|
usb_mode();
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -187,6 +187,7 @@
|
||||||
//#define USB_ENABLE_SERIAL
|
//#define USB_ENABLE_SERIAL
|
||||||
#define USB_VENDOR_ID 0x0781
|
#define USB_VENDOR_ID 0x0781
|
||||||
#define USB_PRODUCT_ID 0x7452
|
#define USB_PRODUCT_ID 0x7452
|
||||||
|
#define HAVE_BOOTLOADER_USB_MODE
|
||||||
#define HAVE_USB_HID_MOUSE
|
#define HAVE_USB_HID_MOUSE
|
||||||
|
|
||||||
/* Define this if you have adjustable CPU frequency */
|
/* Define this if you have adjustable CPU frequency */
|
||||||
|
|
|
@ -182,6 +182,7 @@
|
||||||
#define USB_VENDOR_ID 0x0781
|
#define USB_VENDOR_ID 0x0781
|
||||||
#define USB_PRODUCT_ID 0x7433
|
#define USB_PRODUCT_ID 0x7433
|
||||||
#define HAVE_USB_HID_MOUSE
|
#define HAVE_USB_HID_MOUSE
|
||||||
|
#define HAVE_BOOTLOADER_USB_MODE
|
||||||
|
|
||||||
/* Define this if you have adjustable CPU frequency */
|
/* Define this if you have adjustable CPU frequency */
|
||||||
#define HAVE_ADJUSTABLE_CPU_FREQ
|
#define HAVE_ADJUSTABLE_CPU_FREQ
|
||||||
|
|
|
@ -188,7 +188,7 @@
|
||||||
#define HAVE_USBSTACK
|
#define HAVE_USBSTACK
|
||||||
#define USB_VENDOR_ID 0x0781
|
#define USB_VENDOR_ID 0x0781
|
||||||
#define USB_PRODUCT_ID 0x74d1
|
#define USB_PRODUCT_ID 0x74d1
|
||||||
|
#define HAVE_BOOTLOADER_USB_MODE
|
||||||
|
|
||||||
/* Virtual LED (icon) */
|
/* Virtual LED (icon) */
|
||||||
#define CONFIG_LED LED_VIRTUAL
|
#define CONFIG_LED LED_VIRTUAL
|
||||||
|
|
|
@ -184,6 +184,7 @@
|
||||||
#define HAVE_USBSTACK
|
#define HAVE_USBSTACK
|
||||||
#define USB_VENDOR_ID 0x0781
|
#define USB_VENDOR_ID 0x0781
|
||||||
#define USB_PRODUCT_ID 0x7435
|
#define USB_PRODUCT_ID 0x7435
|
||||||
|
#define HAVE_BOOTLOADER_USB_MODE
|
||||||
|
|
||||||
/* Virtual LED (icon) */
|
/* Virtual LED (icon) */
|
||||||
#define CONFIG_LED LED_VIRTUAL
|
#define CONFIG_LED LED_VIRTUAL
|
||||||
|
|
|
@ -187,7 +187,7 @@
|
||||||
#define HAVE_USBSTACK
|
#define HAVE_USBSTACK
|
||||||
#define USB_VENDOR_ID 0x0781
|
#define USB_VENDOR_ID 0x0781
|
||||||
#define USB_PRODUCT_ID 0x74e5
|
#define USB_PRODUCT_ID 0x74e5
|
||||||
|
#define HAVE_BOOTLOADER_USB_MODE
|
||||||
|
|
||||||
/* Virtual LED (icon) */
|
/* Virtual LED (icon) */
|
||||||
#define CONFIG_LED LED_VIRTUAL
|
#define CONFIG_LED LED_VIRTUAL
|
||||||
|
|
|
@ -204,6 +204,7 @@
|
||||||
#define USB_VENDOR_ID 0x0781
|
#define USB_VENDOR_ID 0x0781
|
||||||
#define USB_PRODUCT_ID 0x7423
|
#define USB_PRODUCT_ID 0x7423
|
||||||
#define HAVE_USB_HID_MOUSE
|
#define HAVE_USB_HID_MOUSE
|
||||||
|
#define HAVE_BOOTLOADER_USB_MODE
|
||||||
|
|
||||||
/* Define this if you have adjustable CPU frequency */
|
/* Define this if you have adjustable CPU frequency */
|
||||||
#define HAVE_ADJUSTABLE_CPU_FREQ
|
#define HAVE_ADJUSTABLE_CPU_FREQ
|
||||||
|
|
|
@ -205,6 +205,7 @@
|
||||||
#define USB_VENDOR_ID 0x0781
|
#define USB_VENDOR_ID 0x0781
|
||||||
#define USB_PRODUCT_ID 0x74c1
|
#define USB_PRODUCT_ID 0x74c1
|
||||||
#define HAVE_USB_HID_MOUSE
|
#define HAVE_USB_HID_MOUSE
|
||||||
|
#define HAVE_BOOTLOADER_USB_MODE
|
||||||
|
|
||||||
/* Define this if you have adjustable CPU frequency */
|
/* Define this if you have adjustable CPU frequency */
|
||||||
#define HAVE_ADJUSTABLE_CPU_FREQ
|
#define HAVE_ADJUSTABLE_CPU_FREQ
|
||||||
|
|
|
@ -205,6 +205,7 @@
|
||||||
#define HAVE_USBSTACK
|
#define HAVE_USBSTACK
|
||||||
#define USB_VENDOR_ID 0x0781
|
#define USB_VENDOR_ID 0x0781
|
||||||
#define USB_PRODUCT_ID 0x74c3 /* MSC = 0x74c3, MTP = 0x74c2 */
|
#define USB_PRODUCT_ID 0x74c3 /* MSC = 0x74c3, MTP = 0x74c2 */
|
||||||
|
#define HAVE_BOOTLOADER_USB_MODE
|
||||||
|
|
||||||
/* Define this if you have adjustable CPU frequency */
|
/* Define this if you have adjustable CPU frequency */
|
||||||
//#define HAVE_ADJUSTABLE_CPU_FREQ
|
//#define HAVE_ADJUSTABLE_CPU_FREQ
|
||||||
|
|
|
@ -148,6 +148,7 @@
|
||||||
#define USB_VENDOR_ID 0x0781
|
#define USB_VENDOR_ID 0x0781
|
||||||
#define USB_PRODUCT_ID 0x7431
|
#define USB_PRODUCT_ID 0x7431
|
||||||
#define HAVE_USB_HID_MOUSE
|
#define HAVE_USB_HID_MOUSE
|
||||||
|
#define HAVE_BOOTLOADER_USB_MODE
|
||||||
|
|
||||||
#define CONFIG_LCD LCD_SSD1815
|
#define CONFIG_LCD LCD_SSD1815
|
||||||
|
|
||||||
|
|
|
@ -48,10 +48,8 @@
|
||||||
(defined(HAVE_USBSTACK) && defined(HAVE_BOOTLOADER_USB_MODE)) || \
|
(defined(HAVE_USBSTACK) && defined(HAVE_BOOTLOADER_USB_MODE)) || \
|
||||||
(defined(HAVE_USBSTACK) && (defined(CREATIVE_ZVx))) || \
|
(defined(HAVE_USBSTACK) && (defined(CREATIVE_ZVx))) || \
|
||||||
(defined(HAVE_USBSTACK) && (defined(OLYMPUS_MROBE_500))) || \
|
(defined(HAVE_USBSTACK) && (defined(OLYMPUS_MROBE_500))) || \
|
||||||
(defined(HAVE_USBSTACK) && CONFIG_USBOTG == USBOTG_S3C6400X) || \
|
|
||||||
defined(CPU_TCC77X) || defined(CPU_TCC780X) || \
|
defined(CPU_TCC77X) || defined(CPU_TCC780X) || \
|
||||||
(CONFIG_USBOTG == USBOTG_JZ4740) || \
|
(CONFIG_USBOTG == USBOTG_JZ4740)
|
||||||
(defined(HAVE_USBSTACK) && CONFIG_USBOTG == USBOTG_AS3525)
|
|
||||||
#define USB_FULL_INIT
|
#define USB_FULL_INIT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue