1
0
Fork 0
forked from len0rd/rockbox

Hopefully fix FS#8506 (OF cant be loaded on some PP targets). also hopefully fixes usb detection for at least e200

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17017 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jonathan Gordon 2008-04-07 13:00:28 +00:00
parent 5d4c7d7aaa
commit 95f7b4db01
2 changed files with 7 additions and 5 deletions

View file

@ -52,11 +52,13 @@ void usb_init_device(void)
/* disable USB-devices until USB is detected via GPIO */ /* disable USB-devices until USB is detected via GPIO */
#ifndef BOOTLOADER #ifndef BOOTLOADER
/* Disabling USB0 in the bootloader makes the OF not load */ /* Disabling USB0 in the bootloader makes the OF not load,
Also something here breaks usb pin detect in bootloader.
leave it all enabled untill rockbox main loads */
DEV_EN &= ~DEV_USB0; DEV_EN &= ~DEV_USB0;
#endif
DEV_EN &= ~DEV_USB1; DEV_EN &= ~DEV_USB1;
DEV_INIT2 &= ~INIT_USB; DEV_INIT2 &= ~INIT_USB;
#endif
#if defined(IPOD_COLOR) || defined(IPOD_4G) \ #if defined(IPOD_COLOR) || defined(IPOD_4G) \
|| defined(IPOD_MINI) || defined(IPOD_MINI2G) || defined(IPOD_MINI) || defined(IPOD_MINI2G)
@ -78,10 +80,7 @@ void usb_enable(bool on)
else { else {
usb_core_exit(); usb_core_exit();
/* Disable USB devices */ /* Disable USB devices */
#ifndef BOOTLOADER
/* Disabling USB0 in the bootloader makes the OF not load */
DEV_EN &=~ DEV_USB0; DEV_EN &=~ DEV_USB0;
#endif
DEV_EN &=~ DEV_USB1; DEV_EN &=~ DEV_USB1;
DEV_INIT2 &=~ INIT_USB; DEV_INIT2 &=~ INIT_USB;
} }

View file

@ -253,6 +253,7 @@ static void usb_thread(void)
#ifndef USE_ROCKBOX_USB #ifndef USE_ROCKBOX_USB
/* until we have native mass-storage mode, we want to reboot on /* until we have native mass-storage mode, we want to reboot on
usb host connect */ usb host connect */
usb_enable(true);
try_reboot(); try_reboot();
#endif /* USE_ROCKBOX_USB */ #endif /* USE_ROCKBOX_USB */
#ifdef HAVE_PRIORITY_SCHEDULING #ifdef HAVE_PRIORITY_SCHEDULING
@ -460,7 +461,9 @@ void usb_init(void)
#endif #endif
usb_init_device(); usb_init_device();
#ifndef BOOTLOADER
usb_enable(false); usb_enable(false);
#endif
/* We assume that the USB cable is extracted */ /* We assume that the USB cable is extracted */
last_usb_status = USB_EXTRACTED; last_usb_status = USB_EXTRACTED;