summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--firmware/target/arm/as3525/ata_sd_as3525.c2
-rw-r--r--firmware/target/arm/as3525/debug-as3525.c14
2 files changed, 10 insertions, 6 deletions
diff --git a/firmware/target/arm/as3525/ata_sd_as3525.c b/firmware/target/arm/as3525/ata_sd_as3525.c
index bbf47a0960..c792946044 100644
--- a/firmware/target/arm/as3525/ata_sd_as3525.c
+++ b/firmware/target/arm/as3525/ata_sd_as3525.c
@@ -118,7 +118,7 @@ static const char sd_thread_name[] = "ata/sd";
static struct mutex sd_mtx;
static struct event_queue sd_queue;
#ifndef BOOTLOADER
-static bool sd_enabled = false;
+bool sd_enabled = false;
#endif
static struct wakeup transfer_completion_signal;
diff --git a/firmware/target/arm/as3525/debug-as3525.c b/firmware/target/arm/as3525/debug-as3525.c
index 0ed51e5898..2606f68e82 100644
--- a/firmware/target/arm/as3525/debug-as3525.c
+++ b/firmware/target/arm/as3525/debug-as3525.c
@@ -61,6 +61,7 @@
#define MCI_NAND *((volatile unsigned long *)(NAND_FLASH_BASE + 0x04))
#define MCI_SD *((volatile unsigned long *)(SD_MCI_BASE + 0x04))
+extern bool sd_enabled;
/* FIXME: target tree is including ./debug-target.h rather than the one in
* sansa-fuze/, even though deps contains the correct one
@@ -291,13 +292,16 @@ bool __dbg_hw_info(void)
lcd_putsf(0, line++, "I2SO: %s %3dMHz", (CGU_AUDIO & (1<<11)) ?
"on " : "off", calc_freq(CLK_I2SO)/1000000);
- /* Enable SD cards to read the registers */
- sd_enable(true);
- last_nand = MCI_NAND;
+ /* If disabled, enable SD cards so we can read the registers */
+ if(sd_enabled == false)
+ {
+ sd_enable(true);
+ last_nand = MCI_NAND;
#ifdef HAVE_MULTIDRIVE
- last_sd = MCI_SD;
+ last_sd = MCI_SD;
#endif
- sd_enable(false);
+ sd_enable(false);
+ }
lcd_putsf(0, line++, "SD :%3dMHz %3dMHz",
((AS3525_PCLK_FREQ/ 1000000) /