summaryrefslogtreecommitdiff
path: root/firmware/target/arm/as3525/usb-drv-as3525.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/as3525/usb-drv-as3525.c')
-rw-r--r--firmware/target/arm/as3525/usb-drv-as3525.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/firmware/target/arm/as3525/usb-drv-as3525.c b/firmware/target/arm/as3525/usb-drv-as3525.c
index ca1d8cbb07..f50713efbb 100644
--- a/firmware/target/arm/as3525/usb-drv-as3525.c
+++ b/firmware/target/arm/as3525/usb-drv-as3525.c
@@ -544,6 +544,14 @@ void usb_drv_init(void)
544void usb_drv_exit(void) 544void usb_drv_exit(void)
545{ 545{
546 USB_DEV_CTRL |= (1<<10); /* soft disconnect */ 546 USB_DEV_CTRL |= (1<<10); /* soft disconnect */
547 /*
548 * mask all interrupts _before_ writing to VIC_INT_EN_CLEAR,
549 * or else the core might latch the interrupt while
550 * the write ot VIC_INT_EN_CLEAR is in the pipeline and
551 * so cause a fake spurious interrupt.
552 */
553 USB_DEV_EP_INTR_MASK = 0xffffffff;
554 USB_DEV_INTR_MASK = 0xffffffff;
547 VIC_INT_EN_CLEAR = INTERRUPT_USB; 555 VIC_INT_EN_CLEAR = INTERRUPT_USB;
548 CGU_USB &= ~(1<<5); 556 CGU_USB &= ~(1<<5);
549 CGU_PERI &= ~CGU_USB_CLOCK_ENABLE; 557 CGU_PERI &= ~CGU_USB_CLOCK_ENABLE;