SansaAMS: Add a comment to clarifing a bit that the dcache is inactive without mmu; Show the cp15 control register in the "View I/O Pots menu".

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20324 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Thomas Martitz 2009-03-14 17:17:27 +00:00
parent b642129be4
commit 5876418343
2 changed files with 22 additions and 1 deletions

View file

@ -31,6 +31,13 @@
#define _DEBUG_PRINTF(a,varargs...) \
snprintf(buf, sizeof(buf), (a), ##varargs); lcd_puts(0,line++,buf)
#define ON "Enabled"
#define OFF "Enabled"
#define CP15_MMU (1<<0) /* mmu off/on */
#define CP15_DC (1<<2) /* dcache off/on */
#define CP15_IC (1<<12) /* icache off/on */
/* FIXME: target tree is including ./debug-target.h rather than the one in
* sansa-fuze/, even though deps contains the correct one
* if I put the below into a sansa-fuze/debug-target.h, it doesn't work*/
@ -39,8 +46,16 @@
short button_dbop_data(void);
#endif
static unsigned read_cp15 (void)
{
unsigned value;
/* TODO */
asm volatile (
"mrc p15, 0, %0, c1, c0, 0 @ read control reg\n":"=r"
(value)::"memory"
);
return (value);
}
bool __dbg_hw_info(void)
{
@ -68,6 +83,9 @@ bool __dbg_ports(void)
_DEBUG_PRINTF("[DBOP_DIN]");
_DEBUG_PRINTF("DBOP_DIN: %4x", button_dbop_data());
#endif
line++;
_DEBUG_PRINTF("[CP15]");
_DEBUG_PRINTF("CP15: 0x%8x", read_cp15());
lcd_update();
if (button_get_w_tmo(HZ/10) == (DEBUG_CANCEL|BUTTON_REL))
break;

View file

@ -236,6 +236,9 @@ void system_init(void)
CGU_PERI |= ((CLK_DIV(AS3525_PLLA_FREQ, AS3525_PCLK_FREQ) - 1) << 2)
| 1; /* clk_in = PLLA */
/* FIXME: dcache will not be active, since the mmu is not running
* See arm922t datasheet */
asm volatile(
"mov r0, #0 \n"
"mcr p15, 0, r0, c7, c7 \n" /* invalidate icache & dcache */