diff options
| author | Michael Giacomelli <giac2000@hotmail.com> | 2008-12-16 02:04:08 +0000 |
|---|---|---|
| committer | Michael Giacomelli <giac2000@hotmail.com> | 2008-12-16 02:04:08 +0000 |
| commit | 8493da0974fe9620773eb9558fbcf466b7b1b1f0 (patch) | |
| tree | 4390a33682785aaf4c9aa25f07de65bf0393e155 | |
| parent | 66b97219fc5ddf6bb899c8b21301a08d6f38ff5c (diff) | |
| download | rockbox-8493da0974fe9620773eb9558fbcf466b7b1b1f0.zip rockbox-8493da0974fe9620773eb9558fbcf466b7b1b1f0.tar.gz rockbox-8493da0974fe9620773eb9558fbcf466b7b1b1f0.tar.bz2 rockbox-8493da0974fe9620773eb9558fbcf466b7b1b1f0.tar.xz | |
Commit FS#9652 by Thomas Martitz. Enable microSD on e200v2 and fix initialization for the fuze and e200v2.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19451 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | firmware/target/arm/as3525/ata_sd_as3525.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/firmware/target/arm/as3525/ata_sd_as3525.c b/firmware/target/arm/as3525/ata_sd_as3525.c index 3cc8ed8..f71de7f 100644 --- a/firmware/target/arm/as3525/ata_sd_as3525.c +++ b/firmware/target/arm/as3525/ata_sd_as3525.c @@ -154,7 +154,7 @@ static void sd_panic(IF_MV2(const int drive,) const int status) } #ifdef HAVE_HOTSWAP -#ifdef SANSA_FUZE +#if defined(SANSA_E200V2) || defined(SANSA_FUZE) static bool sd1_oneshot_callback(struct timeout *tmo) { (void)tmo; @@ -381,11 +381,9 @@ static void sd_thread(void) if (ev.id == SYS_HOTSWAP_INSERTED) { - disk_mount(1); - } - else - { + sd_enable(true); init_pl180_controller(SD_SLOT_AS3525); + disk_mount(1); } queue_broadcast(SYS_FS_CHANGED, 0); @@ -438,7 +436,7 @@ static void init_pl180_controller(const int drive) VIC_INT_ENABLE |= (drive == INTERNAL_AS3525) ? INTERRUPT_NAND : INTERRUPT_MCI0; -#ifdef SANSA_FUZE +#if defined(SANSA_E200V2) || defined(SANSA_FUZE) /* setup isr for microsd monitoring */ VIC_INT_ENABLE |= (INTERRUPT_GPIOA); /* clear previous irq */ @@ -798,7 +796,7 @@ bool card_detect_target(void) { #ifdef HAVE_HOTSWAP /* TODO: add e200/c200 */ -#if defined(SANSA_FUZE) +#if defined(SANSA_E200V2) || defined(SANSA_FUZE) return !(GPIOA_PIN(2)); #endif #endif @@ -811,14 +809,14 @@ void card_enable_monitoring_target(bool on) if (on) { /* add e200v2/c200v2 here */ -#ifdef SANSA_FUZE +#if defined(SANSA_E200V2) || defined(SANSA_FUZE) /* enable isr*/ GPIOA_IE |= (1<<2); #endif } else { -#ifdef SANSA_FUZE +#if defined(SANSA_E200V2) || defined(SANSA_FUZE) /* edisable isr*/ GPIOA_IE &= ~(1<<2); #endif |