forked from len0rd/rockbox
Fix: Doing the port function setting first in usb_enable() fixes the instability with cold-started rockbox on Ondio (PA5 was high after the first usb_enable(false); with the old init order
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5276 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
6239cdd898
commit
64a17574e3
1 changed files with 2 additions and 2 deletions
|
@ -83,6 +83,7 @@ static bool usb_monitor_enabled;
|
||||||
static void usb_enable(bool on)
|
static void usb_enable(bool on)
|
||||||
{
|
{
|
||||||
#ifdef USB_ENABLE_ONDIOSTYLE
|
#ifdef USB_ENABLE_ONDIOSTYLE
|
||||||
|
PACR2 &= ~0x04C0; /* use PA3, PA5 as GPIO */
|
||||||
if(on)
|
if(on)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_MMC
|
#ifdef HAVE_MMC
|
||||||
|
@ -96,7 +97,6 @@ static void usb_enable(bool on)
|
||||||
and_b(~0x20, &PADRL); /* disable USB */
|
and_b(~0x20, &PADRL); /* disable USB */
|
||||||
or_b(0x08, &PADRL); /* deassert card detect */
|
or_b(0x08, &PADRL); /* deassert card detect */
|
||||||
}
|
}
|
||||||
PACR2 &= ~0x04C0; /* use PA3, PA5 as GPIO */
|
|
||||||
or_b(0x28, &PAIORL); /* output for USB enable and card detect */
|
or_b(0x28, &PAIORL); /* output for USB enable and card detect */
|
||||||
#else /* standard HD Jukebox */
|
#else /* standard HD Jukebox */
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue