summaryrefslogtreecommitdiffstats
path: root/firmware/target/coldfire/iriver
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/coldfire/iriver')
-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)
void ata_device_init(void)
{
#ifdef HAVE_ATA_LED_CTRL
+#if defined(IRIVER_H100_SERIES) /* For iriver H100 series only */
+ /* Enable disk LED */
+ and_l(~0x00000200, &GPIO_OUT);
+ or_l( 0x00000200, &GPIO_ENABLE);
+#else
/* Enable disk LED & ISD chip power control */
and_l(~0x00000240, &GPIO_OUT);
or_l( 0x00000240, &GPIO_ENABLE);
+#endif /* IRIVER_H100_SERIES */
or_l( 0x00000200, &GPIO_FUNCTION);
#endif
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 @@
void usb_init_device(void)
{
or_l(0x00000080, &GPIO1_FUNCTION); /* GPIO39 is the USB detect input */
- and_l(~0x01000040, &GPIO_OUT); /* GPIO24 is the Cypress chip power */
+
+ /* Turn off all Cypress chip power suppies */
+ and_l(~0x01000000, &GPIO_OUT); /* GPIO24 (USB_EN) - low (controled power from usb host) */
+ or_l(0x40, &GPIO_OUT); /* GPOI6 (USB_POW_ON) - high (controled power from internal battery) */
+
or_l(0x01000040, &GPIO_ENABLE);
or_l(0x01000040, &GPIO_FUNCTION);
}
@@ -43,12 +47,12 @@ void usb_enable(bool on)
if(on)
{
/* Power on the Cypress chip */
- or_l(0x01000040, &GPIO_OUT);
+ or_l(0x01000000, &GPIO_OUT); /* Turn on only GPIO24 (USB_EN). GPOI6 (USB_POW_ON) still at high state (off) */
sleep(2);
}
else
{
/* Power off the Cypress chip */
- and_l(~0x01000040, &GPIO_OUT);
+ and_l(~0x01000000, &GPIO_OUT); /* Turn off only GPIO24 (USB_EN). GPOI6 (USB_POW_ON) still at high state (off) */
}
}