aboutsummaryrefslogtreecommitdiff
path: root/board/starfive/visionfive2/starfive_visionfive2.c
diff options
context:
space:
mode:
authorShengyu Qu2023-09-17 03:36:33 +0800
committerLeo Yu-Chi Liang2023-09-20 20:30:30 +0800
commit43177705ab29ed1ccca970096de1ef3c6095e7e6 (patch)
tree3b6475185cf5cb22d804bc257be5239326a7b6ca /board/starfive/visionfive2/starfive_visionfive2.c
parent7d4810cac5fcfb5c4873cef9dcc5f831a4ae2f3f (diff)
board: visionfive2: Fixup memory size passed to kernel
Use fdt_fixup_memory to make the memory size data from dtb match the actual size. Signed-off-by: Shengyu Qu <wiagn233@outlook.com> Tested-by: Milan P. Stanić <mps@arvanta.net>
Diffstat (limited to 'board/starfive/visionfive2/starfive_visionfive2.c')
-rw-r--r--board/starfive/visionfive2/starfive_visionfive2.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/board/starfive/visionfive2/starfive_visionfive2.c b/board/starfive/visionfive2/starfive_visionfive2.c
index 07dcca26b30..07e171cfa2b 100644
--- a/board/starfive/visionfive2/starfive_visionfive2.c
+++ b/board/starfive/visionfive2/starfive_visionfive2.c
@@ -9,8 +9,10 @@
#include <asm/sections.h>
#include <cpu_func.h>
#include <dm.h>
+#include <fdt_support.h>
#include <linux/bitops.h>
+DECLARE_GLOBAL_DATA_PTR;
#define JH7110_L2_PREFETCHER_BASE_ADDR 0x2030000
#define JH7110_L2_PREFETCHER_HART_OFFSET 0x2000
@@ -51,3 +53,8 @@ void *board_fdt_blob_setup(int *err)
return (ulong *)&_end;
}
+
+int ft_board_setup(void *blob, struct bd_info *bd)
+{
+ return fdt_fixup_memory(blob, 0x40000000, gd->ram_size);
+}