summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmaury Pouly <pamaury@rockbox.org>2011-01-27 12:15:46 +0000
committerAmaury Pouly <pamaury@rockbox.org>2011-01-27 12:15:46 +0000
commit3a1bc3cfdd27b2f6d7268c9fc72910a32899f940 (patch)
treed3854fa4e2c12acc9f350791e572a811144ec2a1
parentcb56c46c5a381993e3d33585e40a59a22f471a70 (diff)
downloadrockbox-3a1bc3cfdd27b2f6d7268c9fc72910a32899f940.tar.gz
rockbox-3a1bc3cfdd27b2f6d7268c9fc72910a32899f940.tar.bz2
rockbox-3a1bc3cfdd27b2f6d7268c9fc72910a32899f940.zip
as3525v2-usb: fix logf format, don't mask the interrupt using the VIC as it seems to trigger spurious irq
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29146 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/target/arm/as3525/usb-drv-as3525v2.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/firmware/target/arm/as3525/usb-drv-as3525v2.c b/firmware/target/arm/as3525/usb-drv-as3525v2.c
index 165c0e4723..c18c579456 100644
--- a/firmware/target/arm/as3525/usb-drv-as3525v2.c
+++ b/firmware/target/arm/as3525/usb-drv-as3525v2.c
@@ -485,7 +485,7 @@ static void handle_ep_in_int(int ep)
/* works even for EP0 */
int size = (DIEPTSIZ(ep) & DEPTSIZ_xfersize_bits);
int transfered = endpoint->len - size;
- logf("len=%d reg=%ld xfer=%d", endpoint->len, size, transfered);
+ logf("len=%d reg=%d xfer=%d", endpoint->len, size, transfered);
/* handle EP0 state if necessary,
* this is a ack if length is 0 */
if(ep == 0)
@@ -748,8 +748,8 @@ static int usb_drv_transfer(int ep, void *ptr, int len, bool dir_in, bool blocki
logf("usb-drv: xfer EP%d, len=%d, dir_in=%d, blocking=%d", ep,
len, dir_in, blocking);
- /* mask the usb interrupt to avoid any race */
- VIC_INT_EN_CLEAR = INTERRUPT_USB;
+ /* disable interrupts to avoid any race */
+ int oldlevel = disable_irq_save();
volatile unsigned long *epctl = dir_in ? &DIEPCTL(ep) : &DOEPCTL(ep);
volatile unsigned long *eptsiz = dir_in ? &DIEPTSIZ(ep) : &DOEPTSIZ(ep);
@@ -792,8 +792,8 @@ static int usb_drv_transfer(int ep, void *ptr, int len, bool dir_in, bool blocki
DEPCTL |= DEPCTL_epena | DEPCTL_cnak;
- /* unmask the usb interrupt */
- VIC_INT_ENABLE = INTERRUPT_USB;
+ /* restore interrupts */
+ restore_irq(oldlevel);
if(blocking)
{