summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/arm/lib/save_prev_bl_data.c5
-rw-r--r--include/init.h11
2 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/lib/save_prev_bl_data.c b/arch/arm/lib/save_prev_bl_data.c
index f7b23faf0d6..b286bac9bf0 100644
--- a/arch/arm/lib/save_prev_bl_data.c
+++ b/arch/arm/lib/save_prev_bl_data.c
@@ -45,6 +45,11 @@ bool is_addr_accessible(phys_addr_t addr)
return false;
}
+phys_addr_t get_prev_bl_fdt_addr(void)
+{
+ return reg0;
+}
+
int save_prev_bl_data(void)
{
struct fdt_header *fdt_blob;
diff --git a/include/init.h b/include/init.h
index 9a1951d10a0..630d86729c4 100644
--- a/include/init.h
+++ b/include/init.h
@@ -168,6 +168,17 @@ defined(CONFIG_SAVE_PREV_BL_FDT_ADDR)
* Return: 0 if ok; -ENODATA on error
*/
int save_prev_bl_data(void);
+
+/**
+ * get_prev_bl_fdt_addr - When u-boot is chainloaded, get the address
+ * of the FDT passed by the previous bootloader.
+ *
+ * Return: the address of the FDT passed by the previous bootloader
+ * or 0 if not found.
+ */
+phys_addr_t get_prev_bl_fdt_addr(void);
+#else
+#define get_prev_bl_fdt_addr() 0LLU
#endif
/**