summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/coldfire/iriver/ata-iriver.c6
-rw-r--r--firmware/target/coldfire/iriver/h100/usb-h100.c10
2 files changed, 13 insertions, 3 deletions
diff --git a/firmware/target/coldfire/iriver/ata-iriver.c b/firmware/target/coldfire/iriver/ata-iriver.c
index 1b8f475c4c..92b953d24e 100644
--- a/firmware/target/coldfire/iriver/ata-iriver.c
+++ b/firmware/target/coldfire/iriver/ata-iriver.c
@@ -55,9 +55,15 @@ bool ata_is_coldstart(void)
55void ata_device_init(void) 55void ata_device_init(void)
56{ 56{
57#ifdef HAVE_ATA_LED_CTRL 57#ifdef HAVE_ATA_LED_CTRL
58#if defined(IRIVER_H100_SERIES) /* For iriver H100 series only */
59 /* Enable disk LED */
60 and_l(~0x00000200, &GPIO_OUT);
61 or_l( 0x00000200, &GPIO_ENABLE);
62#else
58 /* Enable disk LED & ISD chip power control */ 63 /* Enable disk LED & ISD chip power control */
59 and_l(~0x00000240, &GPIO_OUT); 64 and_l(~0x00000240, &GPIO_OUT);
60 or_l( 0x00000240, &GPIO_ENABLE); 65 or_l( 0x00000240, &GPIO_ENABLE);
66#endif /* IRIVER_H100_SERIES */
61 or_l( 0x00000200, &GPIO_FUNCTION); 67 or_l( 0x00000200, &GPIO_FUNCTION);
62#endif 68#endif
63 69
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}