diff options
author | Rafaël Carré <rafael.carre@gmail.com> | 2009-06-13 23:52:13 +0000 |
---|---|---|
committer | Rafaël Carré <rafael.carre@gmail.com> | 2009-06-13 23:52:13 +0000 |
commit | 02a53fd809b46ef60555c55d550e6754c46c4c69 (patch) | |
tree | a31ec451bd4fb32af67b128f89741bdc5789bb43 /firmware/target/arm/as3525 | |
parent | 2bb7c422ea78a93cae53e2f9746559fa0bf7ee7b (diff) | |
download | rockbox-02a53fd809b46ef60555c55d550e6754c46c4c69.tar.gz rockbox-02a53fd809b46ef60555c55d550e6754c46c4c69.zip |
Sansa AMS: add a comment in sdram_init(), and use inline asm to set the SDRAM mode register
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21282 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/as3525')
-rw-r--r-- | firmware/target/arm/as3525/system-as3525.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/firmware/target/arm/as3525/system-as3525.c b/firmware/target/arm/as3525/system-as3525.c index 60fe7032e6..ecb9736f78 100644 --- a/firmware/target/arm/as3525/system-as3525.c +++ b/firmware/target/arm/as3525/system-as3525.c | |||
@@ -209,9 +209,11 @@ static void sdram_init(void) | |||
209 | 209 | ||
210 | MPMC_DYNAMIC_CONTROL = 0x82; /* SDRAM MODE, MPMCCLKOUT runs continuously */ | 210 | MPMC_DYNAMIC_CONTROL = 0x82; /* SDRAM MODE, MPMCCLKOUT runs continuously */ |
211 | 211 | ||
212 | /* this part is required, if you know why please explain */ | 212 | /* program the SDRAM mode register */ |
213 | unsigned int tmp = *(volatile unsigned int*)(0x30000000+0x2300*MEM); | 213 | /* FIXME: details the exact settings of mode register */ |
214 | (void)tmp; /* we just need to read from this location */ | 214 | asm volatile( |
215 | "ldr r4, [%0]\n" | ||
216 | : : "p"(0x30000000+0x2300*MEM) : "r4"); | ||
215 | 217 | ||
216 | MPMC_DYNAMIC_CONTROL = 0x2; /* SDRAM NORMAL, MPMCCLKOUT runs continuously */ | 218 | MPMC_DYNAMIC_CONTROL = 0x2; /* SDRAM NORMAL, MPMCCLKOUT runs continuously */ |
217 | 219 | ||