From 8493da0974fe9620773eb9558fbcf466b7b1b1f0 Mon Sep 17 00:00:00 2001 From: Michael Giacomelli Date: Tue, 16 Dec 2008 02:04:08 +0000 Subject: 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 --- firmware/target/arm/as3525/ata_sd_as3525.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'firmware/target') diff --git a/firmware/target/arm/as3525/ata_sd_as3525.c b/firmware/target/arm/as3525/ata_sd_as3525.c index 3cc8ed8282..f71de7fdc0 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 -- cgit v1.2.3