summaryrefslogtreecommitdiff
path: root/firmware/target
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target')
-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";
118static struct mutex sd_mtx; 118static struct mutex sd_mtx;
119static struct event_queue sd_queue; 119static struct event_queue sd_queue;
120#ifndef BOOTLOADER 120#ifndef BOOTLOADER
121static bool sd_enabled = false; 121bool sd_enabled = false;
122#endif 122#endif
123 123
124static struct wakeup transfer_completion_signal; 124static 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 @@
61#define MCI_NAND *((volatile unsigned long *)(NAND_FLASH_BASE + 0x04)) 61#define MCI_NAND *((volatile unsigned long *)(NAND_FLASH_BASE + 0x04))
62#define MCI_SD *((volatile unsigned long *)(SD_MCI_BASE + 0x04)) 62#define MCI_SD *((volatile unsigned long *)(SD_MCI_BASE + 0x04))
63 63
64extern bool sd_enabled;
64 65
65/* FIXME: target tree is including ./debug-target.h rather than the one in 66/* FIXME: target tree is including ./debug-target.h rather than the one in
66 * sansa-fuze/, even though deps contains the correct one 67 * sansa-fuze/, even though deps contains the correct one
@@ -291,13 +292,16 @@ bool __dbg_hw_info(void)
291 lcd_putsf(0, line++, "I2SO: %s %3dMHz", (CGU_AUDIO & (1<<11)) ? 292 lcd_putsf(0, line++, "I2SO: %s %3dMHz", (CGU_AUDIO & (1<<11)) ?
292 "on " : "off", calc_freq(CLK_I2SO)/1000000); 293 "on " : "off", calc_freq(CLK_I2SO)/1000000);
293 294
294 /* Enable SD cards to read the registers */ 295 /* If disabled, enable SD cards so we can read the registers */
295 sd_enable(true); 296 if(sd_enabled == false)
296 last_nand = MCI_NAND; 297 {
298 sd_enable(true);
299 last_nand = MCI_NAND;
297#ifdef HAVE_MULTIDRIVE 300#ifdef HAVE_MULTIDRIVE
298 last_sd = MCI_SD; 301 last_sd = MCI_SD;
299#endif 302#endif
300 sd_enable(false); 303 sd_enable(false);
304 }
301 305
302 lcd_putsf(0, line++, "SD :%3dMHz %3dMHz", 306 lcd_putsf(0, line++, "SD :%3dMHz %3dMHz",
303 ((AS3525_PCLK_FREQ/ 1000000) / 307 ((AS3525_PCLK_FREQ/ 1000000) /