Update the memory nodes in the OS device tree from gd->dram[] in the
RISC-V arch_fixup_fdt() path, allowing memory detected by firmware to be
passed to the operating system without board-specific fixups.

Platforms that do not want this behavior can disable
CONFIG_ARCH_FIXUP_FDT_MEMORY. Do so for Microchip MPFS because its
multiple memory nodes are not handled correctly by
fdt_fixup_memory_banks().

Convert SpacemiT K1 and StarFive JH7110 to use the common implementation
and remove their redundant board fixups. Keep the JH7110 SPL fixup, as it
passes the detected DRAM size from SPL to U-Boot proper.

Signed-off-by: Junhui Liu <[email protected]>
---
Junhui Liu (3):
      riscv: Fix up the OS memory nodes from the DRAM banks
      riscv: spacemit: k1: Use the common memory FDT fixup
      riscv: starfive: visionfive2: Use the common memory FDT fixup

 arch/riscv/cpu/k1/dram.c                          | 15 ---------------
 arch/riscv/lib/fdt_fixup.c                        | 16 ++++++++++++++++
 board/starfive/visionfive2/starfive_visionfive2.c |  7 -------
 configs/microchip_mpfs_generic_defconfig          |  1 +
 configs/spacemit_k1_defconfig                     |  1 -
 configs/starfive_visionfive2_defconfig            |  1 -
 6 files changed, 17 insertions(+), 24 deletions(-)
---
base-commit: a06e89ab05eaa2b8344d521319399333cd760ae5
change-id: 20260918-riscv-fixup-memory-d8a9f5d67aaf

Best regards,
--  
Junhui Liu <[email protected]>

Reply via email to