diff options
Diffstat (limited to 'firmware/target/coldfire/mpio')
-rw-r--r-- | firmware/target/coldfire/mpio/hd200/usb-hd200.c | 16 |
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 | ||
44 | int usb_detect(void) | 43 | int 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 | } |