summaryrefslogtreecommitdiff
path: root/board/nuvoton/arbel_evb/arbel_evb.c
blob: cd12ce383452af1dcd241ae9b45dddd35ac63ddd (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
// SPDX-License-Identifier: GPL-2.0+
/*
 * Copyright (c) 2022 Nuvoton Technology Corp.
 */

#include <common.h>
#include <dm.h>
#include <asm/io.h>
#include <asm/arch/gcr.h>

DECLARE_GLOBAL_DATA_PTR;

int board_init(void)
{
	return 0;
}

int dram_init(void)
{
	struct npcm_gcr *gcr = (struct npcm_gcr *)NPCM_GCR_BA;

	/*
	 * Get dram size from bootblock.
	 * The value is stored in scrpad_02 register.
	 */
	gd->ram_size = readl(&gcr->scrpad_b);

	return 0;
}