xref: /openbmc/linux/arch/powerpc/boot/cuboot-amigaone.c (revision 75bf465f0bc33e9b776a46d6a1b9b990f5fb7c37)
1*d2912cb1SThomas Gleixner // SPDX-License-Identifier: GPL-2.0-only
28f23735dSGerhard Pircher /*
38f23735dSGerhard Pircher  * Old U-boot compatibility for AmigaOne
48f23735dSGerhard Pircher  *
58f23735dSGerhard Pircher  * Author: Gerhard Pircher (gerhard_pircher@gmx.net)
68f23735dSGerhard Pircher  *
78f23735dSGerhard Pircher  *   Based on cuboot-83xx.c
88f23735dSGerhard Pircher  * Copyright (c) 2007 Freescale Semiconductor, Inc.
98f23735dSGerhard Pircher  */
108f23735dSGerhard Pircher 
118f23735dSGerhard Pircher #include "ops.h"
128f23735dSGerhard Pircher #include "stdio.h"
138f23735dSGerhard Pircher #include "cuboot.h"
148f23735dSGerhard Pircher 
158f23735dSGerhard Pircher #include "ppcboot.h"
168f23735dSGerhard Pircher 
178f23735dSGerhard Pircher static bd_t bd;
188f23735dSGerhard Pircher 
platform_fixups(void)198f23735dSGerhard Pircher static void platform_fixups(void)
208f23735dSGerhard Pircher {
218f23735dSGerhard Pircher 	dt_fixup_memory(bd.bi_memstart, bd.bi_memsize);
228f23735dSGerhard Pircher 	dt_fixup_cpu_clocks(bd.bi_intfreq, bd.bi_busfreq / 4, bd.bi_busfreq);
238f23735dSGerhard Pircher }
248f23735dSGerhard Pircher 
platform_init(unsigned long r3,unsigned long r4,unsigned long r5,unsigned long r6,unsigned long r7)258f23735dSGerhard Pircher void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
268f23735dSGerhard Pircher                    unsigned long r6, unsigned long r7)
278f23735dSGerhard Pircher {
288f23735dSGerhard Pircher 	CUBOOT_INIT();
298f23735dSGerhard Pircher 	fdt_init(_dtb_start);
308f23735dSGerhard Pircher 	serial_console_init();
318f23735dSGerhard Pircher 	platform_ops.fixups = platform_fixups;
328f23735dSGerhard Pircher }
33