diff options
Diffstat (limited to 'apps/debug_menu.c')
-rw-r--r-- | apps/debug_menu.c | 103 |
1 files changed, 1 insertions, 102 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c index 8304032599..1cedaf2b9b 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c | |||
@@ -92,7 +92,7 @@ | |||
92 | #include "pcf50605.h" | 92 | #include "pcf50605.h" |
93 | #endif | 93 | #endif |
94 | 94 | ||
95 | #if CONFIG_CPU == DM320 || CONFIG_CPU == S3C2440 || CONFIG_CPU == TCC7801 | 95 | #if CONFIG_CPU == DM320 || CONFIG_CPU == S3C2440 || CONFIG_CPU == TCC7801 || defined(CPU_PP) |
96 | #include "debug-target.h" | 96 | #include "debug-target.h" |
97 | #endif | 97 | #endif |
98 | 98 | ||
@@ -438,41 +438,6 @@ static bool dbg_flash_id(unsigned* p_manufacturer, unsigned* p_device, | |||
438 | #endif /* (CONFIG_CPU == SH7034 || CPU_COLDFIRE) */ | 438 | #endif /* (CONFIG_CPU == SH7034 || CPU_COLDFIRE) */ |
439 | 439 | ||
440 | #ifndef SIMULATOR | 440 | #ifndef SIMULATOR |
441 | #ifdef CPU_PP | ||
442 | static int perfcheck(void) | ||
443 | { | ||
444 | int result; | ||
445 | |||
446 | asm ( | ||
447 | "mrs r2, CPSR \n" | ||
448 | "orr r0, r2, #0xc0 \n" /* disable IRQ and FIQ */ | ||
449 | "msr CPSR_c, r0 \n" | ||
450 | "mov %[res], #0 \n" | ||
451 | "ldr r0, [%[timr]] \n" | ||
452 | "add r0, r0, %[tmo] \n" | ||
453 | "1: \n" | ||
454 | "add %[res], %[res], #1 \n" | ||
455 | "ldr r1, [%[timr]] \n" | ||
456 | "cmp r1, r0 \n" | ||
457 | "bmi 1b \n" | ||
458 | "msr CPSR_c, r2 \n" /* reset IRQ and FIQ state */ | ||
459 | : | ||
460 | [res]"=&r"(result) | ||
461 | : | ||
462 | [timr]"r"(&USEC_TIMER), | ||
463 | [tmo]"r"( | ||
464 | #if CONFIG_CPU == PP5002 | ||
465 | 16000 | ||
466 | #else /* PP5020/5022/5024 */ | ||
467 | 10226 | ||
468 | #endif | ||
469 | ) | ||
470 | : | ||
471 | "r0", "r1", "r2" | ||
472 | ); | ||
473 | return result; | ||
474 | } | ||
475 | #endif | ||
476 | 441 | ||
477 | #ifdef HAVE_LCD_BITMAP | 442 | #ifdef HAVE_LCD_BITMAP |
478 | static bool dbg_hw_info(void) | 443 | static bool dbg_hw_info(void) |
@@ -597,72 +562,6 @@ static bool dbg_hw_info(void) | |||
597 | lcd_update(); | 562 | lcd_update(); |
598 | 563 | ||
599 | while (!(action_userabort(TIMEOUT_BLOCK))); | 564 | while (!(action_userabort(TIMEOUT_BLOCK))); |
600 | |||
601 | #elif defined(CPU_PP502x) | ||
602 | int line = 0; | ||
603 | char buf[32]; | ||
604 | char pp_version[] = { (PP_VER2 >> 24) & 0xff, (PP_VER2 >> 16) & 0xff, | ||
605 | (PP_VER2 >> 8) & 0xff, (PP_VER2) & 0xff, | ||
606 | (PP_VER1 >> 24) & 0xff, (PP_VER1 >> 16) & 0xff, | ||
607 | (PP_VER1 >> 8) & 0xff, (PP_VER1) & 0xff, '\0' }; | ||
608 | |||
609 | lcd_setmargins(0, 0); | ||
610 | lcd_setfont(FONT_SYSFIXED); | ||
611 | lcd_clear_display(); | ||
612 | |||
613 | lcd_puts(0, line++, "[Hardware info]"); | ||
614 | |||
615 | #ifdef IPOD_ARCH | ||
616 | snprintf(buf, sizeof(buf), "HW rev: 0x%08lx", IPOD_HW_REVISION); | ||
617 | lcd_puts(0, line++, buf); | ||
618 | #endif | ||
619 | |||
620 | #ifdef IPOD_COLOR | ||
621 | extern int lcd_type; /* Defined in lcd-colornano.c */ | ||
622 | |||
623 | snprintf(buf, sizeof(buf), "LCD type: %d", lcd_type); | ||
624 | lcd_puts(0, line++, buf); | ||
625 | #endif | ||
626 | |||
627 | snprintf(buf, sizeof(buf), "PP version: %s", pp_version); | ||
628 | lcd_puts(0, line++, buf); | ||
629 | |||
630 | snprintf(buf, sizeof(buf), "Est. clock (kHz): %d", perfcheck()); | ||
631 | lcd_puts(0, line++, buf); | ||
632 | |||
633 | lcd_update(); | ||
634 | |||
635 | while (!(action_userabort(TIMEOUT_BLOCK))); | ||
636 | |||
637 | #elif CONFIG_CPU == PP5002 | ||
638 | int line = 0; | ||
639 | char buf[32]; | ||
640 | char pp_version[] = { (PP_VER4 >> 8) & 0xff, PP_VER4 & 0xff, | ||
641 | (PP_VER3 >> 8) & 0xff, PP_VER3 & 0xff, | ||
642 | (PP_VER2 >> 8) & 0xff, PP_VER2 & 0xff, | ||
643 | (PP_VER1 >> 8) & 0xff, PP_VER1 & 0xff, '\0' }; | ||
644 | |||
645 | |||
646 | lcd_setmargins(0, 0); | ||
647 | lcd_setfont(FONT_SYSFIXED); | ||
648 | lcd_clear_display(); | ||
649 | |||
650 | lcd_puts(0, line++, "[Hardware info]"); | ||
651 | |||
652 | #ifdef IPOD_ARCH | ||
653 | snprintf(buf, sizeof(buf), "HW rev: 0x%08lx", IPOD_HW_REVISION); | ||
654 | lcd_puts(0, line++, buf); | ||
655 | #endif | ||
656 | |||
657 | snprintf(buf, sizeof(buf), "PP version: %s", pp_version); | ||
658 | lcd_puts(0, line++, buf); | ||
659 | |||
660 | snprintf(buf, sizeof(buf), "Est. clock (kHz): %d", perfcheck()); | ||
661 | lcd_puts(0, line++, buf); | ||
662 | |||
663 | lcd_update(); | ||
664 | |||
665 | while (!(action_userabort(TIMEOUT_BLOCK))); | ||
666 | #else | 565 | #else |
667 | /* Define this function in your target tree */ | 566 | /* Define this function in your target tree */ |
668 | return __dbg_hw_info(); | 567 | return __dbg_hw_info(); |