summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmaury Pouly <pamaury@rockbox.org>2010-09-07 21:01:16 +0000
committerAmaury Pouly <pamaury@rockbox.org>2010-09-07 21:01:16 +0000
commit03d391d57a57bd9a96b5ffe16c82bf2813cd6c20 (patch)
tree562401f8969f11d567ecf27915addabfd5d11de0
parentf140930714df1b2d01d9e1d00d2a1097793f2a6d (diff)
downloadrockbox-03d391d57a57bd9a96b5ffe16c82bf2813cd6c20.tar.gz
rockbox-03d391d57a57bd9a96b5ffe16c82bf2813cd6c20.zip
as3525v2-usb: don't disable data transfers !
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28030 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/target/arm/as3525/usb-drv-as3525v2.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/firmware/target/arm/as3525/usb-drv-as3525v2.c b/firmware/target/arm/as3525/usb-drv-as3525v2.c
index 7c0ca5fce8..4b0293563a 100644
--- a/firmware/target/arm/as3525/usb-drv-as3525v2.c
+++ b/firmware/target/arm/as3525/usb-drv-as3525v2.c
@@ -292,7 +292,7 @@ static void reset_endpoints(void)
292 wakeup_signal(&endpoints[ep][DIR_IN].complete); 292 wakeup_signal(&endpoints[ep][DIR_IN].complete);
293 endpoints[ep][DIR_IN].wait = false; 293 endpoints[ep][DIR_IN].wait = false;
294 if(DIEPCTL(ep) & DEPCTL_epena) 294 if(DIEPCTL(ep) & DEPCTL_epena)
295 DIEPCTL(ep) = DEPCTL_epdis | DEPCTL_snak; 295 DIEPCTL(ep) = DEPCTL_snak;
296 else 296 else
297 DIEPCTL(ep) = 0; 297 DIEPCTL(ep) = 0;
298 } 298 }
@@ -305,7 +305,7 @@ static void reset_endpoints(void)
305 wakeup_signal(&endpoints[ep][DIR_OUT].complete); 305 wakeup_signal(&endpoints[ep][DIR_OUT].complete);
306 endpoints[ep][DIR_OUT].wait = false; 306 endpoints[ep][DIR_OUT].wait = false;
307 if(DOEPCTL(ep) & DEPCTL_epena) 307 if(DOEPCTL(ep) & DEPCTL_epena)
308 DOEPCTL(ep) = DEPCTL_epdis | DEPCTL_snak; 308 DOEPCTL(ep) = DEPCTL_snak;
309 else 309 else
310 DOEPCTL(ep) = 0; 310 DOEPCTL(ep) = 0;
311 } 311 }
@@ -331,7 +331,7 @@ static void cancel_all_transfers(bool cancel_ep0)
331 endpoints[ep][DIR_IN].wait = false; 331 endpoints[ep][DIR_IN].wait = false;
332 endpoints[ep][DIR_IN].busy = false; 332 endpoints[ep][DIR_IN].busy = false;
333 wakeup_signal(&endpoints[ep][DIR_IN].complete); 333 wakeup_signal(&endpoints[ep][DIR_IN].complete);
334 DIEPCTL(ep) = (DIEPCTL(ep) & ~DEPCTL_usbactep) | DEPCTL_epdis | DEPCTL_snak; 334 DIEPCTL(ep) = (DIEPCTL(ep) & ~DEPCTL_usbactep) | DEPCTL_snak;
335 } 335 }
336 FOR_EACH_OUT_EP_EX(cancel_ep0, i, ep) 336 FOR_EACH_OUT_EP_EX(cancel_ep0, i, ep)
337 { 337 {
@@ -339,7 +339,7 @@ static void cancel_all_transfers(bool cancel_ep0)
339 endpoints[ep][DIR_OUT].wait = false; 339 endpoints[ep][DIR_OUT].wait = false;
340 endpoints[ep][DIR_OUT].busy = false; 340 endpoints[ep][DIR_OUT].busy = false;
341 wakeup_signal(&endpoints[ep][DIR_OUT].complete); 341 wakeup_signal(&endpoints[ep][DIR_OUT].complete);
342 DOEPCTL(ep) = (DOEPCTL(ep) & ~DEPCTL_usbactep) | DEPCTL_epdis | DEPCTL_snak; 342 DOEPCTL(ep) = (DOEPCTL(ep) & ~DEPCTL_usbactep) | DEPCTL_snak;
343 } 343 }
344 344
345 restore_irq(flags); 345 restore_irq(flags);
@@ -708,7 +708,8 @@ int usb_drv_request_endpoint(int type, int dir)
708 } 708 }
709 709
710 unsigned long data = DEPCTL_setd0pid | (type << DEPCTL_eptype_bitp) 710 unsigned long data = DEPCTL_setd0pid | (type << DEPCTL_eptype_bitp)
711 | (usb_drv_mps_by_type(type) << DEPCTL_mps_bitp); 711 | (usb_drv_mps_by_type(type) << DEPCTL_mps_bitp)
712 | DEPCTL_usbactep | DEPCTL_snak;
712 unsigned long mask = ~(bitm(DEPCTL, eptype) | bitm(DEPCTL, mps)); 713 unsigned long mask = ~(bitm(DEPCTL, eptype) | bitm(DEPCTL, mps));
713 714
714 if(dir == USB_DIR_IN) DIEPCTL(ep) = (DIEPCTL(ep) & mask) | data; 715 if(dir == USB_DIR_IN) DIEPCTL(ep) = (DIEPCTL(ep) & mask) | data;