Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-only
0002 /*
0003  * Old U-boot compatibility for PPC405EX. This image is already included
0004  * a dtb.
0005  *
0006  * Author: Tiejun Chen <tiejun.chen@windriver.com>
0007  *
0008  * Copyright (C) 2009 Wind River Systems, Inc.
0009  */
0010 
0011 #include "ops.h"
0012 #include "io.h"
0013 #include "dcr.h"
0014 #include "stdio.h"
0015 #include "4xx.h"
0016 #include "44x.h"
0017 #include "cuboot.h"
0018 
0019 #define TARGET_4xx
0020 #define TARGET_44x
0021 #include "ppcboot.h"
0022 
0023 #define KILAUEA_SYS_EXT_SERIAL_CLOCK     11059200        /* ext. 11.059MHz clk */
0024 
0025 static bd_t bd;
0026 
0027 static void kilauea_fixups(void)
0028 {
0029     unsigned long sysclk = 33333333;
0030 
0031     ibm405ex_fixup_clocks(sysclk, KILAUEA_SYS_EXT_SERIAL_CLOCK);
0032     dt_fixup_memory(bd.bi_memstart, bd.bi_memsize);
0033     ibm4xx_fixup_ebc_ranges("/plb/opb/ebc");
0034     dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr);
0035     dt_fixup_mac_address_by_alias("ethernet1", bd.bi_enet1addr);
0036 }
0037 
0038 void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
0039         unsigned long r6, unsigned long r7)
0040 {
0041     CUBOOT_INIT();
0042     platform_ops.fixups = kilauea_fixups;
0043     platform_ops.exit = ibm40x_dbcr_reset;
0044     fdt_init(_dtb_start);
0045     serial_console_init();
0046 }