b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame^] | 1 | /* |
| 2 | * (C) Copyright 2005 Freescale Semiconductor, Inc. |
| 3 | * |
| 4 | * Roy Zang <tie-fei.zang@freescale.com> |
| 5 | * |
| 6 | * SPDX-License-Identifier: GPL-2.0+ |
| 7 | * |
| 8 | * modifications for the Tsi108 Emul Board by avb@Tundra |
| 9 | */ |
| 10 | |
| 11 | /* |
| 12 | * board support/init functions for the |
| 13 | * Freescale MPC7448 HPC2 (High-Performance Computing 2 Platform). |
| 14 | */ |
| 15 | |
| 16 | #include <common.h> |
| 17 | #include <74xx_7xx.h> |
| 18 | #include <fdt_support.h> |
| 19 | #include <netdev.h> |
| 20 | |
| 21 | #undef DEBUG |
| 22 | |
| 23 | DECLARE_GLOBAL_DATA_PTR; |
| 24 | |
| 25 | extern void tsi108_init_f (void); |
| 26 | |
| 27 | int display_mem_map (void); |
| 28 | |
| 29 | void after_reloc (ulong dest_addr) |
| 30 | { |
| 31 | /* |
| 32 | * Jump to the main U-Boot board init code |
| 33 | */ |
| 34 | board_init_r ((gd_t *) gd, dest_addr); |
| 35 | /* NOTREACHED */ |
| 36 | } |
| 37 | |
| 38 | /* |
| 39 | * Check Board Identity: |
| 40 | * report board type |
| 41 | */ |
| 42 | |
| 43 | int checkboard (void) |
| 44 | { |
| 45 | int l_type = 0; |
| 46 | |
| 47 | printf ("BOARD: %s\n", CONFIG_SYS_BOARD_NAME); |
| 48 | return (l_type); |
| 49 | } |
| 50 | |
| 51 | /* |
| 52 | * Read Processor ID: |
| 53 | * |
| 54 | * report calling processor number |
| 55 | */ |
| 56 | |
| 57 | int read_pid (void) |
| 58 | { |
| 59 | return 0; /* we are on single CPU platform for a while */ |
| 60 | } |
| 61 | |
| 62 | long int dram_size (int board_type) |
| 63 | { |
| 64 | return 0x20000000; /* 256M bytes */ |
| 65 | } |
| 66 | |
| 67 | phys_size_t initdram (int board_type) |
| 68 | { |
| 69 | return dram_size (board_type); |
| 70 | } |
| 71 | |
| 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 |
| 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 | } |