The RISC-V arch_fixup_fdt() now updates the OS memory nodes from
gd->dram[], making VisionFive 2's ft_board_setup() redundant.

Remove the board hook, its unused header and global data declaration,
and disable CONFIG_OF_BOARD_SETUP.

Keep the SPL memory fixup, which passes the detected DRAM size to U-Boot
proper through the device tree.

Signed-off-by: Junhui Liu <[email protected]>
---
 board/starfive/visionfive2/starfive_visionfive2.c | 7 -------
 configs/starfive_visionfive2_defconfig            | 1 -
 2 files changed, 8 deletions(-)

diff --git a/board/starfive/visionfive2/starfive_visionfive2.c 
b/board/starfive/visionfive2/starfive_visionfive2.c
index 97f40715f8fe..f526ce9ecf50 100644
--- a/board/starfive/visionfive2/starfive_visionfive2.c
+++ b/board/starfive/visionfive2/starfive_visionfive2.c
@@ -6,7 +6,6 @@
 
 #include <cpu_func.h>
 #include <dm.h>
-#include <fdt_support.h>
 #include <env.h>
 #include <log.h>
 #include <asm/arch/eeprom.h>
@@ -14,7 +13,6 @@
 #include <asm/sections.h>
 #include <linux/bitops.h>
 
-DECLARE_GLOBAL_DATA_PTR;
 #define JH7110_L2_PREFETCHER_BASE_ADDR         0x2030000
 #define JH7110_L2_PREFETCHER_HART_OFFSET       0x2000
 
@@ -100,8 +98,3 @@ int board_late_init(void)
 
        return 0;
 }
-
-int ft_board_setup(void *blob, struct bd_info *bd)
-{
-       return fdt_fixup_memory(blob, 0x40000000, gd->ram_size);
-}
diff --git a/configs/starfive_visionfive2_defconfig 
b/configs/starfive_visionfive2_defconfig
index 6fd43544a0c4..83b2fb88bfe0 100644
--- a/configs/starfive_visionfive2_defconfig
+++ b/configs/starfive_visionfive2_defconfig
@@ -36,7 +36,6 @@ CONFIG_BOOTSTD_DEFAULTS=y
 CONFIG_BOOTSTAGE=y
 CONFIG_QSPI_BOOT=y
 CONFIG_SD_BOOT=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 debug rootwait earlycon=sbi"
 CONFIG_USE_PREBOOT=y

-- 
2.55.0

Reply via email to