blob: cefe9c6db9e9efafc434e587395cae5a58dc6e27 [file] [log] [blame]
Christian Marangic771b632025-03-14 19:59:21 +01001// SPDX-License-Identifier: GPL-2.0
2
3#include <fdtdec.h>
4#include <init.h>
5#include <asm/armv8/mmu.h>
6#include <asm/system.h>
7
8int print_cpuinfo(void)
9{
10 printf("CPU: Airoha AN7581\n");
11 return 0;
12}
13
14int dram_init(void)
15{
16 return fdtdec_setup_mem_size_base();
17}
18
19int dram_init_banksize(void)
20{
21 return fdtdec_setup_memory_banksize();
22}
23
24void reset_cpu(ulong addr)
25{
26 psci_system_reset();
27}
28
29static struct mm_region an7581_mem_map[] = {
30 {
31 /* DDR */
32 .virt = 0x80000000UL,
33 .phys = 0x80000000UL,
34 .size = 0x80000000UL,
35 .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) | PTE_BLOCK_OUTER_SHARE,
36 }, {
37 .virt = 0x00000000UL,
38 .phys = 0x00000000UL,
39 .size = 0x20000000UL,
40 .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
41 PTE_BLOCK_NON_SHARE |
42 PTE_BLOCK_PXN | PTE_BLOCK_UXN
43 }, {
44 0,
45 }
46};
47struct mm_region *mem_map = an7581_mem_map;