diff options
author | Marcin Bukat <marcin.bukat@gmail.com> | 2010-05-04 12:25:57 +0000 |
---|---|---|
committer | Marcin Bukat <marcin.bukat@gmail.com> | 2010-05-04 12:25:57 +0000 |
commit | 6a2b516f48486bdcb7cef643bb45e1eee9c45bf4 (patch) | |
tree | eebe0669398b4cf4a74b25e7e8c6f3c88300fdfb /firmware | |
parent | 69fa42d905340b7f7656495345b403076d243b38 (diff) | |
download | rockbox-6a2b516f48486bdcb7cef643bb45e1eee9c45bf4.tar.gz rockbox-6a2b516f48486bdcb7cef643bb45e1eee9c45bf4.zip |
HD200 - fix random partition corruption on USB unplug (hopefully)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25807 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/target/coldfire/mpio/hd200/usb-hd200.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/firmware/target/coldfire/mpio/hd200/usb-hd200.c b/firmware/target/coldfire/mpio/hd200/usb-hd200.c index 8f348b8038..b4ab8ba929 100644 --- a/firmware/target/coldfire/mpio/hd200/usb-hd200.c +++ b/firmware/target/coldfire/mpio/hd200/usb-hd200.c | |||
@@ -32,7 +32,7 @@ void usb_init_device(void) | |||
32 | */ | 32 | */ |
33 | and_l(~(1<<4), &GPIO1_OUT); | 33 | and_l(~(1<<4), &GPIO1_OUT); |
34 | or_l((1<<4)|(1<<18), &GPIO1_ENABLE); /* GPIO36 GPIO50 */ | 34 | or_l((1<<4)|(1<<18), &GPIO1_ENABLE); /* GPIO36 GPIO50 */ |
35 | or_l((1<<4)|(1<<18), &GPIO1_FUNCTION); | 35 | or_l((1<<4)|(1<<5)|(1<<18), &GPIO1_FUNCTION); /* GPIO36 GPIO37 GPIO50 */ |
36 | 36 | ||
37 | /* GPIO22 GPIO30*/ | 37 | /* GPIO22 GPIO30*/ |
38 | /* GPIO31 has to be low to ATA work */ | 38 | /* GPIO31 has to be low to ATA work */ |
@@ -76,6 +76,7 @@ void usb_enable(bool on) | |||
76 | 76 | ||
77 | and_l(~(1<<4),&GPIO1_OUT); /* GPIO36 low */ | 77 | and_l(~(1<<4),&GPIO1_OUT); /* GPIO36 low */ |
78 | 78 | ||
79 | //or_l((1<<18),&GPIO1_OUT); /* GPIO50 high */ | 79 | while ( !(GPIO1_READ & (1<<5)) ) {} |
80 | sleep(HZ); | ||
80 | } | 81 | } |
81 | } | 82 | } |