[U-Boot] [PATCH] riscv: ax25-ae350: Pass dtb address to u-boot with a1 register

Andes uboot at andestech.com
Thu Oct 25 01:18:39 UTC 2018


From: Rick Chen <rick at andestech.com>

ax25-ae350 use CONFIG_OF_BOARD which allow the board to
override the fdt address. And prior_stage_fdt_address offer
a temporary memory address to keep the dtb address which was
passed from loader(gdb) to u-boot with a1.

Signed-off-by: Rick Chen <rick at andestech.com>
Cc: Greentime Hu <greentime at andestech.com>
---
 board/AndesTech/ax25-ae350/ax25-ae350.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/board/AndesTech/ax25-ae350/ax25-ae350.c b/board/AndesTech/ax25-ae350/ax25-ae350.c
index 5f4ca0f..d343453 100644
--- a/board/AndesTech/ax25-ae350/ax25-ae350.c
+++ b/board/AndesTech/ax25-ae350/ax25-ae350.c
@@ -14,6 +14,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
+extern phys_addr_t prior_stage_fdt_address;
 /*
  * Miscellaneous platform dependent initializations
  */
@@ -66,7 +67,7 @@ ulong board_flash_get_legacy(ulong base, int banknum, flash_info_t *info)
 
 void *board_fdt_blob_setup(void)
 {
-	void **ptr = (void *)CONFIG_SYS_SDRAM_BASE;
+	void **ptr = (void *)&prior_stage_fdt_address;
 	if (fdt_magic(*ptr) == FDT_MAGIC)
 			return (void *)*ptr;
 
-- 
2.7.4



More information about the U-Boot mailing list