summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Bukat <marcin.bukat@gmail.com>2010-06-14 10:42:41 +0000
committerMarcin Bukat <marcin.bukat@gmail.com>2010-06-14 10:42:41 +0000
commitcc6747ca5ba6a8597aa134e8c51803a55f2c9d56 (patch)
tree2ae825d2e123bb1d62d7275b35e7dd78627633bc
parentb49577b3815d1cd3a657a709c81f1ff7d0c07ae4 (diff)
HD200 - make USB bridge handling more correct
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26843 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/target/coldfire/mpio/hd200/usb-hd200.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/firmware/target/coldfire/mpio/hd200/usb-hd200.c b/firmware/target/coldfire/mpio/hd200/usb-hd200.c
index 4c9e353f66..9a82359966 100644
--- a/firmware/target/coldfire/mpio/hd200/usb-hd200.c
+++ b/firmware/target/coldfire/mpio/hd200/usb-hd200.c
@@ -52,27 +52,19 @@ void usb_enable(bool on)
if(on)
{
and_l(~(1<<30),&GPIO_OUT); /* GPIO30 low */
- /* GPIO36 low delay GPIO36 high delay */
- and_l(~(1<<4),&GPIO1_OUT);
- or_l((1<<4),&GPIO1_OUT);
+ and_l(~(1<<22),&GPIO_OUT); /* GPIO22 low */
+
+ or_l((1<<4),&GPIO1_OUT); /* GPIO36 high */
- sleep(HZ/5); /* delay 200 ms */
- and_l(~(1<<22),&GPIO_OUT); /* GPIO22 low */
}
else
{
- /* GPIO36 low delay GPIO36 high delay */
- and_l(~(1<<4),&GPIO1_OUT);
- sleep(HZ/100);
- or_l((1<<4),&GPIO1_OUT);
- sleep(HZ/100);
-
or_l((1<<22),&GPIO_OUT); /* GPIO22 high */
or_l((1<<30),&GPIO_OUT); /* GPIO30 high */
and_l(~(1<<4),&GPIO1_OUT); /* GPIO36 low */
- while ( !(GPIO1_READ & (1<<5)) ) {}
- sleep(HZ);
+ while ( !(GPIO1_READ & (1<<5)) ) {}
+ sleep(HZ);
}
}