blob: 332e286591349506c3079165fbd65e9429627a84 [file] [log] [blame]
Thomas Gleixnerd2912cb2019-06-04 10:11:33 +02001// SPDX-License-Identifier: GPL-2.0-only
David Gibsonf6dfc802007-05-08 14:10:01 +10002/*
3 * Old U-boot compatibility for Ebony
4 *
5 * Author: David Gibson <david@gibson.dropbear.id.au>
6 *
7 * Copyright 2007 David Gibson, IBM Corporatio.
8 * Based on cuboot-83xx.c, which is:
9 * Copyright (c) 2007 Freescale Semiconductor, Inc.
David Gibsonf6dfc802007-05-08 14:10:01 +100010 */
11
12#include "ops.h"
13#include "stdio.h"
14#include "44x.h"
15
David Gibsonf6dfc802007-05-08 14:10:01 +100016BSS_STACK(4096);
17
18#define OPENBIOS_MAC_BASE 0xfffffe0c
19#define OPENBIOS_MAC_OFFSET 0xc
20
21void platform_init(void)
22{
23 unsigned long end_of_ram = 0x8000000;
24 unsigned long avail_ram = end_of_ram - (unsigned long)_end;
25
26 simple_alloc_init(_end, avail_ram, 32, 64);
27 ebony_init((u8 *)OPENBIOS_MAC_BASE,
28 (u8 *)(OPENBIOS_MAC_BASE + OPENBIOS_MAC_OFFSET));
29}