Path: blob/master/arch/powerpc/boot/cuboot-mpc7448hpc2.c
10817 views
/*1* Copyright (C) 2007 Freescale Semiconductor, Inc. All rights reserved.2*3* Author: Roy Zang <[email protected]>4*5* Description:6* Old U-boot compatibility for mpc7448hpc2 board7* Based on the code of Scott Wood <[email protected]>8* for 83xx and 85xx.9*10* This is free software; you can redistribute it and/or modify11* it under the terms of the GNU General Public License as published by12* the Free Software Foundation; either version 2 of the License, or13* (at your option) any later version.14*15*/1617#include "ops.h"18#include "stdio.h"19#include "cuboot.h"2021#define TARGET_HAS_ETH122#include "ppcboot.h"2324static bd_t bd;25extern char _dtb_start[], _dtb_end[];2627static void platform_fixups(void)28{29void *tsi;3031dt_fixup_memory(bd.bi_memstart, bd.bi_memsize);32dt_fixup_mac_addresses(bd.bi_enetaddr, bd.bi_enet1addr);33dt_fixup_cpu_clocks(bd.bi_intfreq, bd.bi_busfreq / 4, bd.bi_busfreq);34tsi = find_node_by_devtype(NULL, "tsi-bridge");35if (tsi)36setprop(tsi, "bus-frequency", &bd.bi_busfreq,37sizeof(bd.bi_busfreq));38}3940void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,41unsigned long r6, unsigned long r7)42{43CUBOOT_INIT();44fdt_init(_dtb_start);45serial_console_init();46platform_ops.fixups = platform_fixups;47}484950