From 77075be27902a097be2ec2513bf913607df40997 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Wed, 19 Jan 2011 03:30:47 +0000 Subject: Reset USB devices before turning them off or else presumably the PHY is still enabled after disconnect. After one actual connect, Windows would claim the device malfunctioned when inserting the cable for Screendump. If no connection was made before Screendump, then this wouldn't happen. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29087 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/arm/usb-fw-pp502x.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/firmware/target/arm/usb-fw-pp502x.c b/firmware/target/arm/usb-fw-pp502x.c index 536535e..e8711a6 100644 --- a/firmware/target/arm/usb-fw-pp502x.c +++ b/firmware/target/arm/usb-fw-pp502x.c @@ -188,6 +188,8 @@ void usb_enable(bool on) usb_core_exit(); #ifndef BOOTLOADER /* Disable USB devices */ + DEV_RS |= (DEV_USB0 | DEV_USB1); + DEV_RS &= ~(DEV_USB0 | DEV_USB1); DEV_EN &=~ DEV_USB0; DEV_EN &=~ DEV_USB1; DEV_INIT2 &=~ INIT_USB; -- cgit v1.1