riscv: Setup reserved-memory node for FU540
authorAtish Patra <atish.patra@wdc.com>
Tue, 21 Apr 2020 18:15:02 +0000 (11:15 -0700)
committerAndes <uboot@andestech.com>
Thu, 23 Apr 2020 02:14:16 +0000 (10:14 +0800)
FU540 uses OF_SEPARATE instead of OF_PRIOR_STAGE.

Enable OF_BOARD_FIXUP to update the DT with reserved-memory node.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
arch/riscv/lib/fdt_fixup.c
configs/sifive_fu540_defconfig

index 1fce41490973b0eac59f4e2df093bf70edbbef9f..af12e484db9b507f44f0ccdc8ee3cc84c09ef6c1 100644 (file)
@@ -100,3 +100,18 @@ int riscv_board_reserved_mem_fixup(void *fdt)
 
        return 0;
 }
+
+#ifdef CONFIG_OF_BOARD_FIXUP
+int board_fix_fdt(void *fdt)
+{
+       int err;
+
+       err = riscv_board_reserved_mem_fixup(fdt);
+       if (err < 0) {
+               printf("failed to fixup DT for reserved memory: %d\n", err);
+               return err;
+       }
+
+       return 0;
+}
+#endif
index 6d61e6c960eee34d0ea8056c9c5e067cdc19bcab..f805aacc7afdd7c96b5b490dc273816c85bf7184 100644 (file)
@@ -9,6 +9,7 @@ CONFIG_FIT=y
 CONFIG_MISC_INIT_R=y
 CONFIG_DISPLAY_CPUINFO=y
 CONFIG_DISPLAY_BOARDINFO=y
+CONFIG_OF_BOARD_FIXUP=y
 CONFIG_DEFAULT_DEVICE_TREE="hifive-unleashed-a00"
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DM_MTD=y