From 19d70fce2069bb92e7cd9ff512f8d345069e89d8 Mon Sep 17 00:00:00 2001 From: Rafaël Carré Date: Thu, 15 Oct 2009 10:23:18 +0000 Subject: Sansa Fuze & e200v2 : do not enable USBSTACK in the bootloader Don't implement usb_enable() is HAVE_USBSTACK is not defined git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23185 a1c6a512-1295-4272-9138-f99709370657 --- firmware/export/config-e200v2.h | 4 ++++ firmware/export/config-fuze.h | 4 ++++ firmware/target/arm/as3525/usb-as3525.c | 6 ++++++ 3 files changed, 14 insertions(+) diff --git a/firmware/export/config-e200v2.h b/firmware/export/config-e200v2.h index dff99cde16..b108decce6 100644 --- a/firmware/export/config-e200v2.h +++ b/firmware/export/config-e200v2.h @@ -185,6 +185,8 @@ #define HAVE_HOTSWAP #endif +#ifndef BOOTLOADER + #define USB_HANDLED_BY_OF /* USB On-the-go */ @@ -195,6 +197,8 @@ #define USB_VENDOR_ID 0x0781 #define USB_PRODUCT_ID 0x7423 +#endif /* !BOOTLOADER */ + /* Define this if you have adjustable CPU frequency */ #define HAVE_ADJUSTABLE_CPU_FREQ diff --git a/firmware/export/config-fuze.h b/firmware/export/config-fuze.h index 4ca583ca60..def343c680 100644 --- a/firmware/export/config-fuze.h +++ b/firmware/export/config-fuze.h @@ -183,6 +183,8 @@ #define HAVE_HOTSWAP #endif +#ifndef BOOTLOADER + #define USB_HANDLED_BY_OF /* USB On-the-go */ @@ -193,6 +195,8 @@ #define USB_VENDOR_ID 0x0781 #define USB_PRODUCT_ID 0x7423 +#endif /* !BOOTLOADER */ + /* Define this if you have adjustable CPU frequency */ #define HAVE_ADJUSTABLE_CPU_FREQ diff --git a/firmware/target/arm/as3525/usb-as3525.c b/firmware/target/arm/as3525/usb-as3525.c index c32aa3c249..d5535d00b8 100644 --- a/firmware/target/arm/as3525/usb-as3525.c +++ b/firmware/target/arm/as3525/usb-as3525.c @@ -22,7 +22,9 @@ #include #include "config.h" #include "usb.h" +#ifdef HAVE_USBSTACK #include "usb_core.h" +#endif #include "usb-target.h" #include "power.h" #include "as3525.h" @@ -39,10 +41,14 @@ void usb_enable(bool on) { +#ifdef HAVE_USBSTACK if (on) usb_core_init(); else usb_core_exit(); +#else + (void)on; +#endif } void usb_init_device(void) -- cgit v1.2.3