diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2007-05-08 14:10:01 +1000 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-05-08 14:47:32 +1000 |
commit | f6dfc80554b27da11dbb36ebae166b23ec3aa9ca (patch) | |
tree | 2ca363b4e2d634988c40c9a03106c719b0324ebd /arch/powerpc/boot/cuboot-ebony.c | |
parent | ea20ff5d0338a0fbd78783df657f94ffa7967dd9 (diff) | |
download | op-kernel-dev-f6dfc80554b27da11dbb36ebae166b23ec3aa9ca.zip op-kernel-dev-f6dfc80554b27da11dbb36ebae166b23ec3aa9ca.tar.gz |
[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 0000000..4464c5f --- /dev/null +++ b/arch/powerpc/boot/cuboot-ebony.c @@ -0,0 +1,42 @@ +/* + * Old U-boot compatibility for Ebony + * + * Author: David Gibson <david@gibson.dropbear.id.au> + * + * Copyright 2007 David Gibson, IBM Corporatio. + * Based on cuboot-83xx.c, which is: + * Copyright (c) 2007 Freescale Semiconductor, Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software Foundation. + */ + +#include "ops.h" +#include "stdio.h" +#include "44x.h" + +#define TARGET_44x +#include "ppcboot.h" + +static bd_t bd; +extern char _end[]; + +BSS_STACK(4096); + +void platform_init(unsigned long r3, unsigned long r4, unsigned long r5, + unsigned long r6, unsigned long r7) +{ + unsigned long end_of_ram = bd.bi_memstart + bd.bi_memsize; + unsigned long avail_ram = end_of_ram - (unsigned long)_end; + + memcpy(&bd, (bd_t *)r3, sizeof(bd)); + loader_info.initrd_addr = r4; + loader_info.initrd_size = r4 ? r5 : 0; + loader_info.cmdline = (char *)r6; + loader_info.cmdline_len = r7 - r6; + + simple_alloc_init(_end, avail_ram, 32, 64); + + ebony_init(&bd.bi_enetaddr, &bd.bi_enet1addr); +} |