forked from len0rd/rockbox
Bugfix AS3525 usb driver unboosted the cpu without first boosting it
Change-Id: Id2d45870a9128b19ace0e8d5c16d3b3fa4b923dd
This commit is contained in:
parent
4f450b6e11
commit
b662ff945a
1 changed files with 11 additions and 2 deletions
|
|
@ -53,12 +53,21 @@ static int usb_status = USB_EXTRACTED;
|
||||||
void usb_enable(bool on)
|
void usb_enable(bool on)
|
||||||
{
|
{
|
||||||
#if defined(HAVE_USBSTACK)
|
#if defined(HAVE_USBSTACK)
|
||||||
|
static int boosted = 0;
|
||||||
if (on){
|
if (on){
|
||||||
cpu_boost(1);
|
if (boosted == 0)
|
||||||
|
{
|
||||||
|
cpu_boost(1);
|
||||||
|
boosted = 1;
|
||||||
|
}
|
||||||
usb_core_init();
|
usb_core_init();
|
||||||
} else {
|
} else {
|
||||||
usb_core_exit();
|
usb_core_exit();
|
||||||
cpu_boost(0);
|
if(boosted == 1)
|
||||||
|
{
|
||||||
|
cpu_boost(0);
|
||||||
|
boosted = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
(void)on;
|
(void)on;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue