summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorFrank Gevaerts <frank@gevaerts.be>2008-02-29 18:35:21 +0000
committerFrank Gevaerts <frank@gevaerts.be>2008-02-29 18:35:21 +0000
commit9a6b95f72187c0b27ea57fb8cc7c36c75e78ae58 (patch)
tree1c6c4f09183b09499c926afcae5a795438a66617 /firmware
parentf712c7ff361c327376f9773d34be02428e01e080 (diff)
reset USB controller when entering USB test mode
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16456 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/usb-drv-pp502x.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/firmware/target/arm/usb-drv-pp502x.c b/firmware/target/arm/usb-drv-pp502x.c
index 033546f787..e35b4da67f 100644
--- a/firmware/target/arm/usb-drv-pp502x.c
+++ b/firmware/target/arm/usb-drv-pp502x.c
@@ -560,6 +560,11 @@ void usb_drv_set_test_mode(int mode)
REG_PORTSC1 |= PORTSCX_PTC_FORCE_EN;
break;
}
+ REG_USBCMD &= ~USBCMD_RUN;
+ udelay(50000);
+ REG_USBCMD |= USBCMD_CTRL_RESET;
+ while (REG_USBCMD & USBCMD_CTRL_RESET);
+ REG_USBCMD |= USBCMD_RUN;
}
/*-------------------------------------------------------------------------*/