riscv: ax25-ae350: Pass dtb address to u-boot with a1 register
[oweals/u-boot.git] / board / AndesTech / ax25-ae350 / ax25-ae350.c
index 5f4ca0f5a7433372ed14b1afd68d6259d9039cf4..d343453f22d01a211a03f74d1f47a925881e1fd8 100644 (file)
@@ -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;