diff options
author | Frank Gevaerts <frank@gevaerts.be> | 2008-02-29 18:35:21 +0000 |
---|---|---|
committer | Frank Gevaerts <frank@gevaerts.be> | 2008-02-29 18:35:21 +0000 |
commit | 9a6b95f72187c0b27ea57fb8cc7c36c75e78ae58 (patch) | |
tree | 1c6c4f09183b09499c926afcae5a795438a66617 /firmware | |
parent | f712c7ff361c327376f9773d34be02428e01e080 (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.c | 5 |
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; } /*-------------------------------------------------------------------------*/ |