From eb8fef7ccee4a4acff14e5f2e660ba0eb85f8528 Mon Sep 17 00:00:00 2001 From: Jörg Hohensohn Date: Tue, 14 Sep 2004 22:27:52 +0000 Subject: Ondio USB mode works, but only with external MMC git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5072 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/ata_mmc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/firmware/drivers/ata_mmc.c b/firmware/drivers/ata_mmc.c index a29795789d..e88931698c 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; -- cgit v1.2.3