summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBin Meng <[email protected]>2020-03-17 07:59:50 -0700
committerAnup Patel <[email protected]>2020-03-18 11:04:48 +0530
commitdb6a2b5c681e30351061df089ab2e86bae4509a9 (patch)
treee2732866562edf63c7f6e02eeb14d559bceaad10 /include
parent3f1c847d1fec852a2b98ee408e4193d70949acd4 (diff)
lib: utils: Add a general device tree fix-up helper
This adds a general device tree fix-up helper to do all required device tree fix-ups for a typical platform. Signed-off-by: Bin Meng <[email protected]> Reviewed-by: Anup Patel <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/sbi_utils/fdt/fdt_helper.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/sbi_utils/fdt/fdt_helper.h b/include/sbi_utils/fdt/fdt_helper.h
index d3b065a6..079b6198 100644
--- a/include/sbi_utils/fdt/fdt_helper.h
+++ b/include/sbi_utils/fdt/fdt_helper.h
@@ -47,4 +47,17 @@ void fdt_plic_fixup(void *fdt, const char *compat);
*/
int fdt_reserved_memory_fixup(void *fdt);
+/**
+ * General device tree fix-up
+ *
+ * This routine do all required device tree fix-ups for a typical platform.
+ * It fixes up the PLIC node and the reserved memory node in the device tree
+ * by calling the corresponding helper routines to accomplish the task.
+ *
+ * It is recommended that platform codes call this helper in their final_init()
+ *
+ * @param fdt: device tree blob
+ */
+void fdt_fixups(void *fdt);
+
#endif /* __FDT_HELPER_H__ */