summaryrefslogtreecommitdiffstats
path: root/firmware/target/coldfire/mpio
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 /firmware/target/coldfire/mpio
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
Diffstat (limited to 'firmware/target/coldfire/mpio')
-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)
/* GPIO42 is USB detect input
* but it also serves as MCLK2 for DAC
*/
- and_l(~(1<<4), &GPIO1_OUT);
- or_l((1<<4)|(1<<18), &GPIO1_ENABLE); /* GPIO36 GPIO50 */
- or_l((1<<4)|(1<<5)|(1<<18), &GPIO1_FUNCTION); /* GPIO36 GPIO37 GPIO50 */
+ and_l(~(1<<4), &GPIO1_OUT); /* GPIO36 low */
+ or_l((1<<4), &GPIO1_ENABLE); /* GPIO36 */
+ or_l((1<<4)|(1<<5), &GPIO1_FUNCTION); /* GPIO36 GPIO37 */
- /* GPIO22 GPIO30*/
- /* GPIO31 has to be low to ATA work */
+ /* GPIO22 GPIO30 high */
or_l((1<<22)|(1<<30), &GPIO_OUT);
- or_l((1<<22)|(1<<30)|(1<<31), &GPIO_ENABLE);
- or_l((1<<22)|(1<<30)|(1<<31), &GPIO_FUNCTION);
+ or_l((1<<22)|(1<<30), &GPIO_ENABLE);
+ or_l((1<<22)|(1<<30), &GPIO_FUNCTION);
}
int usb_detect(void)
@@ -52,14 +51,11 @@ void usb_enable(bool on)
if(on)
{
- or_l((1<<18),&GPIO1_OUT); /* GPIO50 high */
-
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<<18),&GPIO1_OUT); /* GPIO50 low */
sleep(HZ/5); /* delay 200 ms */
and_l(~(1<<22),&GPIO_OUT); /* GPIO22 low */
}