blob: 2e547f5170889584cb198226de5d471061968b4b [file] [log] [blame]
Philippe Reynes786dc912018-10-11 18:31:59 +02001// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Copyright (C) 2018 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_bcm968580xref_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_bcm968580xref_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}