summaryrefslogtreecommitdiff
path: root/include/fdtdec.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/fdtdec.h')
-rw-r--r--include/fdtdec.h33
1 files changed, 12 insertions, 21 deletions
diff --git a/include/fdtdec.h b/include/fdtdec.h
index 555c9520379..d9fcd037ed2 100644
--- a/include/fdtdec.h
+++ b/include/fdtdec.h
@@ -136,23 +136,6 @@ struct fdt_pci_addr {
u32 phys_lo;
};
-extern u8 __dtb_dt_begin[]; /* embedded device tree blob */
-extern u8 __dtb_dt_spl_begin[]; /* embedded device tree blob for SPL/TPL */
-
-/* Get a pointer to the embedded devicetree, if there is one, else NULL */
-static inline u8 *dtb_dt_embedded(void)
-{
-#ifdef CONFIG_OF_EMBED
-# ifdef CONFIG_XPL_BUILD
- return __dtb_dt_spl_begin;
-# else
- return __dtb_dt_begin;
-# endif
-#else
- return NULL;
-#endif
-}
-
/**
* Compute the size of a resource.
*
@@ -1156,6 +1139,13 @@ int fdtdec_set_carveout(void *blob, const char *node, const char *prop_name,
unsigned int count, unsigned long flags);
/**
+ * fdtdec_setup_embed - pick up embedded DTS
+ *
+ * Should be invoked under CONFIG_OF_EMBED guard.
+ */
+void fdtdec_setup_embed(void);
+
+/**
* Set up the device tree ready for use
*/
int fdtdec_setup(void);
@@ -1191,11 +1181,12 @@ int fdtdec_resetup(int *rescan);
*
* The existing devicetree is available at gd->fdt_blob
*
- * @err: 0 on success, -EEXIST if the devicetree is already correct, or other
- * internal error code if we fail to setup a DTB
- * @returns new devicetree blob pointer
+ * @fdtp: Existing devicetree blob pointer; update this and return 0 if a
+ * different devicetree should be used
+ * Return: 0 on success, -EEXIST if the existing FDT is OK, -ve error code if we
+ * fail to setup a DTB
*/
-void *board_fdt_blob_setup(int *err);
+int board_fdt_blob_setup(void **fdtp);
/*
* Decode the size of memory