xref: /openbmc/linux/arch/powerpc/boot/cuboot-warp.c (revision 75bf465f0bc33e9b776a46d6a1b9b990f5fb7c37)
1*d2912cb1SThomas Gleixner // SPDX-License-Identifier: GPL-2.0-only
21e12f3c5SSean MacLennan /*
31e12f3c5SSean MacLennan  * Copyright (c) 2008 PIKA Technologies
41e12f3c5SSean MacLennan  *   Sean MacLennan <smaclennan@pikatech.com>
51e12f3c5SSean MacLennan  */
61e12f3c5SSean MacLennan 
71e12f3c5SSean MacLennan #include "ops.h"
81e12f3c5SSean MacLennan #include "4xx.h"
91e12f3c5SSean MacLennan #include "cuboot.h"
104ebef31fSSean MacLennan #include "stdio.h"
111e12f3c5SSean MacLennan 
12fe57e8beSJosh Boyer #define TARGET_4xx
131e12f3c5SSean MacLennan #define TARGET_44x
141e12f3c5SSean MacLennan #include "ppcboot.h"
151e12f3c5SSean MacLennan 
161e12f3c5SSean MacLennan static bd_t bd;
171e12f3c5SSean MacLennan 
warp_fixups(void)181e12f3c5SSean MacLennan static void warp_fixups(void)
191e12f3c5SSean MacLennan {
204ebef31fSSean MacLennan 	ibm440ep_fixup_clocks(66000000, 11059200, 50000000);
211e12f3c5SSean MacLennan 	ibm4xx_sdram_fixup_memsize();
221e12f3c5SSean MacLennan 	ibm4xx_fixup_ebc_ranges("/plb/opb/ebc");
23ecc6cd73SDavid Gibson 	dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr);
244ebef31fSSean MacLennan }
254ebef31fSSean MacLennan 
platform_init(unsigned long r3,unsigned long r4,unsigned long r5,unsigned long r6,unsigned long r7)261e12f3c5SSean MacLennan void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
271e12f3c5SSean MacLennan 		   unsigned long r6, unsigned long r7)
281e12f3c5SSean MacLennan {
291e12f3c5SSean MacLennan 	CUBOOT_INIT();
301e12f3c5SSean MacLennan 
311e12f3c5SSean MacLennan 	platform_ops.fixups = warp_fixups;
321e12f3c5SSean MacLennan 	platform_ops.exit = ibm44x_dbcr_reset;
331e12f3c5SSean MacLennan 	fdt_init(_dtb_start);
341e12f3c5SSean MacLennan 	serial_console_init();
351e12f3c5SSean MacLennan }
36