diff options
author | Thomas Martitz <kugel@rockbox.org> | 2009-03-14 17:17:27 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2009-03-14 17:17:27 +0000 |
commit | 58764183439c0a7611aca2fcf344496a1589babf (patch) | |
tree | b08ae5fbd0cf1d727d971356e9bb8ef51b24b65d /firmware/target | |
parent | b642129be493309179ddc0a659301667613c188e (diff) | |
download | rockbox-58764183439c0a7611aca2fcf344496a1589babf.tar.gz rockbox-58764183439c0a7611aca2fcf344496a1589babf.zip |
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
Diffstat (limited to 'firmware/target')
-rw-r--r-- | firmware/target/arm/as3525/debug-as3525.c | 20 | ||||
-rw-r--r-- | firmware/target/arm/as3525/system-as3525.c | 3 |
2 files changed, 22 insertions, 1 deletions
diff --git a/firmware/target/arm/as3525/debug-as3525.c b/firmware/target/arm/as3525/debug-as3525.c index 80f8702360..a8a973b9b2 100644 --- a/firmware/target/arm/as3525/debug-as3525.c +++ b/firmware/target/arm/as3525/debug-as3525.c | |||
@@ -31,6 +31,13 @@ | |||
31 | #define _DEBUG_PRINTF(a,varargs...) \ | 31 | #define _DEBUG_PRINTF(a,varargs...) \ |
32 | snprintf(buf, sizeof(buf), (a), ##varargs); lcd_puts(0,line++,buf) | 32 | snprintf(buf, sizeof(buf), (a), ##varargs); lcd_puts(0,line++,buf) |
33 | 33 | ||
34 | #define ON "Enabled" | ||
35 | #define OFF "Enabled" | ||
36 | |||
37 | #define CP15_MMU (1<<0) /* mmu off/on */ | ||
38 | #define CP15_DC (1<<2) /* dcache off/on */ | ||
39 | #define CP15_IC (1<<12) /* icache off/on */ | ||
40 | |||
34 | /* FIXME: target tree is including ./debug-target.h rather than the one in | 41 | /* FIXME: target tree is including ./debug-target.h rather than the one in |
35 | * sansa-fuze/, even though deps contains the correct one | 42 | * sansa-fuze/, even though deps contains the correct one |
36 | * if I put the below into a sansa-fuze/debug-target.h, it doesn't work*/ | 43 | * if I put the below into a sansa-fuze/debug-target.h, it doesn't work*/ |
@@ -39,8 +46,16 @@ | |||
39 | short button_dbop_data(void); | 46 | short button_dbop_data(void); |
40 | #endif | 47 | #endif |
41 | 48 | ||
49 | static unsigned read_cp15 (void) | ||
50 | { | ||
51 | unsigned value; | ||
42 | 52 | ||
43 | /* TODO */ | 53 | asm volatile ( |
54 | "mrc p15, 0, %0, c1, c0, 0 @ read control reg\n":"=r" | ||
55 | (value)::"memory" | ||
56 | ); | ||
57 | return (value); | ||
58 | } | ||
44 | 59 | ||
45 | bool __dbg_hw_info(void) | 60 | bool __dbg_hw_info(void) |
46 | { | 61 | { |
@@ -68,6 +83,9 @@ bool __dbg_ports(void) | |||
68 | _DEBUG_PRINTF("[DBOP_DIN]"); | 83 | _DEBUG_PRINTF("[DBOP_DIN]"); |
69 | _DEBUG_PRINTF("DBOP_DIN: %4x", button_dbop_data()); | 84 | _DEBUG_PRINTF("DBOP_DIN: %4x", button_dbop_data()); |
70 | #endif | 85 | #endif |
86 | line++; | ||
87 | _DEBUG_PRINTF("[CP15]"); | ||
88 | _DEBUG_PRINTF("CP15: 0x%8x", read_cp15()); | ||
71 | lcd_update(); | 89 | lcd_update(); |
72 | if (button_get_w_tmo(HZ/10) == (DEBUG_CANCEL|BUTTON_REL)) | 90 | if (button_get_w_tmo(HZ/10) == (DEBUG_CANCEL|BUTTON_REL)) |
73 | break; | 91 | break; |
diff --git a/firmware/target/arm/as3525/system-as3525.c b/firmware/target/arm/as3525/system-as3525.c index 26c806efc7..7af38ff9d1 100644 --- a/firmware/target/arm/as3525/system-as3525.c +++ b/firmware/target/arm/as3525/system-as3525.c | |||
@@ -236,6 +236,9 @@ void system_init(void) | |||
236 | CGU_PERI |= ((CLK_DIV(AS3525_PLLA_FREQ, AS3525_PCLK_FREQ) - 1) << 2) | 236 | CGU_PERI |= ((CLK_DIV(AS3525_PLLA_FREQ, AS3525_PCLK_FREQ) - 1) << 2) |
237 | | 1; /* clk_in = PLLA */ | 237 | | 1; /* clk_in = PLLA */ |
238 | 238 | ||
239 | |||
240 | /* FIXME: dcache will not be active, since the mmu is not running | ||
241 | * See arm922t datasheet */ | ||
239 | asm volatile( | 242 | asm volatile( |
240 | "mov r0, #0 \n" | 243 | "mov r0, #0 \n" |
241 | "mcr p15, 0, r0, c7, c7 \n" /* invalidate icache & dcache */ | 244 | "mcr p15, 0, r0, c7, c7 \n" /* invalidate icache & dcache */ |