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

Remove the board hook and its unused header, and disable
CONFIG_OF_BOARD_SETUP since no board-specific fixups remain.

Signed-off-by: Junhui Liu <[email protected]>
---
 arch/riscv/cpu/k1/dram.c      | 15 ---------------
 configs/spacemit_k1_defconfig |  1 -
 2 files changed, 16 deletions(-)

diff --git a/arch/riscv/cpu/k1/dram.c b/arch/riscv/cpu/k1/dram.c
index 2893bc6b99a4..d6543cbd3a40 100644
--- a/arch/riscv/cpu/k1/dram.c
+++ b/arch/riscv/cpu/k1/dram.c
@@ -7,7 +7,6 @@
 #include <asm/io.h>
 #include <config.h>
 #include <bitfield.h>
-#include <fdt_support.h>
 #include <linux/sizes.h>
 
 #define DDR_BASE 0xC0000000
@@ -74,17 +73,3 @@ phys_addr_t board_get_usable_ram_top(phys_size_t total_size)
 
        return gd->ram_size;
 }
-
-int ft_board_setup(void *blob, struct bd_info *bd)
-{
-       u64 start[CONFIG_NR_DRAM_BANKS];
-       u64 size[CONFIG_NR_DRAM_BANKS];
-       int i;
-
-       for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) {
-               start[i] = gd->dram[i].start;
-               size[i] = gd->dram[i].size;
-       }
-
-       return fdt_fixup_memory_banks(blob, start, size, CONFIG_NR_DRAM_BANKS);
-}
diff --git a/configs/spacemit_k1_defconfig b/configs/spacemit_k1_defconfig
index 0604c2feefc1..b4d19aa4411d 100644
--- a/configs/spacemit_k1_defconfig
+++ b/configs/spacemit_k1_defconfig
@@ -32,7 +32,6 @@ CONFIG_MULTI_DTB_FIT=y
 CONFIG_SPL_HAS_LOAD_FIT_ADDRESS=y
 CONFIG_SPL_LOAD_FIT_ADDRESS=0x08000000
 CONFIG_SUPPORT_RAW_INITRD=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_CBSIZE=256
 CONFIG_SYS_PBSIZE=276
 # CONFIG_BOARD_INIT is not set

-- 
2.55.0

Reply via email to