1 // SPDX-License-Identifier: GPL-2.0+
3 * (C) Copyright 2014, Cavium Inc.
13 #include <linux/compiler.h>
15 #include <cavium/atf.h>
16 #include <asm/armv8/mmu.h>
18 #if !CONFIG_IS_ENABLED(OF_CONTROL)
19 #include <dm/platform_data/serial_pl01x.h>
21 static const struct pl01x_serial_plat serial0 = {
22 .base = CONFIG_SYS_SERIAL0,
28 U_BOOT_DEVICE(thunderx_serial0) = {
29 .name = "serial_pl01x",
33 static const struct pl01x_serial_plat serial1 = {
34 .base = CONFIG_SYS_SERIAL1,
40 U_BOOT_DEVICE(thunderx_serial1) = {
41 .name = "serial_pl01x",
46 DECLARE_GLOBAL_DATA_PTR;
48 static struct mm_region thunderx_mem_map[] = {
50 .virt = 0x000000000000UL,
51 .phys = 0x000000000000UL,
52 .size = 0x40000000000UL,
53 .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) | PTE_BLOCK_NON_SHARE,
55 .virt = 0x800000000000UL,
56 .phys = 0x800000000000UL,
57 .size = 0x40000000000UL,
58 .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
61 .virt = 0x840000000000UL,
62 .phys = 0x840000000000UL,
63 .size = 0x40000000000UL,
64 .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
72 struct mm_region *mem_map = thunderx_mem_map;
86 ssize_t node_count = atf_node_count();
90 printf("Initializing\nNodes in system: %zd\n", node_count);
94 for (node = 0; node < node_count; node++) {
95 dram_size = atf_dram_size(node);
96 printf("Node %d: %zd MBytes of DRAM\n", node, dram_size >> 20);
97 gd->ram_size += dram_size;
100 gd->ram_size -= MEM_BASE;
102 *(unsigned long *)CPU_RELEASE_ADDR = 0;
110 * Board specific reset that is system reset.
112 void reset_cpu(ulong addr)
117 * Board specific ethernet initialization routine.
119 int board_eth_init(struct bd_info *bis)
127 void pci_init_board(void)
129 printf("DEBUG: PCI Init TODO *****\n");