summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Bukat <marcin.bukat@gmail.com>2010-06-11 11:41:33 +0000
committerMarcin Bukat <marcin.bukat@gmail.com>2010-06-11 11:41:33 +0000
commit2d788744ae5d17c137e91a56f2a8fdb0824c0ede (patch)
treee27a373579bce5ce596860c4cff0fa3dbe34f7ca
parent2f7bd4d9938644a75afc5c13cf1ce3c702eb77ac (diff)
downloadrockbox-2d788744ae5d17c137e91a56f2a8fdb0824c0ede.tar.gz
rockbox-2d788744ae5d17c137e91a56f2a8fdb0824c0ede.zip
HD200 - clean up usb related functions
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26768 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/target/coldfire/mpio/hd200/usb-hd200.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/firmware/target/coldfire/mpio/hd200/usb-hd200.c b/firmware/target/coldfire/mpio/hd200/usb-hd200.c
index b4ab8ba929..4c9e353f66 100644
--- a/firmware/target/coldfire/mpio/hd200/usb-hd200.c
+++ b/firmware/target/coldfire/mpio/hd200/usb-hd200.c
@@ -30,15 +30,14 @@ void usb_init_device(void)
30 /* GPIO42 is USB detect input 30 /* GPIO42 is USB detect input
31 * but it also serves as MCLK2 for DAC 31 * but it also serves as MCLK2 for DAC
32 */ 32 */
33 and_l(~(1<<4), &GPIO1_OUT); 33 and_l(~(1<<4), &GPIO1_OUT); /* GPIO36 low */
34 or_l((1<<4)|(1<<18), &GPIO1_ENABLE); /* GPIO36 GPIO50 */ 34 or_l((1<<4), &GPIO1_ENABLE); /* GPIO36 */
35 or_l((1<<4)|(1<<5)|(1<<18), &GPIO1_FUNCTION); /* GPIO36 GPIO37 GPIO50 */ 35 or_l((1<<4)|(1<<5), &GPIO1_FUNCTION); /* GPIO36 GPIO37 */
36 36
37 /* GPIO22 GPIO30*/ 37 /* GPIO22 GPIO30 high */
38 /* GPIO31 has to be low to ATA work */
39 or_l((1<<22)|(1<<30), &GPIO_OUT); 38 or_l((1<<22)|(1<<30), &GPIO_OUT);
40 or_l((1<<22)|(1<<30)|(1<<31), &GPIO_ENABLE); 39 or_l((1<<22)|(1<<30), &GPIO_ENABLE);
41 or_l((1<<22)|(1<<30)|(1<<31), &GPIO_FUNCTION); 40 or_l((1<<22)|(1<<30), &GPIO_FUNCTION);
42} 41}
43 42
44int usb_detect(void) 43int usb_detect(void)
@@ -52,14 +51,11 @@ void usb_enable(bool on)
52 51
53 if(on) 52 if(on)
54 { 53 {
55 or_l((1<<18),&GPIO1_OUT); /* GPIO50 high */
56
57 and_l(~(1<<30),&GPIO_OUT); /* GPIO30 low */ 54 and_l(~(1<<30),&GPIO_OUT); /* GPIO30 low */
58 /* GPIO36 low delay GPIO36 high delay */ 55 /* GPIO36 low delay GPIO36 high delay */
59 and_l(~(1<<4),&GPIO1_OUT); 56 and_l(~(1<<4),&GPIO1_OUT);
60 or_l((1<<4),&GPIO1_OUT); 57 or_l((1<<4),&GPIO1_OUT);
61 58
62 and_l(~(1<<18),&GPIO1_OUT); /* GPIO50 low */
63 sleep(HZ/5); /* delay 200 ms */ 59 sleep(HZ/5); /* delay 200 ms */
64 and_l(~(1<<22),&GPIO_OUT); /* GPIO22 low */ 60 and_l(~(1<<22),&GPIO_OUT); /* GPIO22 low */
65 } 61 }