diff options
Diffstat (limited to 'firmware/target/arm/as3525/debug-as3525.c')
-rw-r--r-- | firmware/target/arm/as3525/debug-as3525.c | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/firmware/target/arm/as3525/debug-as3525.c b/firmware/target/arm/as3525/debug-as3525.c index a1e69834dd..24cee12cf4 100644 --- a/firmware/target/arm/as3525/debug-as3525.c +++ b/firmware/target/arm/as3525/debug-as3525.c | |||
@@ -62,8 +62,6 @@ | |||
62 | #define MCI_NAND *((volatile unsigned long *)(NAND_FLASH_BASE + 0x04)) | 62 | #define MCI_NAND *((volatile unsigned long *)(NAND_FLASH_BASE + 0x04)) |
63 | #define MCI_SD *((volatile unsigned long *)(SD_MCI_BASE + 0x04)) | 63 | #define MCI_SD *((volatile unsigned long *)(SD_MCI_BASE + 0x04)) |
64 | 64 | ||
65 | extern bool sd_enabled; | ||
66 | |||
67 | #if defined(SANSA_FUZE) || defined(SANSA_E200V2) || defined(SANSA_C200V2) | 65 | #if defined(SANSA_FUZE) || defined(SANSA_E200V2) || defined(SANSA_C200V2) |
68 | #define DEBUG_DBOP | 66 | #define DEBUG_DBOP |
69 | #include "dbop-as3525.h" | 67 | #include "dbop-as3525.h" |
@@ -253,13 +251,6 @@ static int calc_freq(int clk) | |||
253 | bool dbg_hw_info(void) | 251 | bool dbg_hw_info(void) |
254 | { | 252 | { |
255 | int line; | 253 | int line; |
256 | #if CONFIG_CPU == AS3525 | ||
257 | int last_nand = 0; | ||
258 | #ifdef HAVE_MULTIDRIVE | ||
259 | int last_sd = 0; | ||
260 | #endif | ||
261 | #endif /* CONFIG_CPU == AS3525 */ | ||
262 | |||
263 | lcd_clear_display(); | 254 | lcd_clear_display(); |
264 | lcd_setfont(FONT_SYSFIXED); | 255 | lcd_setfont(FONT_SYSFIXED); |
265 | 256 | ||
@@ -334,25 +325,17 @@ bool dbg_hw_info(void) | |||
334 | lcd_putsf(0, line++, "I2SO: %s %3dMHz", (CGU_AUDIO & (1<<11)) ? | 325 | lcd_putsf(0, line++, "I2SO: %s %3dMHz", (CGU_AUDIO & (1<<11)) ? |
335 | "on " : "off", calc_freq(CLK_I2SO)/1000000); | 326 | "on " : "off", calc_freq(CLK_I2SO)/1000000); |
336 | #if CONFIG_CPU == AS3525 | 327 | #if CONFIG_CPU == AS3525 |
337 | /* If disabled, enable SD cards so we can read the registers */ | 328 | struct ams_sd_debug_info dbg; |
338 | if(sd_enabled == false) | 329 | ams_sd_get_debug_info(&dbg); |
339 | { | ||
340 | sd_enable(true); | ||
341 | last_nand = MCI_NAND; | ||
342 | #ifdef HAVE_MULTIDRIVE | ||
343 | last_sd = MCI_SD; | ||
344 | #endif | ||
345 | sd_enable(false); | ||
346 | } | ||
347 | 330 | ||
348 | lcd_putsf(0, line++, "SD :%3dMHz %3dMHz", | 331 | lcd_putsf(0, line++, "SD :%3dMHz %3dMHz", |
349 | ((AS3525_IDE_FREQ/ 1000000) / | 332 | ((AS3525_IDE_FREQ/ 1000000) / |
350 | ((last_nand & MCI_CLOCK_BYPASS)? 1:(((last_nand & 0xff)+1) * 2))), | 333 | ((dbg.mci_nand & MCI_CLOCK_BYPASS)? 1:(((dbg.mci_nand & 0xff)+1) * 2))), |
351 | calc_freq(CLK_SD_MCLK_NAND)/1000000); | 334 | calc_freq(CLK_SD_MCLK_NAND)/1000000); |
352 | #ifdef HAVE_MULTIDRIVE | 335 | #ifdef HAVE_MULTIDRIVE |
353 | lcd_putsf(0, line++, "uSD :%3dMHz %3dMHz", | 336 | lcd_putsf(0, line++, "uSD :%3dMHz %3dMHz", |
354 | ((AS3525_PCLK_FREQ/ 1000000) / | 337 | ((AS3525_PCLK_FREQ/ 1000000) / |
355 | ((last_sd & MCI_CLOCK_BYPASS) ? 1: (((last_sd & 0xff) + 1) * 2))), | 338 | ((dbg.mci_sd & MCI_CLOCK_BYPASS) ? 1: (((dbg.mci_sd & 0xff) + 1) * 2))), |
356 | calc_freq(CLK_SD_MCLK_MSD)/1000000); | 339 | calc_freq(CLK_SD_MCLK_MSD)/1000000); |
357 | #endif | 340 | #endif |
358 | #endif /* CONFIG_CPU == AS3525 */ | 341 | #endif /* CONFIG_CPU == AS3525 */ |