summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm')
-rw-r--r--firmware/target/arm/gigabeat/meg-fx/ata-meg-fx.c10
-rw-r--r--firmware/target/arm/gigabeat/meg-fx/usb-meg-fx.c23
2 files changed, 11 insertions, 22 deletions
diff --git a/firmware/target/arm/gigabeat/meg-fx/ata-meg-fx.c b/firmware/target/arm/gigabeat/meg-fx/ata-meg-fx.c
index 3c6374f0cd..bc2b53d776 100644
--- a/firmware/target/arm/gigabeat/meg-fx/ata-meg-fx.c
+++ b/firmware/target/arm/gigabeat/meg-fx/ata-meg-fx.c
@@ -53,15 +53,7 @@ void ata_enable(bool on)
USB_ATA_ENABLE;
GPBCON=( GPGCON&~(1<<11) ) | (1<<10); /* Make the pin an output */
- GPBUP|=1<<5; /* Disable pullup in SOC as we are now driving */
-
-/* Code was originally: (Does not seem that GPG12 is connected in the F series)
- if(on)
- GPGDAT &= 1<<12;
- else
- GPGDAT |= 1<<12;
-*/
-
+// GPBUP|=1<<5; /* Disable pullup in SOC as we are now driving */
}
bool ata_is_coldstart(void)
diff --git a/firmware/target/arm/gigabeat/meg-fx/usb-meg-fx.c b/firmware/target/arm/gigabeat/meg-fx/usb-meg-fx.c
index ead286cec4..3aed8c3256 100644
--- a/firmware/target/arm/gigabeat/meg-fx/usb-meg-fx.c
+++ b/firmware/target/arm/gigabeat/meg-fx/usb-meg-fx.c
@@ -44,35 +44,32 @@ inline bool usb_detect(void)
void usb_init_device(void)
{
/* Input is the default configuration, only pullups need to be disabled */
- GPFUP|=0x03;
- GPGUP|= 1<<14;
+ GPFUP|=0x02;
USB_VPLUS_PWR_ASSERT;
GPBCON=( GPBCON&~(1<<13) ) | (1 << 12);
- GPBUP|= 1<<6;
sleep(HZ/20);
-
+
/* Reset the usb port */
USB_RST_ASSERT;
GPBCON = (GPBCON & ~0x200) | 0x100; /* Make sure reset line is an output */
- GPBUP |= 1<<4; /* Make sure pullup is disabled */
sleep(HZ/25);
USB_RST_DEASSERT;
-
+
/* needed to complete the reset */
ata_enable(false);
-
+
sleep(HZ/15); /* 66ms */
-
+
ata_enable(true);
-
+
sleep(HZ/25);
-
+
/* leave chip in low power mode */
USB_VPLUS_PWR_DEASSERT;
-
+
sleep(HZ/25);
}
@@ -90,8 +87,8 @@ void usb_enable(bool on)
}
/* Make sure USB_CRADLE_BUS pin is an output */
- GPHCON=( GPGCON&~(1<<17) ) | (1<<16); /* Make the pin an output */
- GPBUP|=1<<8; /* Disable pullup in SOC as we are now driving */
+ GPHCON=( GPHCON&~(1<<17) ) | (1<<16); /* Make the pin an output */
+ GPHUP|=1<<8; /* Disable pullup in SOC as we are now driving */
sleep(HZ/20); // > 50ms for detecting the enable state change
}