summaryrefslogtreecommitdiff
path: root/firmware/target/arm/as3525/usb-drv-as3525v2.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2011-01-28 02:30:03 +0000
committerMichael Sevakis <jethead71@rockbox.org>2011-01-28 02:30:03 +0000
commitac7fe5fb827f3f319acbcb778d927552312a01f6 (patch)
tree24be4c64df5b6389054da05f9294124cc56772e4 /firmware/target/arm/as3525/usb-drv-as3525v2.c
parent771011a6fc935dd8fa30641971678d7e38821f2a (diff)
AS3525v2 USB: Set disconnect before stopping module clock. Seems to cure reconnect weirdness for me and is probably the proper method anyway since otherwise the module will still be running when the clock is cut (bad).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29149 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/as3525/usb-drv-as3525v2.c')
-rw-r--r--firmware/target/arm/as3525/usb-drv-as3525v2.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/firmware/target/arm/as3525/usb-drv-as3525v2.c b/firmware/target/arm/as3525/usb-drv-as3525v2.c
index c18c579456..2ea90f9e94 100644
--- a/firmware/target/arm/as3525/usb-drv-as3525v2.c
+++ b/firmware/target/arm/as3525/usb-drv-as3525v2.c
@@ -158,6 +158,9 @@ static void as3525v2_connect(void)
static void as3525v2_disconnect(void)
{
+ /* Disconnect */
+ DCTL |= DCTL_sftdiscon;
+ usb_delay();
/* Disable clock */
CGU_USB = 0;
usb_delay();