blob: 71b760c4a98ee715dea8fe0c2e729167b4236ee3 [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 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02006 * SPDX-License-Identifier: GPL-2.0+
roy zang87c4db02006-11-02 18:59:15 +08007 *
8 * modifications for the Tsi108 Emul Board by avb@Tundra
9 */
10
11/*
roy zangee311212006-12-01 11:47:36 +080012 * board support/init functions for the
roy zang87c4db02006-11-02 18:59:15 +080013 * Freescale MPC7448 HPC2 (High-Performance Computing 2 Platform).
14 */
15
16#include <common.h>
17#include <74xx_7xx.h>
Gerald Van Barenfec6d9e2008-06-03 20:34:45 -040018#include <fdt_support.h>
Ben Warrenccdd12f2008-08-31 09:59:33 -070019#include <netdev.h>
roy zang87c4db02006-11-02 18:59:15 +080020
21#undef DEBUG
22
Wolfgang Denk1218abf2007-09-15 20:48:41 +020023DECLARE_GLOBAL_DATA_PTR;
24
roy zangee311212006-12-01 11:47:36 +080025extern void tsi108_init_f (void);
roy zang87c4db02006-11-02 18:59:15 +080026
roy zangee311212006-12-01 11:47:36 +080027int display_mem_map (void);
roy zang87c4db02006-11-02 18:59:15 +080028
roy zangee311212006-12-01 11:47:36 +080029void after_reloc (ulong dest_addr)
roy zang87c4db02006-11-02 18:59:15 +080030{
roy zang87c4db02006-11-02 18:59:15 +080031 /*
32 * Jump to the main U-Boot board init code
33 */
roy zangee311212006-12-01 11:47:36 +080034 board_init_r ((gd_t *) gd, dest_addr);
roy zang87c4db02006-11-02 18:59:15 +080035 /* NOTREACHED */
36}
37
38/*
39 * Check Board Identity:
roy zang87c4db02006-11-02 18:59:15 +080040 * report board type
41 */
42
roy zangee311212006-12-01 11:47:36 +080043int checkboard (void)
roy zang87c4db02006-11-02 18:59:15 +080044{
45 int l_type = 0;
46
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020047 printf ("BOARD: %s\n", CONFIG_SYS_BOARD_NAME);
roy zang87c4db02006-11-02 18:59:15 +080048 return (l_type);
49}
50
51/*
52 * Read Processor ID:
53 *
54 * report calling processor number
55 */
56
roy zangee311212006-12-01 11:47:36 +080057int read_pid (void)
roy zang87c4db02006-11-02 18:59:15 +080058{
59 return 0; /* we are on single CPU platform for a while */
60}
61
roy zangee311212006-12-01 11:47:36 +080062long int dram_size (int board_type)
roy zang87c4db02006-11-02 18:59:15 +080063{
64 return 0x20000000; /* 256M bytes */
65}
66
Becky Bruce9973e3c2008-06-09 16:03:40 -050067phys_size_t initdram (int board_type)
roy zang87c4db02006-11-02 18:59:15 +080068{
roy zangee311212006-12-01 11:47:36 +080069 return dram_size (board_type);
roy zang87c4db02006-11-02 18:59:15 +080070}
71
Gerald Van Baren589c0422008-06-03 20:24:58 -040072#if defined(CONFIG_OF_BOARD_SETUP)
73void
74ft_board_setup(void *blob, bd_t *bd)
75{
76 ft_cpu_setup(blob, bd);
77 fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize);
78}
79#endif
Ben Warrenccdd12f2008-08-31 09:59:33 -070080
81int board_eth_init(bd_t *bis)
82{
83 int rc = 0;
84#if defined(CONFIG_TSI108_ETH)
85 rc = tsi108_eth_initialize(bis);
86#endif
87 return rc;
88}