From 8153d53b9340e652f78efbf99979d951ba853458 Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Thu, 21 Mar 2019 19:10:01 +0100 Subject: fdtdec: Implement fdtdec_set_phandle() This function can be used to set a phandle for a given node. Signed-off-by: Thierry Reding --- include/fdtdec.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include') diff --git a/include/fdtdec.h b/include/fdtdec.h index 3f7538734a0..ba7f873b89e 100644 --- a/include/fdtdec.h +++ b/include/fdtdec.h @@ -1020,6 +1020,17 @@ int fdtdec_setup_memory_banksize_fdt(const void *blob); */ int fdtdec_setup_memory_banksize(void); +/** + * fdtdec_set_phandle() - sets the phandle of a given node + * + * @param blob FDT blob + * @param node offset in the FDT blob of the node whose phandle is to + * be set + * @param phandle phandle to set for the given node + * @return 0 on success or a negative error code on failure + */ +int fdtdec_set_phandle(void *blob, int node, uint32_t phandle); + /** * Set up the device tree ready for use */ -- cgit v1.2.3