fdt_support: add fdt_copy_fixed_partitions function

Add a new function fdt_copy_fixed_partitions to copy the fixed
partition nodes from U-Boot device tree to Linux kernel
device tree and to dynamically configure the MTD partitions.

This function fdt_copy_fixed_partitions is only based on device tree
with livetree compatible function and replace the function
fdt_fixup_mtdparts based on mtdparts variable.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
This commit is contained in:
Patrick Delaunay
2023-06-08 17:16:38 +02:00
committed by Patrice Chotard
parent 0e7cc08320
commit 163c5f60eb
2 changed files with 81 additions and 0 deletions

View File

@@ -256,6 +256,14 @@ static inline void fdt_fixup_mtdparts(void *fdt,
}
#endif
/**
* copy the fixed-partition nodes from U-Boot device tree to external blob
*
* @param blob FDT blob to update
* Return: 0 if ok, or non-zero on error
*/
int fdt_copy_fixed_partitions(void *blob);
void fdt_del_node_and_alias(void *blob, const char *alias);
/**