blob: b3d83cc19f7793bded7bd1c160f370d4c1873dc7 [file] [log] [blame]
roy zang87c4db02006-11-02 18:59:15 +08001/*
2 * (C) Copyright 2005 Freescale Semiconductor, Inc.
3 *
4 * Roy Zang <tie-fei.zang@freescale.com>
5 *
6 * See file CREDITS for list of people who contributed to this
7 * project.
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of
12 * the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
22 * MA 02111-1307 USA
23 *
24 * modifications for the Tsi108 Emul Board by avb@Tundra
25 */
26
27/*
roy zangee311212006-12-01 11:47:36 +080028 * board support/init functions for the
roy zang87c4db02006-11-02 18:59:15 +080029 * Freescale MPC7448 HPC2 (High-Performance Computing 2 Platform).
30 */
31
32#include <common.h>
33#include <74xx_7xx.h>
Gerald Van Barenfec6d9e2008-06-03 20:34:45 -040034#include <fdt_support.h>
roy zang87c4db02006-11-02 18:59:15 +080035
36#undef DEBUG
37
Wolfgang Denk1218abf2007-09-15 20:48:41 +020038DECLARE_GLOBAL_DATA_PTR;
39
roy zangee311212006-12-01 11:47:36 +080040extern void flush_data_cache (void);
41extern void invalidate_l1_instruction_cache (void);
42extern void tsi108_init_f (void);
roy zang87c4db02006-11-02 18:59:15 +080043
roy zangee311212006-12-01 11:47:36 +080044int display_mem_map (void);
roy zang87c4db02006-11-02 18:59:15 +080045
roy zangee311212006-12-01 11:47:36 +080046void after_reloc (ulong dest_addr)
roy zang87c4db02006-11-02 18:59:15 +080047{
roy zang87c4db02006-11-02 18:59:15 +080048 /*
49 * Jump to the main U-Boot board init code
50 */
roy zangee311212006-12-01 11:47:36 +080051 board_init_r ((gd_t *) gd, dest_addr);
roy zang87c4db02006-11-02 18:59:15 +080052 /* NOTREACHED */
53}
54
55/*
56 * Check Board Identity:
roy zang87c4db02006-11-02 18:59:15 +080057 * report board type
58 */
59
roy zangee311212006-12-01 11:47:36 +080060int checkboard (void)
roy zang87c4db02006-11-02 18:59:15 +080061{
62 int l_type = 0;
63
roy zangee311212006-12-01 11:47:36 +080064 printf ("BOARD: %s\n", CFG_BOARD_NAME);
roy zang87c4db02006-11-02 18:59:15 +080065 return (l_type);
66}
67
68/*
69 * Read Processor ID:
70 *
71 * report calling processor number
72 */
73
roy zangee311212006-12-01 11:47:36 +080074int read_pid (void)
roy zang87c4db02006-11-02 18:59:15 +080075{
76 return 0; /* we are on single CPU platform for a while */
77}
78
roy zangee311212006-12-01 11:47:36 +080079long int dram_size (int board_type)
roy zang87c4db02006-11-02 18:59:15 +080080{
81 return 0x20000000; /* 256M bytes */
82}
83
Becky Bruce9973e3c2008-06-09 16:03:40 -050084phys_size_t initdram (int board_type)
roy zang87c4db02006-11-02 18:59:15 +080085{
roy zangee311212006-12-01 11:47:36 +080086 return dram_size (board_type);
roy zang87c4db02006-11-02 18:59:15 +080087}
88
Gerald Van Baren589c0422008-06-03 20:24:58 -040089#if defined(CONFIG_OF_BOARD_SETUP)
90void
91ft_board_setup(void *blob, bd_t *bd)
92{
93 ft_cpu_setup(blob, bd);
94 fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize);
95}
96#endif