xref: /linux/arch/powerpc/boot/gamecube.c (revision 75bf465f0bc33e9b776a46d6a1b9b990f5fb7c37)
1*2874c5fdSThomas Gleixner // SPDX-License-Identifier: GPL-2.0-or-later
2b68a24bcSAlbert Herranz /*
3b68a24bcSAlbert Herranz  * arch/powerpc/boot/gamecube.c
4b68a24bcSAlbert Herranz  *
5b68a24bcSAlbert Herranz  * Nintendo GameCube bootwrapper support
6b68a24bcSAlbert Herranz  * Copyright (C) 2004-2009 The GameCube Linux Team
7b68a24bcSAlbert Herranz  * Copyright (C) 2008,2009 Albert Herranz
8b68a24bcSAlbert Herranz  */
9b68a24bcSAlbert Herranz 
10b68a24bcSAlbert Herranz #include <stddef.h>
11b68a24bcSAlbert Herranz #include "stdio.h"
12b68a24bcSAlbert Herranz #include "types.h"
13b68a24bcSAlbert Herranz #include "io.h"
14b68a24bcSAlbert Herranz #include "ops.h"
15b68a24bcSAlbert Herranz 
16b68a24bcSAlbert Herranz #include "ugecon.h"
17b68a24bcSAlbert Herranz 
18b68a24bcSAlbert Herranz BSS_STACK(8192);
19b68a24bcSAlbert Herranz 
platform_init(unsigned long r3,unsigned long r4,unsigned long r5)20b68a24bcSAlbert Herranz void platform_init(unsigned long r3, unsigned long r4, unsigned long r5)
21b68a24bcSAlbert Herranz {
22b68a24bcSAlbert Herranz 	u32 heapsize = 16*1024*1024 - (u32)_end;
23b68a24bcSAlbert Herranz 
24b68a24bcSAlbert Herranz 	simple_alloc_init(_end, heapsize, 32, 64);
25b68a24bcSAlbert Herranz 	fdt_init(_dtb_start);
26b68a24bcSAlbert Herranz 
27b68a24bcSAlbert Herranz 	if (ug_probe())
28b68a24bcSAlbert Herranz 		console_ops.write = ug_console_write;
29b68a24bcSAlbert Herranz }
30b68a24bcSAlbert Herranz 
31