summaryrefslogtreecommitdiff
path: root/firmware/target/coldfire/iriver/h100/usb-h100.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/coldfire/iriver/h100/usb-h100.c')
-rw-r--r--firmware/target/coldfire/iriver/h100/usb-h100.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/firmware/target/coldfire/iriver/h100/usb-h100.c b/firmware/target/coldfire/iriver/h100/usb-h100.c
index 62e715788d..647c9f8b64 100644
--- a/firmware/target/coldfire/iriver/h100/usb-h100.c
+++ b/firmware/target/coldfire/iriver/h100/usb-h100.c
@@ -28,7 +28,11 @@
28void usb_init_device(void) 28void usb_init_device(void)
29{ 29{
30 or_l(0x00000080, &GPIO1_FUNCTION); /* GPIO39 is the USB detect input */ 30 or_l(0x00000080, &GPIO1_FUNCTION); /* GPIO39 is the USB detect input */
31 and_l(~0x01000040, &GPIO_OUT); /* GPIO24 is the Cypress chip power */ 31
32 /* Turn off all Cypress chip power suppies */
33 and_l(~0x01000000, &GPIO_OUT); /* GPIO24 (USB_EN) - low (controled power from usb host) */
34 or_l(0x40, &GPIO_OUT); /* GPOI6 (USB_POW_ON) - high (controled power from internal battery) */
35
32 or_l(0x01000040, &GPIO_ENABLE); 36 or_l(0x01000040, &GPIO_ENABLE);
33 or_l(0x01000040, &GPIO_FUNCTION); 37 or_l(0x01000040, &GPIO_FUNCTION);
34} 38}
@@ -43,12 +47,12 @@ void usb_enable(bool on)
43 if(on) 47 if(on)
44 { 48 {
45 /* Power on the Cypress chip */ 49 /* Power on the Cypress chip */
46 or_l(0x01000040, &GPIO_OUT); 50 or_l(0x01000000, &GPIO_OUT); /* Turn on only GPIO24 (USB_EN). GPOI6 (USB_POW_ON) still at high state (off) */
47 sleep(2); 51 sleep(2);
48 } 52 }
49 else 53 else
50 { 54 {
51 /* Power off the Cypress chip */ 55 /* Power off the Cypress chip */
52 and_l(~0x01000040, &GPIO_OUT); 56 and_l(~0x01000000, &GPIO_OUT); /* Turn off only GPIO24 (USB_EN). GPOI6 (USB_POW_ON) still at high state (off) */
53 } 57 }
54} 58}