]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EmbeddedPkg/Include/libfdt.h
EmbeddedPkg/FdtLib: incorporate missing overlay support
[mirror_edk2.git] / EmbeddedPkg / Include / libfdt.h
index 1aabec37f665a0d03d5437f21c8ddd1010e93816..141ecb579bde6aab68e05bf140ec457479269a0a 100644 (file)
@@ -1859,6 +1859,37 @@ int fdt_add_subnode(void *fdt, int parentoffset, const char *name);
  */\r
 int fdt_del_node(void *fdt, int nodeoffset);\r
 \r
+/**\r
+ * fdt_overlay_apply - Applies a DT overlay on a base DT\r
+ * @fdt: pointer to the base device tree blob\r
+ * @fdto: pointer to the device tree overlay blob\r
+ *\r
+ * fdt_overlay_apply() will apply the given device tree overlay on the\r
+ * given base device tree.\r
+ *\r
+ * Expect the base device tree to be modified, even if the function\r
+ * returns an error.\r
+ *\r
+ * returns:\r
+ *     0, on success\r
+ *     -FDT_ERR_NOSPACE, there's not enough space in the base device tree\r
+ *     -FDT_ERR_NOTFOUND, the overlay points to some inexistant nodes or\r
+ *             properties in the base DT\r
+ *     -FDT_ERR_BADPHANDLE,\r
+ *     -FDT_ERR_BADOVERLAY,\r
+ *     -FDT_ERR_NOPHANDLES,\r
+ *     -FDT_ERR_INTERNAL,\r
+ *     -FDT_ERR_BADLAYOUT,\r
+ *     -FDT_ERR_BADMAGIC,\r
+ *     -FDT_ERR_BADOFFSET,\r
+ *     -FDT_ERR_BADPATH,\r
+ *     -FDT_ERR_BADVERSION,\r
+ *     -FDT_ERR_BADSTRUCTURE,\r
+ *     -FDT_ERR_BADSTATE,\r
+ *     -FDT_ERR_TRUNCATED, standard meanings\r
+ */\r
+int fdt_overlay_apply(void *fdt, void *fdto);\r
+\r
 /**********************************************************************/\r
 /* Debugging / informational functions                                */\r
 /**********************************************************************/\r