diff options
author | Greg Ungerer <gerg@snapgear.com> | 2005-09-01 20:42:52 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@evo.osdl.org> | 2005-09-02 03:57:29 -0400 |
commit | 029fc1375fcf687a83faf7521358a9f5c589da13 (patch) | |
tree | 2dd027f39fbbc4359c5f26233219faed1e8e62ac | |
parent | e6070a1712e69779f322239056fb5f1e1db802ce (diff) |
[PATCH] m68knommu: fix ColdFire startup code to properly handle non 0 based ram
Correctly determine the end of ram for ram setups that do not
start at base address of 0. Add support for the MOD5272 board,
which doesn not have a ram base of 0.
Signed-off-by: Greg Ungerer <gerg@uclinux.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | arch/m68knommu/platform/5307/head.S | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/arch/m68knommu/platform/5307/head.S b/arch/m68knommu/platform/5307/head.S index c7d7a395c4cc..7f4ba837901f 100644 --- a/arch/m68knommu/platform/5307/head.S +++ b/arch/m68knommu/platform/5307/head.S | |||
@@ -39,14 +39,18 @@ | |||
39 | * Memory size exceptions for special cases. Some boards may be set | 39 | * Memory size exceptions for special cases. Some boards may be set |
40 | * for auto memory sizing, but we can't do it that way for some reason. | 40 | * for auto memory sizing, but we can't do it that way for some reason. |
41 | * For example the 5206eLITE board has static RAM, and auto-detecting | 41 | * For example the 5206eLITE board has static RAM, and auto-detecting |
42 | * the SDRAM will do you no good at all. | 42 | * the SDRAM will do you no good at all. Same goes for the MOD5272. |
43 | */ | 43 | */ |
44 | #ifdef CONFIG_RAMAUTO | 44 | #ifdef CONFIG_RAMAUTO |
45 | #if defined(CONFIG_M5206eLITE) | 45 | #if defined(CONFIG_M5206eLITE) |
46 | #define MEM_SIZE 0x00100000 /* 1MiB default memory */ | 46 | #define MEM_SIZE 0x00100000 /* 1MiB default memory */ |
47 | #endif | ||
48 | #if defined(CONFIG_MOD5272) | ||
49 | #define MEM_SIZE 0x00800000 /* 8MiB default memory */ | ||
47 | #endif | 50 | #endif |
48 | #endif /* CONFIG_RAMAUTO */ | 51 | #endif /* CONFIG_RAMAUTO */ |
49 | 52 | ||
53 | |||
50 | /* | 54 | /* |
51 | * If we don't have a fixed memory size now, then lets build in code | 55 | * If we don't have a fixed memory size now, then lets build in code |
52 | * to auto detect the DRAM size. Obviously this is the prefered | 56 | * to auto detect the DRAM size. Obviously this is the prefered |
@@ -100,11 +104,15 @@ | |||
100 | 104 | ||
101 | /* | 105 | /* |
102 | * Most ColdFire boards have their DRAM starting at address 0. | 106 | * Most ColdFire boards have their DRAM starting at address 0. |
103 | * Notable exception is the 5206eLITE board. | 107 | * Notable exception is the 5206eLITE board, another is the MOD5272. |
104 | */ | 108 | */ |
105 | #if defined(CONFIG_M5206eLITE) | 109 | #if defined(CONFIG_M5206eLITE) |
106 | #define MEM_BASE 0x30000000 | 110 | #define MEM_BASE 0x30000000 |
107 | #endif | 111 | #endif |
112 | #if defined(CONFIG_MOD5272) | ||
113 | #define MEM_BASE 0x02000000 | ||
114 | #define VBR_BASE 0x20000000 /* vectors in SRAM */ | ||
115 | #endif | ||
108 | 116 | ||
109 | #ifndef MEM_BASE | 117 | #ifndef MEM_BASE |
110 | #define MEM_BASE 0x00000000 /* memory base at address 0 */ | 118 | #define MEM_BASE 0x00000000 /* memory base at address 0 */ |
@@ -188,6 +196,7 @@ _start: | |||
188 | movel %a7,_rambase | 196 | movel %a7,_rambase |
189 | 197 | ||
190 | GET_MEM_SIZE /* macro code determines size */ | 198 | GET_MEM_SIZE /* macro code determines size */ |
199 | addl %a7,%d0 | ||
191 | movel %d0,_ramend /* set end ram addr */ | 200 | movel %d0,_ramend /* set end ram addr */ |
192 | 201 | ||
193 | /* | 202 | /* |