mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 13:15:18 -05:00
Unconditionally boost cpu and remove CNAK retry panic
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27054 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
7ce6802b48
commit
826508029b
1 changed files with 5 additions and 3 deletions
|
|
@ -227,6 +227,9 @@ void usb_drv_init(void)
|
||||||
|
|
||||||
usb_enable_pll();
|
usb_enable_pll();
|
||||||
|
|
||||||
|
/* we have external power, so boost cpu */
|
||||||
|
cpu_boost(1);
|
||||||
|
|
||||||
/* length regulator: normal operation */
|
/* length regulator: normal operation */
|
||||||
ascodec_write(AS3514_CVDD_DCDC3, ascodec_read(AS3514_CVDD_DCDC3) | 1<<2);
|
ascodec_write(AS3514_CVDD_DCDC3, ascodec_read(AS3514_CVDD_DCDC3) | 1<<2);
|
||||||
|
|
||||||
|
|
@ -316,6 +319,7 @@ void usb_drv_exit(void)
|
||||||
/* Disable UVDD generating LDO */
|
/* Disable UVDD generating LDO */
|
||||||
ascodec_write(AS3515_USB_UTIL, ascodec_read(AS3515_USB_UTIL) & ~(1<<4));
|
ascodec_write(AS3515_USB_UTIL, ascodec_read(AS3515_USB_UTIL) & ~(1<<4));
|
||||||
usb_disable_pll();
|
usb_disable_pll();
|
||||||
|
cpu_boost(0);
|
||||||
logf("usb_drv_exit() !!!!\n");
|
logf("usb_drv_exit() !!!!\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -439,13 +443,11 @@ int usb_drv_recv(int ep, void *ptr, int len)
|
||||||
|
|
||||||
if (USB_OEP_CTRL(ep) & USB_EP_CTRL_NAK) {
|
if (USB_OEP_CTRL(ep) & USB_EP_CTRL_NAK) {
|
||||||
int i = 0;
|
int i = 0;
|
||||||
logf("CNAK fail? CTRL=%x\n", (int)USB_OEP_CTRL(ep));
|
|
||||||
while (USB_OEP_CTRL(ep) & USB_EP_CTRL_NAK) {
|
while (USB_OEP_CTRL(ep) & USB_EP_CTRL_NAK) {
|
||||||
USB_OEP_CTRL(ep) |= USB_EP_CTRL_CNAK; /* Go! */
|
USB_OEP_CTRL(ep) |= USB_EP_CTRL_CNAK; /* Go! */
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
if (i>2)
|
logf("ep%d CNAK needed %d retries CTRL=%x\n", ep, i, (int)USB_OEP_CTRL(ep));
|
||||||
panicf("ep%d CNAK needed %d retries CTRL=%x", ep, i, (int)USB_OEP_CTRL(ep));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue