blob: db82cd570d65083a86163360145b5cbb2687cd70 [file] [log] [blame]
Philippe Reynesbe2fc082019-01-31 18:57:36 +01001// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Copyright (C) 2019 Philippe Reynes <philippe.reynes@softathome.com>
4 */
5
6#include <common.h>
7#include <fdtdec.h>
8#include <linux/io.h>
9
10#ifdef CONFIG_ARM64
11#include <asm/armv8/mmu.h>
12
13static struct mm_region broadcom_bcm963158_mem_map[] = {
14 {
15 /* RAM */
16 .virt = 0x00000000UL,
17 .phys = 0x00000000UL,
18 .size = 8UL * SZ_1G,
19 .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
20 PTE_BLOCK_INNER_SHARE
21 }, {
22 /* SoC */
23 .virt = 0x80000000UL,
24 .phys = 0x80000000UL,
25 .size = 0xff80000000UL,
26 .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
27 PTE_BLOCK_NON_SHARE |
28 PTE_BLOCK_PXN | PTE_BLOCK_UXN
29 }, {
30 /* List terminator */
31 0,
32 }
33};
34
35struct mm_region *mem_map = broadcom_bcm963158_mem_map;
36#endif
37
38int board_init(void)
39{
40 return 0;
41}
42
43int dram_init(void)
44{
45 if (fdtdec_setup_mem_size_base() != 0)
46 printf("fdtdec_setup_mem_size_base() has failed\n");
47
48 return 0;
49}
50
51int dram_init_banksize(void)
52{
53 fdtdec_setup_memory_banksize();
54
55 return 0;
56}
57
58int print_cpuinfo(void)
59{
60 return 0;
61}