aboutsummaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorMarkus Klotzbücher2006-02-22 14:05:44 +0100
committerMarkus Klotzbücher2006-02-22 14:05:44 +0100
commitff3c2a947889a9d60fc1c869565aa88b2e44b37b (patch)
tree6e2a6b6a04f76312393b378fcab5e8a225385e75 /board
parent48b6242aa1a5c8ef5f08abf30ebf9a49e3d95bd7 (diff)
SDRAM now working for delta board, but there are still aliasing problems,
we only see 64MB.
Diffstat (limited to 'board')
-rw-r--r--board/delta/config.mk3
-rw-r--r--board/delta/lowlevel_init.S31
2 files changed, 10 insertions, 24 deletions
diff --git a/board/delta/config.mk b/board/delta/config.mk
index 09b0f715573..4b0fa679eee 100644
--- a/board/delta/config.mk
+++ b/board/delta/config.mk
@@ -1,4 +1,5 @@
#TEXT_BASE = 0x0
#TEXT_BASE = 0xa1700000
#TEXT_BASE = 0xa3080000
-TEXT_BASE = 0xa3008000
+#TEXT_BASE = 0xa3008000
+TEXT_BASE = 0x9ffe0000
diff --git a/board/delta/lowlevel_init.S b/board/delta/lowlevel_init.S
index 35716f245ef..66e75750bdc 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 */