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
22static bd_t bd;
23extern char _end[];
24
25BSS_STACK(4096);
26
27void 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}
43