From 43177705ab29ed1ccca970096de1ef3c6095e7e6 Mon Sep 17 00:00:00 2001 From: Shengyu Qu Date: Sun, 17 Sep 2023 03:36:33 +0800 Subject: [PATCH] board: visionfive2: Fixup memory size passed to kernel MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Use fdt_fixup_memory to make the memory size data from dtb match the actual size. Signed-off-by: Shengyu Qu Tested-by: Milan P. Stanić --- board/starfive/visionfive2/starfive_visionfive2.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/board/starfive/visionfive2/starfive_visionfive2.c b/board/starfive/visionfive2/starfive_visionfive2.c index 07dcca26b3..07e171cfa2 100644 --- a/board/starfive/visionfive2/starfive_visionfive2.c +++ b/board/starfive/visionfive2/starfive_visionfive2.c @@ -9,8 +9,10 @@ #include #include #include +#include #include +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); +} -- 2.39.5