From 2d788744ae5d17c137e91a56f2a8fdb0824c0ede Mon Sep 17 00:00:00 2001 From: Marcin Bukat Date: Fri, 11 Jun 2010 11:41:33 +0000 Subject: HD200 - clean up usb related functions git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26768 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/coldfire/mpio/hd200/usb-hd200.c | 16 ++++++---------- 1 file 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 */ } -- cgit v1.2.3