blob: 117b951c5dd3523bae744cb7841331b59f3dc207 [file] [log] [blame]
roy zang4978adf2006-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 zang92dda872006-12-01 11:47:36 +080028 * board support/init functions for the
roy zang4978adf2006-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 Barenfcd91bb2008-06-03 20:34:45 -040034#include <fdt_support.h>
Ben Warren04e97e02008-08-31 09:59:33 -070035#include <netdev.h>
roy zang4978adf2006-11-02 18:59:15 +080036
37#undef DEBUG
38
Wolfgang Denkd112a2c2007-09-15 20:48:41 +020039DECLARE_GLOBAL_DATA_PTR;
40
roy zang92dda872006-12-01 11:47:36 +080041extern void tsi108_init_f (void);
roy zang4978adf2006-11-02 18:59:15 +080042
roy zang92dda872006-12-01 11:47:36 +080043int display_mem_map (void);
roy zang4978adf2006-11-02 18:59:15 +080044
roy zang92dda872006-12-01 11:47:36 +080045void after_reloc (ulong dest_addr)
roy zang4978adf2006-11-02 18:59:15 +080046{
roy zang4978adf2006-11-02 18:59:15 +080047 /*
48 * Jump to the main U-Boot board init code
49 */
roy zang92dda872006-12-01 11:47:36 +080050 board_init_r ((gd_t *) gd, dest_addr);
roy zang4978adf2006-11-02 18:59:15 +080051 /* NOTREACHED */
52}
53
54/*
55 * Check Board Identity:
roy zang4978adf2006-11-02 18:59:15 +080056 * report board type
57 */
58
roy zang92dda872006-12-01 11:47:36 +080059int checkboard (void)
roy zang4978adf2006-11-02 18:59:15 +080060{
61 int l_type = 0;
62
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020063 printf ("BOARD: %s\n", CONFIG_SYS_BOARD_NAME);
roy zang4978adf2006-11-02 18:59:15 +080064 return (l_type);
65}
66
67/*
68 * Read Processor ID:
69 *
70 * report calling processor number
71 */
72
roy zang92dda872006-12-01 11:47:36 +080073int read_pid (void)
roy zang4978adf2006-11-02 18:59:15 +080074{
75 return 0; /* we are on single CPU platform for a while */
76}
77
roy zang92dda872006-12-01 11:47:36 +080078long int dram_size (int board_type)
roy zang4978adf2006-11-02 18:59:15 +080079{
80 return 0x20000000; /* 256M bytes */
81}
82
Becky Brucebd99ae72008-06-09 16:03:40 -050083phys_size_t initdram (int board_type)
roy zang4978adf2006-11-02 18:59:15 +080084{
roy zang92dda872006-12-01 11:47:36 +080085 return dram_size (board_type);
roy zang4978adf2006-11-02 18:59:15 +080086}
87
Gerald Van Baren84714ba2008-06-03 20:24:58 -040088#if defined(CONFIG_OF_BOARD_SETUP)
89void
90ft_board_setup(void *blob, bd_t *bd)
91{
92 ft_cpu_setup(blob, bd);
93 fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize);
94}
95#endif
Ben Warren04e97e02008-08-31 09:59:33 -070096
97int board_eth_init(bd_t *bis)
98{
99 int rc = 0;
100#if defined(CONFIG_TSI108_ETH)
101 rc = tsi108_eth_initialize(bis);
102#endif
103 return rc;
104}