diff options
author | Amaury Pouly <pamaury@rockbox.org> | 2011-01-24 15:34:14 +0000 |
---|---|---|
committer | Amaury Pouly <pamaury@rockbox.org> | 2011-01-24 15:34:14 +0000 |
commit | 9b02ce9e498e8c3580a25852c17345df710b4893 (patch) | |
tree | 245a9d01800fa80c508622e691925e1c13433e9e /firmware/target/arm | |
parent | 297ca4b1af2c595832e46ff7b0cd6072333cae66 (diff) | |
download | rockbox-9b02ce9e498e8c3580a25852c17345df710b4893.tar.gz rockbox-9b02ce9e498e8c3580a25852c17345df710b4893.zip |
as3525v2-usb: mask usb interrupt when setting up a transfer
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29130 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm')
-rw-r--r-- | firmware/target/arm/as3525/usb-drv-as3525v2.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/firmware/target/arm/as3525/usb-drv-as3525v2.c b/firmware/target/arm/as3525/usb-drv-as3525v2.c index dc9e0b3949..165c0e4723 100644 --- a/firmware/target/arm/as3525/usb-drv-as3525v2.c +++ b/firmware/target/arm/as3525/usb-drv-as3525v2.c | |||
@@ -748,6 +748,9 @@ static int usb_drv_transfer(int ep, void *ptr, int len, bool dir_in, bool blocki | |||
748 | logf("usb-drv: xfer EP%d, len=%d, dir_in=%d, blocking=%d", ep, | 748 | logf("usb-drv: xfer EP%d, len=%d, dir_in=%d, blocking=%d", ep, |
749 | len, dir_in, blocking); | 749 | len, dir_in, blocking); |
750 | 750 | ||
751 | /* mask the usb interrupt to avoid any race */ | ||
752 | VIC_INT_EN_CLEAR = INTERRUPT_USB; | ||
753 | |||
751 | volatile unsigned long *epctl = dir_in ? &DIEPCTL(ep) : &DOEPCTL(ep); | 754 | volatile unsigned long *epctl = dir_in ? &DIEPCTL(ep) : &DOEPCTL(ep); |
752 | volatile unsigned long *eptsiz = dir_in ? &DIEPTSIZ(ep) : &DOEPTSIZ(ep); | 755 | volatile unsigned long *eptsiz = dir_in ? &DIEPTSIZ(ep) : &DOEPTSIZ(ep); |
753 | volatile unsigned long *epdma = dir_in ? &DIEPDMA(ep) : &DOEPDMA(ep); | 756 | volatile unsigned long *epdma = dir_in ? &DIEPDMA(ep) : &DOEPDMA(ep); |
@@ -789,6 +792,9 @@ static int usb_drv_transfer(int ep, void *ptr, int len, bool dir_in, bool blocki | |||
789 | 792 | ||
790 | DEPCTL |= DEPCTL_epena | DEPCTL_cnak; | 793 | DEPCTL |= DEPCTL_epena | DEPCTL_cnak; |
791 | 794 | ||
795 | /* unmask the usb interrupt */ | ||
796 | VIC_INT_ENABLE = INTERRUPT_USB; | ||
797 | |||
792 | if(blocking) | 798 | if(blocking) |
793 | { | 799 | { |
794 | wakeup_wait(&endpoint->complete, TIMEOUT_BLOCK); | 800 | wakeup_wait(&endpoint->complete, TIMEOUT_BLOCK); |