From d58717e42559189a226ea800173147399c8edef9 Mon Sep 17 00:00:00 2001 From: Rick Chen Date: Thu, 29 Mar 2018 10:08:33 +0800 Subject: riscv: ae250: Support DT provided by the board at runtime Enable CONFIG_OF_BOAD to support delivery dtb to u-boot at run time instead of embedded. There are two methods to delivery dtb. 1 Pass from loader: When u-boot boot from RAM, gdb or loader can pass dtb via a2 to u-boot dynamically. Of course gdb or loader shall be in charge of dtb delivery. 2 Configure CONFIG_SYS_FDT_BASE: It can be configured as RAM or ROM base statically, no mater u-boot boot from RAM or ROM. If it was configured as ROM base, dtb can be burned into ROM(spi flash) by spi driver. Meanwhile remove CONFIG_SKIP_LOWLEVEL_INIT which is useless in nx25-ae250 configuration. Signed-off-by: Rick Chen Signed-off-by: Rick Chen Cc: Greentime Hu --- board/AndesTech/nx25-ae250/nx25-ae250.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'board/AndesTech/nx25-ae250/nx25-ae250.c') diff --git a/board/AndesTech/nx25-ae250/nx25-ae250.c b/board/AndesTech/nx25-ae250/nx25-ae250.c index a965218f34..6e31be3505 100644 --- a/board/AndesTech/nx25-ae250/nx25-ae250.c +++ b/board/AndesTech/nx25-ae250/nx25-ae250.c @@ -64,3 +64,12 @@ ulong board_flash_get_legacy(ulong base, int banknum, flash_info_t *info) { return 0; } + +void *board_fdt_blob_setup(void) +{ + void **ptr = (void *)CONFIG_SYS_SDRAM_BASE; + if (fdt_magic(*ptr) == FDT_MAGIC) + return (void *)*ptr; + + return (void *)CONFIG_SYS_FDT_BASE; +} -- cgit