summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/fdtdec.h5
-rw-r--r--lib/fdtdec.c7
2 files changed, 4 insertions, 8 deletions
diff --git a/include/fdtdec.h b/include/fdtdec.h
index 266c58271f..110aa6ab6d 100644
--- a/include/fdtdec.h
+++ b/include/fdtdec.h
@@ -1029,7 +1029,10 @@ int fdtdec_setup_memory_banksize(void);
* @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);
+static inline int fdtdec_set_phandle(void *blob, int node, uint32_t phandle)
+{
+ return fdt_setprop_u32(blob, node, "phandle", phandle);
+}
/**
* fdtdec_add_reserved_memory() - add or find a reserved-memory node
diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index 9c9c302347..fea44a9a8c 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -1261,13 +1261,6 @@ __weak void *board_fdt_blob_setup(void)
}
#endif
-int fdtdec_set_phandle(void *blob, int node, uint32_t phandle)
-{
- fdt32_t value = cpu_to_fdt32(phandle);
-
- return fdt_setprop(blob, node, "phandle", &value, sizeof(value));
-}
-
static int fdtdec_init_reserved_memory(void *blob)
{
int na, ns, node, err;