Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-or-later
0002 /*
0003  * Copyright (C) 2007 Freescale Semiconductor, Inc. All rights reserved.
0004  *
0005  * Author: Roy Zang <tie-fei.zang@freescale.com>
0006  *
0007  * Description:
0008  * Old U-boot compatibility for mpc7448hpc2 board
0009  * Based on the code of Scott Wood <scottwood@freescale.com>
0010  * for 83xx and 85xx.
0011  */
0012 
0013 #include "ops.h"
0014 #include "stdio.h"
0015 #include "cuboot.h"
0016 
0017 #define TARGET_HAS_ETH1
0018 #include "ppcboot.h"
0019 
0020 static bd_t bd;
0021 extern char _dtb_start[], _dtb_end[];
0022 
0023 static void platform_fixups(void)
0024 {
0025     void *tsi;
0026 
0027     dt_fixup_memory(bd.bi_memstart, bd.bi_memsize);
0028     dt_fixup_mac_addresses(bd.bi_enetaddr, bd.bi_enet1addr);
0029     dt_fixup_cpu_clocks(bd.bi_intfreq, bd.bi_busfreq / 4, bd.bi_busfreq);
0030     tsi = find_node_by_devtype(NULL, "tsi-bridge");
0031     if (tsi)
0032         setprop(tsi, "bus-frequency", &bd.bi_busfreq,
0033             sizeof(bd.bi_busfreq));
0034 }
0035 
0036 void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
0037         unsigned long r6, unsigned long r7)
0038 {
0039     CUBOOT_INIT();
0040     fdt_init(_dtb_start);
0041     serial_console_init();
0042     platform_ops.fixups = platform_fixups;
0043 }