diff options
author | Jens Arnold <amiconn@rockbox.org> | 2008-02-17 22:13:20 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2008-02-17 22:13:20 +0000 |
commit | 8c81e789cc7da214db5a5c1a3aa3698375a400e3 (patch) | |
tree | 2995ffea6c0763601f8e6149e5100e86cdd8cf23 /apps | |
parent | 4b7077f66c7dd22c7a2d450dc84c7ca89387fa18 (diff) | |
download | rockbox-8c81e789cc7da214db5a5c1a3aa3698375a400e3.tar.gz rockbox-8c81e789cc7da214db5a5c1a3aa3698375a400e3.zip |
Fix up incomplete reversal.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16336 a1c6a512-1295-4272-9138-f99709370657
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) |