aboutsummaryrefslogtreecommitdiff
path: root/board/nuvoton/arbel_evb/arbel_evb.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/nuvoton/arbel_evb/arbel_evb.c')
-rw-r--r--board/nuvoton/arbel_evb/arbel_evb.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/board/nuvoton/arbel_evb/arbel_evb.c b/board/nuvoton/arbel_evb/arbel_evb.c
new file mode 100644
index 0000000000..cd12ce3834
--- /dev/null
+++ b/board/nuvoton/arbel_evb/arbel_evb.c
@@ -0,0 +1,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;
+}