1*4882a593Smuzhiyun // SPDX-License-Identifier: GPL-2.0-only
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun * Old U-boot compatibility for AmigaOne
4*4882a593Smuzhiyun *
5*4882a593Smuzhiyun * Author: Gerhard Pircher (gerhard_pircher@gmx.net)
6*4882a593Smuzhiyun *
7*4882a593Smuzhiyun * Based on cuboot-83xx.c
8*4882a593Smuzhiyun * Copyright (c) 2007 Freescale Semiconductor, Inc.
9*4882a593Smuzhiyun */
10*4882a593Smuzhiyun
11*4882a593Smuzhiyun #include "ops.h"
12*4882a593Smuzhiyun #include "stdio.h"
13*4882a593Smuzhiyun #include "cuboot.h"
14*4882a593Smuzhiyun
15*4882a593Smuzhiyun #include "ppcboot.h"
16*4882a593Smuzhiyun
17*4882a593Smuzhiyun static bd_t bd;
18*4882a593Smuzhiyun
platform_fixups(void)19*4882a593Smuzhiyun static void platform_fixups(void)
20*4882a593Smuzhiyun {
21*4882a593Smuzhiyun dt_fixup_memory(bd.bi_memstart, bd.bi_memsize);
22*4882a593Smuzhiyun dt_fixup_cpu_clocks(bd.bi_intfreq, bd.bi_busfreq / 4, bd.bi_busfreq);
23*4882a593Smuzhiyun }
24*4882a593Smuzhiyun
platform_init(unsigned long r3,unsigned long r4,unsigned long r5,unsigned long r6,unsigned long r7)25*4882a593Smuzhiyun void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
26*4882a593Smuzhiyun unsigned long r6, unsigned long r7)
27*4882a593Smuzhiyun {
28*4882a593Smuzhiyun CUBOOT_INIT();
29*4882a593Smuzhiyun fdt_init(_dtb_start);
30*4882a593Smuzhiyun serial_console_init();
31*4882a593Smuzhiyun platform_ops.fixups = platform_fixups;
32*4882a593Smuzhiyun }
33