blob: 6263d0c36123e6e954c76086188080bc3370d878 [file] [log] [blame]
Usama Arif9218a112020-08-12 16:12:53 +01001// SPDX-License-Identifier: GPL-2.0+
2/*
3 * (C) Copyright 2020 Arm Limited
4 * Usama Arif <usama.arif@arm.com>
5 */
6
7#include <common.h>
8#include <dm.h>
9#include <dm/platform_data/serial_pl01x.h>
10#include <asm/armv8/mmu.h>
11
Simon Glassb75b15b2020-12-03 16:55:23 -070012static const struct pl01x_serial_plat serial_plat = {
Usama Arif9218a112020-08-12 16:12:53 +010013 .base = UART0_BASE,
14 .type = TYPE_PL011,
15 .clock = CONFIG_PL011_CLOCK,
16};
17
18U_BOOT_DEVICE(total_compute_serials) = {
19 .name = "serial_pl01x",
Simon Glassb75b15b2020-12-03 16:55:23 -070020 .plat = &serial_plat,
Usama Arif9218a112020-08-12 16:12:53 +010021};
22
23static struct mm_region total_compute_mem_map[] = {
24 {
25 .virt = 0x0UL,
26 .phys = 0x0UL,
27 .size = 0x80000000UL,
28 .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
29 PTE_BLOCK_NON_SHARE |
30 PTE_BLOCK_PXN | PTE_BLOCK_UXN
31 }, {
32 .virt = 0x80000000UL,
33 .phys = 0x80000000UL,
34 .size = 0xff80000000UL,
35 .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
36 PTE_BLOCK_INNER_SHARE
37 }, {
38 /* List terminator */
39 0,
40 }
41};
42
43struct mm_region *mem_map = total_compute_mem_map;
44
45int board_init(void)
46{
47 return 0;
48}
49
50int dram_init(void)
51{
52 gd->ram_size = PHYS_SDRAM_1_SIZE;
53 return 0;
54}
55
56int dram_init_banksize(void)
57{
58 gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
59 gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
60
61 return 0;
62}
63
64/* Nothing to be done here as handled by PSCI interface */
65void reset_cpu(ulong addr)
66{
67}