roy zang | 87c4db0 | 2006-11-02 18:59:15 +0800 | [diff] [blame] | 1 | /* |
2 | * (C) Copyright 2005 Freescale Semiconductor, Inc. | ||||
3 | * | ||||
4 | * Roy Zang <tie-fei.zang@freescale.com> | ||||
5 | * | ||||
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 6 | * SPDX-License-Identifier: GPL-2.0+ |
roy zang | 87c4db0 | 2006-11-02 18:59:15 +0800 | [diff] [blame] | 7 | * |
8 | * modifications for the Tsi108 Emul Board by avb@Tundra | ||||
9 | */ | ||||
10 | |||||
11 | /* | ||||
roy zang | ee31121 | 2006-12-01 11:47:36 +0800 | [diff] [blame] | 12 | * board support/init functions for the |
roy zang | 87c4db0 | 2006-11-02 18:59:15 +0800 | [diff] [blame] | 13 | * Freescale MPC7448 HPC2 (High-Performance Computing 2 Platform). |
14 | */ | ||||
15 | |||||
16 | #include <common.h> | ||||
17 | #include <74xx_7xx.h> | ||||
Gerald Van Baren | fec6d9e | 2008-06-03 20:34:45 -0400 | [diff] [blame] | 18 | #include <fdt_support.h> |
Ben Warren | ccdd12f | 2008-08-31 09:59:33 -0700 | [diff] [blame] | 19 | #include <netdev.h> |
roy zang | 87c4db0 | 2006-11-02 18:59:15 +0800 | [diff] [blame] | 20 | |
21 | #undef DEBUG | ||||
22 | |||||
Wolfgang Denk | 1218abf | 2007-09-15 20:48:41 +0200 | [diff] [blame] | 23 | DECLARE_GLOBAL_DATA_PTR; |
24 | |||||
roy zang | ee31121 | 2006-12-01 11:47:36 +0800 | [diff] [blame] | 25 | extern void tsi108_init_f (void); |
roy zang | 87c4db0 | 2006-11-02 18:59:15 +0800 | [diff] [blame] | 26 | |
roy zang | ee31121 | 2006-12-01 11:47:36 +0800 | [diff] [blame] | 27 | int display_mem_map (void); |
roy zang | 87c4db0 | 2006-11-02 18:59:15 +0800 | [diff] [blame] | 28 | |
roy zang | ee31121 | 2006-12-01 11:47:36 +0800 | [diff] [blame] | 29 | void after_reloc (ulong dest_addr) |
roy zang | 87c4db0 | 2006-11-02 18:59:15 +0800 | [diff] [blame] | 30 | { |
roy zang | 87c4db0 | 2006-11-02 18:59:15 +0800 | [diff] [blame] | 31 | /* |
32 | * Jump to the main U-Boot board init code | ||||
33 | */ | ||||
roy zang | ee31121 | 2006-12-01 11:47:36 +0800 | [diff] [blame] | 34 | board_init_r ((gd_t *) gd, dest_addr); |
roy zang | 87c4db0 | 2006-11-02 18:59:15 +0800 | [diff] [blame] | 35 | /* NOTREACHED */ |
36 | } | ||||
37 | |||||
38 | /* | ||||
39 | * Check Board Identity: | ||||
roy zang | 87c4db0 | 2006-11-02 18:59:15 +0800 | [diff] [blame] | 40 | * report board type |
41 | */ | ||||
42 | |||||
roy zang | ee31121 | 2006-12-01 11:47:36 +0800 | [diff] [blame] | 43 | int checkboard (void) |
roy zang | 87c4db0 | 2006-11-02 18:59:15 +0800 | [diff] [blame] | 44 | { |
45 | int l_type = 0; | ||||
46 | |||||
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 47 | printf ("BOARD: %s\n", CONFIG_SYS_BOARD_NAME); |
roy zang | 87c4db0 | 2006-11-02 18:59:15 +0800 | [diff] [blame] | 48 | return (l_type); |
49 | } | ||||
50 | |||||
51 | /* | ||||
52 | * Read Processor ID: | ||||
53 | * | ||||
54 | * report calling processor number | ||||
55 | */ | ||||
56 | |||||
roy zang | ee31121 | 2006-12-01 11:47:36 +0800 | [diff] [blame] | 57 | int read_pid (void) |
roy zang | 87c4db0 | 2006-11-02 18:59:15 +0800 | [diff] [blame] | 58 | { |
59 | return 0; /* we are on single CPU platform for a while */ | ||||
60 | } | ||||
61 | |||||
roy zang | ee31121 | 2006-12-01 11:47:36 +0800 | [diff] [blame] | 62 | long int dram_size (int board_type) |
roy zang | 87c4db0 | 2006-11-02 18:59:15 +0800 | [diff] [blame] | 63 | { |
64 | return 0x20000000; /* 256M bytes */ | ||||
65 | } | ||||
66 | |||||
Becky Bruce | 9973e3c | 2008-06-09 16:03:40 -0500 | [diff] [blame] | 67 | phys_size_t initdram (int board_type) |
roy zang | 87c4db0 | 2006-11-02 18:59:15 +0800 | [diff] [blame] | 68 | { |
roy zang | ee31121 | 2006-12-01 11:47:36 +0800 | [diff] [blame] | 69 | return dram_size (board_type); |
roy zang | 87c4db0 | 2006-11-02 18:59:15 +0800 | [diff] [blame] | 70 | } |
71 | |||||
Gerald Van Baren | 589c042 | 2008-06-03 20:24:58 -0400 | [diff] [blame] | 72 | #if defined(CONFIG_OF_BOARD_SETUP) |
73 | void | ||||
74 | ft_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 Warren | ccdd12f | 2008-08-31 09:59:33 -0700 | [diff] [blame] | 80 | |
81 | int 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 | } |