Path: blob/master/arch/powerpc/boot/cuboot-kilauea.c
10817 views
/*1* Old U-boot compatibility for PPC405EX. This image is already included2* a dtb.3*4* Author: Tiejun Chen <[email protected]>5*6* Copyright (C) 2009 Wind River Systems, Inc.7*8* This program is free software; you can redistribute it and/or modify it9* under the terms of the GNU General Public License version 2 as published10* by the Free Software Foundation.11*/1213#include "ops.h"14#include "io.h"15#include "dcr.h"16#include "stdio.h"17#include "4xx.h"18#include "44x.h"19#include "cuboot.h"2021#define TARGET_4xx22#define TARGET_44x23#include "ppcboot.h"2425#define KILAUEA_SYS_EXT_SERIAL_CLOCK 11059200 /* ext. 11.059MHz clk */2627static bd_t bd;2829static void kilauea_fixups(void)30{31unsigned long sysclk = 33333333;3233ibm405ex_fixup_clocks(sysclk, KILAUEA_SYS_EXT_SERIAL_CLOCK);34dt_fixup_memory(bd.bi_memstart, bd.bi_memsize);35ibm4xx_fixup_ebc_ranges("/plb/opb/ebc");36dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr);37dt_fixup_mac_address_by_alias("ethernet1", bd.bi_enet1addr);38}3940void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,41unsigned long r6, unsigned long r7)42{43CUBOOT_INIT();44platform_ops.fixups = kilauea_fixups;45platform_ops.exit = ibm40x_dbcr_reset;46fdt_init(_dtb_start);47serial_console_init();48}495051