summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJörg Hohensohn <hohensoh@rockbox.org>2004-09-14 22:27:52 +0000
committerJörg Hohensohn <hohensoh@rockbox.org>2004-09-14 22:27:52 +0000
commiteb8fef7ccee4a4acff14e5f2e660ba0eb85f8528 (patch)
tree4168e4a0edc53ccd2b3a2347a3925229dff5d95d
parent7025d835c81e665f550c62c16b96d1d4b1a90eaf (diff)
downloadrockbox-eb8fef7ccee4a4acff14e5f2e660ba0eb85f8528.zip
rockbox-eb8fef7ccee4a4acff14e5f2e660ba0eb85f8528.tar.gz
rockbox-eb8fef7ccee4a4acff14e5f2e660ba0eb85f8528.tar.bz2
rockbox-eb8fef7ccee4a4acff14e5f2e660ba0eb85f8528.tar.xz
Ondio USB mode works, but only with external MMC
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5072 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/drivers/ata_mmc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/firmware/drivers/ata_mmc.c b/firmware/drivers/ata_mmc.c
index a297957..e889316 100644
--- a/firmware/drivers/ata_mmc.c
+++ b/firmware/drivers/ata_mmc.c
@@ -242,16 +242,17 @@ int ata_soft_reset(void)
void ata_enable(bool on)
{
- PBCR1 &= ~0x0C00; /* use PB13 as GPIO, if not modified below */
+ PBCR1 &= ~0x0CC0; /* PB13 and TxD1 become GPIOs, if not modified below */
if (on)
{
/* serial setup */
- PBCR1 |= 0x0800; /* as SCK1 */
+ PBCR1 |= 0x0880; /* as SCK1, TxD1 */
}
else
{
PBDR |= 0x2000; /* drive PB13 high */
PBIOR |= 0x2000; /* output PB13 */
+ PBIOR &= ~0x0800; /* high impedance for TxD1 GPIO */
}
}
@@ -275,10 +276,12 @@ int ata_init(void)
if(adc_read(ADC_MMC_SWITCH) < 0x200)
{ /* MMC inserted */
PADR &= ~0x1000; /* clear PA12 */
+ PADR |= 0x0400; /* chip select internal flash */
}
else
{ /* no MMC, use internal memory */
PADR |= 0x1000; /* set PA12 */
+ PADR |= 0x0200; /* chip select external flash */
}
sleeping = false;