forked from len0rd/rockbox
Properly clear clear-on-write bits in the PP502x USB controller
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17066 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
10080b8420
commit
879c074656
1 changed files with 6 additions and 6 deletions
|
@ -428,7 +428,7 @@ void usb_drv_int(void)
|
||||||
|
|
||||||
/* usb transaction interrupt */
|
/* usb transaction interrupt */
|
||||||
if (status & USBSTS_INT) {
|
if (status & USBSTS_INT) {
|
||||||
REG_USBSTS |= USBSTS_INT;
|
REG_USBSTS = USBSTS_INT;
|
||||||
|
|
||||||
/* a control packet? */
|
/* a control packet? */
|
||||||
if (REG_ENDPTSETUPSTAT & EPSETUP_STATUS_EP0) {
|
if (REG_ENDPTSETUPSTAT & EPSETUP_STATUS_EP0) {
|
||||||
|
@ -441,20 +441,20 @@ void usb_drv_int(void)
|
||||||
|
|
||||||
/* error interrupt */
|
/* error interrupt */
|
||||||
if (status & USBSTS_ERR) {
|
if (status & USBSTS_ERR) {
|
||||||
REG_USBSTS |= USBSTS_ERR;
|
REG_USBSTS = USBSTS_ERR;
|
||||||
logf("usb error int");
|
logf("usb error int");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* reset interrupt */
|
/* reset interrupt */
|
||||||
if (status & USBSTS_RESET) {
|
if (status & USBSTS_RESET) {
|
||||||
REG_USBSTS |= USBSTS_RESET;
|
REG_USBSTS = USBSTS_RESET;
|
||||||
bus_reset();
|
bus_reset();
|
||||||
usb_core_bus_reset(); /* tell mom */
|
usb_core_bus_reset(); /* tell mom */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* port change */
|
/* port change */
|
||||||
if (status & USBSTS_PORT_CHANGE) {
|
if (status & USBSTS_PORT_CHANGE) {
|
||||||
REG_USBSTS |= USBSTS_PORT_CHANGE;
|
REG_USBSTS = USBSTS_PORT_CHANGE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -688,7 +688,7 @@ static void control_received(void)
|
||||||
tmp[1] = qh_array[0].setup_buffer[1];
|
tmp[1] = qh_array[0].setup_buffer[1];
|
||||||
|
|
||||||
/* acknowledge packet recieved */
|
/* acknowledge packet recieved */
|
||||||
REG_ENDPTSETUPSTAT |= EPSETUP_STATUS_EP0;
|
REG_ENDPTSETUPSTAT = EPSETUP_STATUS_EP0;
|
||||||
|
|
||||||
/* Stop pending control transfers */
|
/* Stop pending control transfers */
|
||||||
for(i=0;i<2;i++) {
|
for(i=0;i<2;i++) {
|
||||||
|
@ -706,7 +706,7 @@ static void transfer_completed(void)
|
||||||
{
|
{
|
||||||
int ep;
|
int ep;
|
||||||
unsigned int mask = REG_ENDPTCOMPLETE;
|
unsigned int mask = REG_ENDPTCOMPLETE;
|
||||||
REG_ENDPTCOMPLETE |= mask;
|
REG_ENDPTCOMPLETE = mask;
|
||||||
|
|
||||||
for (ep=0; ep<NUM_ENDPOINTS; ep++) {
|
for (ep=0; ep<NUM_ENDPOINTS; ep++) {
|
||||||
int dir;
|
int dir;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue