Path: blob/master/arch/powerpc/boot/cuboot-taishan.c
10818 views
/*1* Old U-boot compatibility for Taishan2*3* Author: Hugh Blemings <[email protected]>4*5* Copyright 2007 Hugh Blemings, IBM Corporation.6* Based on cuboot-ebony.c which is:7* Copyright 2007 David Gibson, IBM Corporation.8* Based on cuboot-83xx.c, which is:9* Copyright (c) 2007 Freescale Semiconductor, Inc.10*11* This program is free software; you can redistribute it and/or modify it12* under the terms of the GNU General Public License version 2 as published13* by the Free Software Foundation.14*/1516#include "ops.h"17#include "stdio.h"18#include "cuboot.h"19#include "reg.h"20#include "dcr.h"21#include "4xx.h"2223#define TARGET_4xx24#define TARGET_44x25#define TARGET_440GX26#include "ppcboot.h"2728static bd_t bd;2930BSS_STACK(4096);3132static void taishan_fixups(void)33{34/* FIXME: sysclk should be derived by reading the FPGA35registers */36unsigned long sysclk = 33000000;3738ibm440gx_fixup_clocks(sysclk, 6 * 1843200, 25000000);3940ibm4xx_sdram_fixup_memsize();4142dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr);43dt_fixup_mac_address_by_alias("ethernet1", bd.bi_enet1addr);4445ibm4xx_fixup_ebc_ranges("/plb/opb/ebc");46}4748void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,49unsigned long r6, unsigned long r7)50{51CUBOOT_INIT();5253platform_ops.fixups = taishan_fixups;54fdt_init(_dtb_start);55serial_console_init();56}575859