diff options
author | Matt Porter <mporter@kernel.crashing.org> | 2005-10-28 20:46:14 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-10-28 23:55:39 -0400 |
commit | d5f7b06b036afc2cb250decb2c76b7f82c5de639 (patch) | |
tree | a4c67d17b5ee7ba23490977bbe74c42201e1d54d /arch/ppc/syslib/ibm44x_common.c | |
parent | de957c89b7dadb3147e885d7b6eb9db73d0eea57 (diff) |
[PATCH] ppc32: Cleanup AMCC PPC44x eval board U-Boot support
Cleanup PPC440 eval boards (bamboo, ebony, luan and ocotea) to better
support U-Boot as bootloader.
Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Matt Porter <mporter@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/ppc/syslib/ibm44x_common.c')
-rw-r--r-- | arch/ppc/syslib/ibm44x_common.c | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/arch/ppc/syslib/ibm44x_common.c b/arch/ppc/syslib/ibm44x_common.c index 95e11f93c15d..5152c8e41340 100644 --- a/arch/ppc/syslib/ibm44x_common.c +++ b/arch/ppc/syslib/ibm44x_common.c | |||
@@ -27,9 +27,14 @@ | |||
27 | #include <asm/time.h> | 27 | #include <asm/time.h> |
28 | #include <asm/ppc4xx_pic.h> | 28 | #include <asm/ppc4xx_pic.h> |
29 | #include <asm/param.h> | 29 | #include <asm/param.h> |
30 | #include <asm/bootinfo.h> | ||
31 | #include <asm/ppcboot.h> | ||
30 | 32 | ||
31 | #include <syslib/gen550.h> | 33 | #include <syslib/gen550.h> |
32 | 34 | ||
35 | /* Global Variables */ | ||
36 | bd_t __res; | ||
37 | |||
33 | phys_addr_t fixup_bigphys_addr(phys_addr_t addr, phys_addr_t size) | 38 | phys_addr_t fixup_bigphys_addr(phys_addr_t addr, phys_addr_t size) |
34 | { | 39 | { |
35 | phys_addr_t page_4gb = 0; | 40 | phys_addr_t page_4gb = 0; |
@@ -150,8 +155,36 @@ static unsigned long __init ibm44x_find_end_of_memory(void) | |||
150 | return mem_size; | 155 | return mem_size; |
151 | } | 156 | } |
152 | 157 | ||
153 | void __init ibm44x_platform_init(void) | 158 | void __init ibm44x_platform_init(unsigned long r3, unsigned long r4, unsigned long r5, |
159 | unsigned long r6, unsigned long r7) | ||
154 | { | 160 | { |
161 | parse_bootinfo(find_bootinfo()); | ||
162 | |||
163 | /* | ||
164 | * If we were passed in a board information, copy it into the | ||
165 | * residual data area. | ||
166 | */ | ||
167 | if (r3) | ||
168 | __res = *(bd_t *)(r3 + KERNELBASE); | ||
169 | |||
170 | #if defined(CONFIG_BLK_DEV_INITRD) | ||
171 | /* | ||
172 | * If the init RAM disk has been configured in, and there's a valid | ||
173 | * starting address for it, set it up. | ||
174 | */ | ||
175 | if (r4) { | ||
176 | initrd_start = r4 + KERNELBASE; | ||
177 | initrd_end = r5 + KERNELBASE; | ||
178 | } | ||
179 | #endif /* CONFIG_BLK_DEV_INITRD */ | ||
180 | |||
181 | /* Copy the kernel command line arguments to a safe place. */ | ||
182 | |||
183 | if (r6) { | ||
184 | *(char *) (r7 + KERNELBASE) = 0; | ||
185 | strcpy(cmd_line, (char *) (r6 + KERNELBASE)); | ||
186 | } | ||
187 | |||
155 | ppc_md.init_IRQ = ppc4xx_pic_init; | 188 | ppc_md.init_IRQ = ppc4xx_pic_init; |
156 | ppc_md.find_end_of_memory = ibm44x_find_end_of_memory; | 189 | ppc_md.find_end_of_memory = ibm44x_find_end_of_memory; |
157 | ppc_md.restart = ibm44x_restart; | 190 | ppc_md.restart = ibm44x_restart; |