forked from len0rd/rockbox
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
This commit is contained in:
parent
2bb7c422ea
commit
02a53fd809
1 changed files with 5 additions and 3 deletions
|
@ -209,9 +209,11 @@ static void sdram_init(void)
|
|||
|
||||
MPMC_DYNAMIC_CONTROL = 0x82; /* SDRAM MODE, MPMCCLKOUT runs continuously */
|
||||
|
||||
/* this part is required, if you know why please explain */
|
||||
unsigned int tmp = *(volatile unsigned int*)(0x30000000+0x2300*MEM);
|
||||
(void)tmp; /* we just need to read from this location */
|
||||
/* program the SDRAM mode register */
|
||||
/* FIXME: details the exact settings of mode register */
|
||||
asm volatile(
|
||||
"ldr r4, [%0]\n"
|
||||
: : "p"(0x30000000+0x2300*MEM) : "r4");
|
||||
|
||||
MPMC_DYNAMIC_CONTROL = 0x2; /* SDRAM NORMAL, MPMCCLKOUT runs continuously */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue