summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorAmaury Pouly <pamaury@rockbox.org>2010-09-07 20:50:23 +0000
committerAmaury Pouly <pamaury@rockbox.org>2010-09-07 20:50:23 +0000
commitf140930714df1b2d01d9e1d00d2a1097793f2a6d (patch)
treedb53ecaeec6a32a69c12d87f153fa188e4bbdcae /firmware
parentf20d11c7180e9bcb44b7ed4ab9cdea9ed6663221 (diff)
downloadrockbox-f140930714df1b2d01d9e1d00d2a1097793f2a6d.tar.gz
rockbox-f140930714df1b2d01d9e1d00d2a1097793f2a6d.zip
as3525v2-usb: fix red and fix stupid typo about endpoint status
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28029 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/as3525/usb-drv-as3525v2.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/firmware/target/arm/as3525/usb-drv-as3525v2.c b/firmware/target/arm/as3525/usb-drv-as3525v2.c
index 638ffadc76..7c0ca5fce8 100644
--- a/firmware/target/arm/as3525/usb-drv-as3525v2.c
+++ b/firmware/target/arm/as3525/usb-drv-as3525v2.c
@@ -731,11 +731,9 @@ void usb_drv_cancel_all_transfers()
static int usb_drv_transfer(int ep, void *ptr, int len, bool dir_in, bool blocking)
{
ep = EP_NUM(ep);
- if(ep != 0)
- {
- _logf("usb-drv: xfer EP%d, len=%d, dir_in=%d, blocking=%d", ep,
- len, dir_in, blocking);
- }
+
+ logf("usb-drv: xfer EP%d, len=%d, dir_in=%d, blocking=%d", ep,
+ len, dir_in, blocking);
volatile unsigned long *epctl = dir_in ? &DIEPCTL(ep) : &DOEPCTL(ep);
volatile unsigned long *eptsiz = dir_in ? &DIEPTSIZ(ep) : &DOEPTSIZ(ep);
@@ -746,19 +744,16 @@ static int usb_drv_transfer(int ep, void *ptr, int len, bool dir_in, bool blocki
#define DEPDMA *epdma
if(endpoint->busy)
- _logf("usb-drv: EP%d %s is already busy", ep, dir_in ? "IN" : "OUT");
+ logf("usb-drv: EP%d %s is already busy", ep, dir_in ? "IN" : "OUT");
endpoint->busy = true;
endpoint->len = len;
endpoint->wait = blocking;
- endpoint->status = true;
+ endpoint->status = 0;
DEPCTL &= ~DEPCTL_stall;
DEPCTL |= DEPCTL_usbactep;
- if(ep != 0)
- _logf("usb-drv: depctl=%lx", DEPCTL);
-
int mps = usb_drv_mps_by_type(extract(DEPCTL, eptype));
int nb_packets = (len + mps - 1) / mps;
@@ -778,9 +773,6 @@ static int usb_drv_transfer(int ep, void *ptr, int len, bool dir_in, bool blocki
DEPCTL |= DEPCTL_epena | DEPCTL_cnak;
- if(ep != 0)
- _logf("usb-drv: depctl=%lx", DEPCTL);
-
if(blocking)
wakeup_wait(&endpoint->complete, TIMEOUT_BLOCK);
if(endpoint->status != 0)