diff options
author | Markus Klotzbücher <Markus Klotzbümk@pollux.(none)> | 2006-02-22 14:05:44 +0100 |
---|---|---|
committer | Markus Klotzbücher <mk@pollux.(none)> | 2006-02-22 14:05:44 +0100 |
commit | ff3c2a947889a9d60fc1c869565aa88b2e44b37b (patch) | |
tree | 6e2a6b6a04f76312393b378fcab5e8a225385e75 /board/delta/lowlevel_init.S | |
parent | 48b6242aa1a5c8ef5f08abf30ebf9a49e3d95bd7 (diff) |
SDRAM now working for delta board, but there are still aliasing problems,
we only see 64MB.
Diffstat (limited to 'board/delta/lowlevel_init.S')
-rw-r--r-- | board/delta/lowlevel_init.S | 31 |
1 files changed, 8 insertions, 23 deletions
diff --git a/board/delta/lowlevel_init.S b/board/delta/lowlevel_init.S index 35716f245e..66e75750bd 100644 --- a/board/delta/lowlevel_init.S +++ b/board/delta/lowlevel_init.S @@ -49,20 +49,6 @@ DRAM_SIZE: .long CFG_DRAM_SIZE bls 0b .endm - -#define SDRAM_CMD_NOP 0x40000000 - -.macro do_nop_cmd num - ldr r2, =MDMRS - ldr r3, =SDRAM_CMD_NOP - ldr r4, =0x0 -loop: - str r3, [r2] - add r4, r4, #1 - cmp r4, \num - bls loop -.endm - /* * Memory setup */ @@ -96,7 +82,7 @@ lowlevel_init: /* clocks to settle. Only necessary after hard reset... */ /* FIXME: can be optimized later */ /* ---------------------------------------------------------------- */ - wait #300 +; wait #300 mem_init: @@ -138,7 +124,7 @@ mem_init: /* Set MDMRS */ ldr r0, =MDMRS - ldr r1, =0x60000023 + ldr r1, =0x60000033 str r1, [r0] wait #300 @@ -269,13 +255,11 @@ mem_init: #endif /* NEW_SDRAM_INIT */ +#ifndef CFG_SKIP_DRAM_SCRUB /* scrub/init SDRAM if enabled/present */ -/* ldr r11, =0xa0000000 /\* base address of SDRAM (CFG_DRAM_BASE) *\/ */ -/* ldr r12, =0x04000000 /\* size of memory to scrub (CFG_DRAM_SIZE) *\/ */ -/* mov r8,r12 /\* save DRAM size (mk: why???) *\/ */ - ldr r8, =0xa0000000 /* base address of SDRAM (CFG_DRAM_BASE) */ - ldr r9, =0x04000000 /* size of memory to scrub (CFG_DRAM_SIZE) */ - mov r0, #0 /* scrub with 0x0000:0000 */ + ldr r8, =CFG_DRAM_BASE /* base address of SDRAM (CFG_DRAM_BASE) */ + ldr r9, =CFG_DRAM_SIZE /* size of memory to scrub (CFG_DRAM_SIZE) */ + mov r0, #0 /* scrub with 0x0000:0000 */ mov r1, #0 mov r2, #0 mov r3, #0 @@ -284,10 +268,11 @@ mem_init: mov r6, #0 mov r7, #0 10: /* fastScrubLoop */ - subs r9, r9, #32 // 32 bytes/line + subs r9, r9, #32 /* 8 words/line */ stmia r8!, {r0-r7} beq 15f b 10b +#endif /* CFG_SKIP_DRAM_SCRUB */ 15: /* Mask all interrupts */ |