diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2007-05-08 00:10:01 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-05-08 00:47:32 -0400 |
commit | f6dfc80554b27da11dbb36ebae166b23ec3aa9ca (patch) | |
tree | 2ca363b4e2d634988c40c9a03106c719b0324ebd /arch/powerpc/boot/cuboot-ebony.c | |
parent | ea20ff5d0338a0fbd78783df657f94ffa7967dd9 (diff) |
[POWERPC] Support for the Ebony 440GP reference board in arch/powerpc
This adds platform support code for the Ebony (440GP) evaluation
board. This includes both code in arch/powerpc/platforms/44x for
board initialization, and zImage wrapper code to correctly tweak the
flattened device tree based on information from the firmware. The
zImage supports both IBM OpenBIOS (aka "treeboot") and old versions of
uboot which don't support a flattened device tree.
Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/boot/cuboot-ebony.c')
-rw-r--r-- | arch/powerpc/boot/cuboot-ebony.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/arch/powerpc/boot/cuboot-ebony.c b/arch/powerpc/boot/cuboot-ebony.c new file mode 100644 index 000000000000..4464c5f67acb --- /dev/null +++ b/arch/powerpc/boot/cuboot-ebony.c | |||
@@ -0,0 +1,42 @@ | |||
1 | /* | ||
2 | * Old U-boot compatibility for Ebony | ||
3 | * | ||
4 | * Author: David Gibson <david@gibson.dropbear.id.au> | ||
5 | * | ||
6 | * Copyright 2007 David Gibson, IBM Corporatio. | ||
7 | * Based on cuboot-83xx.c, which is: | ||
8 | * Copyright (c) 2007 Freescale Semiconductor, Inc. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify it | ||
11 | * under the terms of the GNU General Public License version 2 as published | ||
12 | * by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #include "ops.h" | ||
16 | #include "stdio.h" | ||
17 | #include "44x.h" | ||
18 | |||
19 | #define TARGET_44x | ||
20 | #include "ppcboot.h" | ||
21 | |||
22 | static bd_t bd; | ||
23 | extern char _end[]; | ||
24 | |||
25 | BSS_STACK(4096); | ||
26 | |||
27 | void platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | ||
28 | unsigned long r6, unsigned long r7) | ||
29 | { | ||
30 | unsigned long end_of_ram = bd.bi_memstart + bd.bi_memsize; | ||
31 | unsigned long avail_ram = end_of_ram - (unsigned long)_end; | ||
32 | |||
33 | memcpy(&bd, (bd_t *)r3, sizeof(bd)); | ||
34 | loader_info.initrd_addr = r4; | ||
35 | loader_info.initrd_size = r4 ? r5 : 0; | ||
36 | loader_info.cmdline = (char *)r6; | ||
37 | loader_info.cmdline_len = r7 - r6; | ||
38 | |||
39 | simple_alloc_init(_end, avail_ram, 32, 64); | ||
40 | |||
41 | ebony_init(&bd.bi_enetaddr, &bd.bi_enet1addr); | ||
42 | } | ||