summaryrefslogtreecommitdiff
path: root/firmware/target/coldfire/mpio/hd200/usb-hd200.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/coldfire/mpio/hd200/usb-hd200.c')
-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)
52 if(on) 52 if(on)
53 { 53 {
54 and_l(~(1<<30),&GPIO_OUT); /* GPIO30 low */ 54 and_l(~(1<<30),&GPIO_OUT); /* GPIO30 low */
55 /* GPIO36 low delay GPIO36 high delay */ 55 and_l(~(1<<22),&GPIO_OUT); /* GPIO22 low */
56 and_l(~(1<<4),&GPIO1_OUT); 56
57 or_l((1<<4),&GPIO1_OUT); 57 or_l((1<<4),&GPIO1_OUT); /* GPIO36 high */
58 58
59 sleep(HZ/5); /* delay 200 ms */
60 and_l(~(1<<22),&GPIO_OUT); /* GPIO22 low */
61 } 59 }
62 else 60 else
63 { 61 {
64 /* GPIO36 low delay GPIO36 high delay */
65 and_l(~(1<<4),&GPIO1_OUT);
66 sleep(HZ/100);
67 or_l((1<<4),&GPIO1_OUT);
68 sleep(HZ/100);
69
70 or_l((1<<22),&GPIO_OUT); /* GPIO22 high */ 62 or_l((1<<22),&GPIO_OUT); /* GPIO22 high */
71 or_l((1<<30),&GPIO_OUT); /* GPIO30 high */ 63 or_l((1<<30),&GPIO_OUT); /* GPIO30 high */
72 64
73 and_l(~(1<<4),&GPIO1_OUT); /* GPIO36 low */ 65 and_l(~(1<<4),&GPIO1_OUT); /* GPIO36 low */
74 66
75 while ( !(GPIO1_READ & (1<<5)) ) {} 67 while ( !(GPIO1_READ & (1<<5)) ) {}
76 sleep(HZ); 68 sleep(HZ);
77 } 69 }
78} 70}