xref: /linux/arch/powerpc/boot/treeboot-ebony.c (revision 75bf465f0bc33e9b776a46d6a1b9b990f5fb7c37)
1*d2912cb1SThomas Gleixner // SPDX-License-Identifier: GPL-2.0-only
2f6dfc805SDavid Gibson /*
3f6dfc805SDavid Gibson  * Old U-boot compatibility for Ebony
4f6dfc805SDavid Gibson  *
5f6dfc805SDavid Gibson  * Author: David Gibson <david@gibson.dropbear.id.au>
6f6dfc805SDavid Gibson  *
7f6dfc805SDavid Gibson  * Copyright 2007 David Gibson, IBM Corporatio.
8f6dfc805SDavid Gibson  *   Based on cuboot-83xx.c, which is:
9f6dfc805SDavid Gibson  * Copyright (c) 2007 Freescale Semiconductor, Inc.
10f6dfc805SDavid Gibson  */
11f6dfc805SDavid Gibson 
12f6dfc805SDavid Gibson #include "ops.h"
13f6dfc805SDavid Gibson #include "stdio.h"
14f6dfc805SDavid Gibson #include "44x.h"
15f6dfc805SDavid Gibson 
16f6dfc805SDavid Gibson BSS_STACK(4096);
17f6dfc805SDavid Gibson 
18f6dfc805SDavid Gibson #define OPENBIOS_MAC_BASE	0xfffffe0c
19f6dfc805SDavid Gibson #define OPENBIOS_MAC_OFFSET	0xc
20f6dfc805SDavid Gibson 
platform_init(void)21f6dfc805SDavid Gibson void platform_init(void)
22f6dfc805SDavid Gibson {
23f6dfc805SDavid Gibson 	unsigned long end_of_ram = 0x8000000;
24f6dfc805SDavid Gibson 	unsigned long avail_ram = end_of_ram - (unsigned long)_end;
25f6dfc805SDavid Gibson 
26f6dfc805SDavid Gibson 	simple_alloc_init(_end, avail_ram, 32, 64);
27f6dfc805SDavid Gibson 	ebony_init((u8 *)OPENBIOS_MAC_BASE,
28f6dfc805SDavid Gibson 		   (u8 *)(OPENBIOS_MAC_BASE + OPENBIOS_MAC_OFFSET));
29f6dfc805SDavid Gibson }
30