1 // SPDX-License-Identifier: GPL-2.0+
3 * (C) Copyright 2014, Cavium Inc.
10 #include <linux/compiler.h>
12 #include <cavium/atf.h>
13 #include <asm/armv8/mmu.h>
15 #if !CONFIG_IS_ENABLED(OF_CONTROL)
16 #include <dm/platform_data/serial_pl01x.h>
18 static const struct pl01x_serial_platdata serial0 = {
19 .base = CONFIG_SYS_SERIAL0,
25 U_BOOT_DEVICE(thunderx_serial0) = {
26 .name = "serial_pl01x",
30 static const struct pl01x_serial_platdata serial1 = {
31 .base = CONFIG_SYS_SERIAL1,
37 U_BOOT_DEVICE(thunderx_serial1) = {
38 .name = "serial_pl01x",
43 DECLARE_GLOBAL_DATA_PTR;
45 static struct mm_region thunderx_mem_map[] = {
47 .virt = 0x000000000000UL,
48 .phys = 0x000000000000UL,
49 .size = 0x40000000000UL,
50 .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) | PTE_BLOCK_NON_SHARE,
52 .virt = 0x800000000000UL,
53 .phys = 0x800000000000UL,
54 .size = 0x40000000000UL,
55 .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
58 .virt = 0x840000000000UL,
59 .phys = 0x840000000000UL,
60 .size = 0x40000000000UL,
61 .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
69 struct mm_region *mem_map = thunderx_mem_map;
83 ssize_t node_count = atf_node_count();
87 printf("Initializing\nNodes in system: %zd\n", node_count);
91 for (node = 0; node < node_count; node++) {
92 dram_size = atf_dram_size(node);
93 printf("Node %d: %zd MBytes of DRAM\n", node, dram_size >> 20);
94 gd->ram_size += dram_size;
97 gd->ram_size -= MEM_BASE;
99 *(unsigned long *)CPU_RELEASE_ADDR = 0;
107 * Board specific reset that is system reset.
109 void reset_cpu(ulong addr)
114 * Board specific ethernet initialization routine.
116 int board_eth_init(bd_t *bis)
124 void pci_init_board(void)
126 printf("DEBUG: PCI Init TODO *****\n");