1 // SPDX-License-Identifier: GPL-2.0+
3 * (C) Copyright 2014, Cavium Inc.
12 #include <linux/compiler.h>
14 #include <cavium/atf.h>
15 #include <asm/armv8/mmu.h>
17 #if !CONFIG_IS_ENABLED(OF_CONTROL)
18 #include <dm/platform_data/serial_pl01x.h>
20 static const struct pl01x_serial_platdata serial0 = {
21 .base = CONFIG_SYS_SERIAL0,
27 U_BOOT_DEVICE(thunderx_serial0) = {
28 .name = "serial_pl01x",
32 static const struct pl01x_serial_platdata serial1 = {
33 .base = CONFIG_SYS_SERIAL1,
39 U_BOOT_DEVICE(thunderx_serial1) = {
40 .name = "serial_pl01x",
45 DECLARE_GLOBAL_DATA_PTR;
47 static struct mm_region thunderx_mem_map[] = {
49 .virt = 0x000000000000UL,
50 .phys = 0x000000000000UL,
51 .size = 0x40000000000UL,
52 .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) | PTE_BLOCK_NON_SHARE,
54 .virt = 0x800000000000UL,
55 .phys = 0x800000000000UL,
56 .size = 0x40000000000UL,
57 .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
60 .virt = 0x840000000000UL,
61 .phys = 0x840000000000UL,
62 .size = 0x40000000000UL,
63 .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
71 struct mm_region *mem_map = thunderx_mem_map;
85 ssize_t node_count = atf_node_count();
89 printf("Initializing\nNodes in system: %zd\n", node_count);
93 for (node = 0; node < node_count; node++) {
94 dram_size = atf_dram_size(node);
95 printf("Node %d: %zd MBytes of DRAM\n", node, dram_size >> 20);
96 gd->ram_size += dram_size;
99 gd->ram_size -= MEM_BASE;
101 *(unsigned long *)CPU_RELEASE_ADDR = 0;
109 * Board specific reset that is system reset.
111 void reset_cpu(ulong addr)
116 * Board specific ethernet initialization routine.
118 int board_eth_init(bd_t *bis)
126 void pci_init_board(void)
128 printf("DEBUG: PCI Init TODO *****\n");