diff options
author | Atish Patra <atish.patra@wdc.com> | 2020-04-21 21:15:02 +0300 |
---|---|---|
committer | Andes <uboot@andestech.com> | 2020-04-23 05:14:16 +0300 |
commit | 0cb27856d12ff1350996f93015972203b24387cc (patch) | |
tree | 88dcb301539b8b2b3141de73901da8f263ed5b43 | |
parent | d4ea649f179a69edd2cf2dd96efb9337205eb015 (diff) | |
download | u-boot-0cb27856d12ff1350996f93015972203b24387cc.tar.xz |
riscv: Setup reserved-memory node for FU540
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>
-rw-r--r-- | arch/riscv/lib/fdt_fixup.c | 15 | ||||
-rw-r--r-- | configs/sifive_fu540_defconfig | 1 |
2 files changed, 16 insertions, 0 deletions
diff --git a/arch/riscv/lib/fdt_fixup.c b/arch/riscv/lib/fdt_fixup.c index 1fce414909..af12e484db 100644 --- a/arch/riscv/lib/fdt_fixup.c +++ b/arch/riscv/lib/fdt_fixup.c @@ -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 diff --git a/configs/sifive_fu540_defconfig b/configs/sifive_fu540_defconfig index 6d61e6c960..f805aacc7a 100644 --- a/configs/sifive_fu540_defconfig +++ b/configs/sifive_fu540_defconfig @@ -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 |