Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-only
0002 /*
0003  * Old U-boot compatibility for Katmai
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 "reg.h"
0017 #include "dcr.h"
0018 #include "4xx.h"
0019 #include "44x.h"
0020 #include "cuboot.h"
0021 
0022 #define TARGET_4xx
0023 #define TARGET_44x
0024 #include "ppcboot.h"
0025 
0026 static bd_t bd;
0027 
0028 BSS_STACK(4096);
0029 
0030 static void katmai_fixups(void)
0031 {
0032     unsigned long sysclk = 33333000;
0033 
0034     /* 440SP Clock logic is all but identical to 440GX
0035      * so we just use that code for now at least
0036      */
0037     ibm440spe_fixup_clocks(sysclk, 6 * 1843200, 0);
0038 
0039     ibm440spe_fixup_memsize();
0040 
0041     dt_fixup_mac_address(0, bd.bi_enetaddr);
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 = katmai_fixups;
0052     fdt_init(_dtb_start);
0053     serial_console_init();
0054 }