1*4882a593Smuzhiyun // SPDX-License-Identifier: GPL-2.0-only
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun * Old U-boot compatibility for Yosemite
4*4882a593Smuzhiyun *
5*4882a593Smuzhiyun * Author: Josh Boyer <jwboyer@linux.vnet.ibm.com>
6*4882a593Smuzhiyun *
7*4882a593Smuzhiyun * Copyright 2008 IBM Corporation
8*4882a593Smuzhiyun */
9*4882a593Smuzhiyun
10*4882a593Smuzhiyun #include "ops.h"
11*4882a593Smuzhiyun #include "stdio.h"
12*4882a593Smuzhiyun #include "4xx.h"
13*4882a593Smuzhiyun #include "44x.h"
14*4882a593Smuzhiyun #include "cuboot.h"
15*4882a593Smuzhiyun
16*4882a593Smuzhiyun #define TARGET_4xx
17*4882a593Smuzhiyun #define TARGET_44x
18*4882a593Smuzhiyun #include "ppcboot.h"
19*4882a593Smuzhiyun
20*4882a593Smuzhiyun static bd_t bd;
21*4882a593Smuzhiyun
yosemite_fixups(void)22*4882a593Smuzhiyun static void yosemite_fixups(void)
23*4882a593Smuzhiyun {
24*4882a593Smuzhiyun unsigned long sysclk = 66666666;
25*4882a593Smuzhiyun
26*4882a593Smuzhiyun ibm440ep_fixup_clocks(sysclk, 11059200, 50000000);
27*4882a593Smuzhiyun ibm4xx_sdram_fixup_memsize();
28*4882a593Smuzhiyun ibm4xx_quiesce_eth((u32 *)0xef600e00, (u32 *)0xef600f00);
29*4882a593Smuzhiyun dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr);
30*4882a593Smuzhiyun dt_fixup_mac_address_by_alias("ethernet1", bd.bi_enet1addr);
31*4882a593Smuzhiyun }
32*4882a593Smuzhiyun
platform_init(unsigned long r3,unsigned long r4,unsigned long r5,unsigned long r6,unsigned long r7)33*4882a593Smuzhiyun void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
34*4882a593Smuzhiyun unsigned long r6, unsigned long r7)
35*4882a593Smuzhiyun {
36*4882a593Smuzhiyun CUBOOT_INIT();
37*4882a593Smuzhiyun platform_ops.fixups = yosemite_fixups;
38*4882a593Smuzhiyun platform_ops.exit = ibm44x_dbcr_reset;
39*4882a593Smuzhiyun fdt_init(_dtb_start);
40*4882a593Smuzhiyun serial_console_init();
41*4882a593Smuzhiyun }
42