Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-only
0002 /*
0003  * Old U-boot compatibility for Taishan
0004  *
0005  * Author: Hugh Blemings <hugh@au.ibm.com>
0006  *
0007  * Copyright 2007 Hugh Blemings, IBM Corporation.
0008  *   Based on cuboot-ebony.c which is:
0009  * Copyright 2007 David Gibson, IBM Corporation.
0010  *   Based on cuboot-83xx.c, which is:
0011  * Copyright (c) 2007 Freescale Semiconductor, Inc.
0012  */
0013 
0014 #include "ops.h"
0015 #include "stdio.h"
0016 #include "cuboot.h"
0017 #include "reg.h"
0018 #include "dcr.h"
0019 #include "4xx.h"
0020 
0021 #define TARGET_4xx
0022 #define TARGET_44x
0023 #define TARGET_440GX
0024 #include "ppcboot.h"
0025 
0026 static bd_t bd;
0027 
0028 BSS_STACK(4096);
0029 
0030 static void taishan_fixups(void)
0031 {
0032     /* FIXME: sysclk should be derived by reading the FPGA
0033        registers */
0034     unsigned long sysclk = 33000000;
0035 
0036     ibm440gx_fixup_clocks(sysclk, 6 * 1843200, 25000000);
0037 
0038     ibm4xx_sdram_fixup_memsize();
0039 
0040     dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr);
0041     dt_fixup_mac_address_by_alias("ethernet1", bd.bi_enet1addr);
0042 
0043     ibm4xx_fixup_ebc_ranges("/plb/opb/ebc");
0044 }
0045 
0046 void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
0047            unsigned long r6, unsigned long r7)
0048 {
0049     CUBOOT_INIT();
0050 
0051     platform_ops.fixups = taishan_fixups;
0052     fdt_init(_dtb_start);
0053     serial_console_init();
0054 }