Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-only
0002 /*
0003  * Old U-boot compatibility for Sam440ep based off bamboo.c code
0004  * original copyrights below
0005  *
0006  * Author: Josh Boyer <jwboyer@linux.vnet.ibm.com>
0007  *
0008  * Copyright 2007 IBM Corporation
0009  *
0010  * Based on cuboot-ebony.c
0011  *
0012  * Modified from cuboot-bamboo.c for sam440ep:
0013  * Copyright 2008 Giuseppe Coviello <gicoviello@gmail.com>
0014  */
0015 
0016 #include "ops.h"
0017 #include "stdio.h"
0018 #include "44x.h"
0019 #include "4xx.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 static void sam440ep_fixups(void)
0029 {
0030        unsigned long sysclk = 66666666;
0031 
0032        ibm440ep_fixup_clocks(sysclk, 11059200, 25000000);
0033        ibm4xx_sdram_fixup_memsize();
0034        ibm4xx_quiesce_eth((u32 *)0xef600e00, (u32 *)0xef600f00);
0035        dt_fixup_mac_addresses(&bd.bi_enetaddr, &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 = sam440ep_fixups;
0043     platform_ops.exit = ibm44x_dbcr_reset;
0044     fdt_init(_dtb_start);
0045     serial_console_init();
0046 }