1 // SPDX-License-Identifier: GPL-2.0+
3 * (C) Copyright 2014, Cavium Inc.
11 #include <linux/compiler.h>
13 #include <cavium/atf.h>
14 #include <asm/armv8/mmu.h>
16 #if !CONFIG_IS_ENABLED(OF_CONTROL)
17 #include <dm/platform_data/serial_pl01x.h>
19 static const struct pl01x_serial_platdata serial0 = {
20 .base = CONFIG_SYS_SERIAL0,
26 U_BOOT_DEVICE(thunderx_serial0) = {
27 .name = "serial_pl01x",
31 static const struct pl01x_serial_platdata serial1 = {
32 .base = CONFIG_SYS_SERIAL1,
38 U_BOOT_DEVICE(thunderx_serial1) = {
39 .name = "serial_pl01x",
44 DECLARE_GLOBAL_DATA_PTR;
46 static struct mm_region thunderx_mem_map[] = {
48 .virt = 0x000000000000UL,
49 .phys = 0x000000000000UL,
50 .size = 0x40000000000UL,
51 .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) | PTE_BLOCK_NON_SHARE,
53 .virt = 0x800000000000UL,
54 .phys = 0x800000000000UL,
55 .size = 0x40000000000UL,
56 .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
59 .virt = 0x840000000000UL,
60 .phys = 0x840000000000UL,
61 .size = 0x40000000000UL,
62 .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
70 struct mm_region *mem_map = thunderx_mem_map;
84 ssize_t node_count = atf_node_count();
88 printf("Initializing\nNodes in system: %zd\n", node_count);
92 for (node = 0; node < node_count; node++) {
93 dram_size = atf_dram_size(node);
94 printf("Node %d: %zd MBytes of DRAM\n", node, dram_size >> 20);
95 gd->ram_size += dram_size;
98 gd->ram_size -= MEM_BASE;
100 *(unsigned long *)CPU_RELEASE_ADDR = 0;
108 * Board specific reset that is system reset.
110 void reset_cpu(ulong addr)
115 * Board specific ethernet initialization routine.
117 int board_eth_init(bd_t *bis)
125 void pci_init_board(void)
127 printf("DEBUG: PCI Init TODO *****\n");