blob: 6364ab497f74abbfee1dd7cf2a3f9fa489de1ef0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2025 MediaTek Inc.
* Author: Sam Shih <[email protected]>
*/
#include <fdtdec.h>
#include <init.h>
#include <asm/armv8/mmu.h>
#include <asm/global_data.h>
#include <asm/u-boot.h>
#include <asm/system.h>
#include <linux/sizes.h>
DECLARE_GLOBAL_DATA_PTR;
int dram_init(void)
{
int ret;
ret = fdtdec_setup_mem_size_base();
if (ret)
return ret;
gd->ram_size = get_ram_size((void *)gd->ram_base, SZ_4G);
return 0;
}
int dram_init_banksize(void)
{
gd->bd->bi_dram[0].start = gd->ram_base;
gd->bd->bi_dram[0].size = gd->ram_size;
return 0;
}
void reset_cpu(ulong addr)
{
psci_system_reset();
}
|