diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/debug_menu.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c index 61b564820e..d1463c7353 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c | |||
@@ -438,6 +438,41 @@ 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 | ||
441 | 476 | ||
442 | #ifdef HAVE_LCD_BITMAP | 477 | #ifdef HAVE_LCD_BITMAP |
443 | static bool dbg_hw_info(void) | 478 | static bool dbg_hw_info(void) |