[PATCH 1/2] libfdt: Make fdt_cells function accessible
matthias.bgg at kernel.org
matthias.bgg at kernel.org
Wed Apr 8 11:35:27 CEST 2020
From: Matthias Brugger <mbrugger at suse.com>
For reading address-cells and size-cells, the libfdt only provides
functions which do not return in case the node does not provide the
property. For traversing the DT to find the parent node which provides
this property we will need to know that.
Make fdt_cells accessible from outside of libfdt so that we can detect
not present size- and address-cells properties in a node.
Signed-off-by: Matthias Brugger <mbrugger at suse.com>
---
scripts/dtc/libfdt/fdt_addresses.c | 2 +-
scripts/dtc/libfdt/libfdt.h | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/scripts/dtc/libfdt/fdt_addresses.c b/scripts/dtc/libfdt/fdt_addresses.c
index 9a82cd0ba2..ead9460e95 100644
--- a/scripts/dtc/libfdt/fdt_addresses.c
+++ b/scripts/dtc/libfdt/fdt_addresses.c
@@ -11,7 +11,7 @@
#include "libfdt_internal.h"
-static int fdt_cells(const void *fdt, int nodeoffset, const char *name)
+int fdt_cells(const void *fdt, int nodeoffset, const char *name)
{
const fdt32_t *c;
uint32_t val;
diff --git a/scripts/dtc/libfdt/libfdt.h b/scripts/dtc/libfdt/libfdt.h
index fa63fffe28..b0eca12491 100644
--- a/scripts/dtc/libfdt/libfdt.h
+++ b/scripts/dtc/libfdt/libfdt.h
@@ -1121,6 +1121,8 @@ const char *fdt_stringlist_get(const void *fdt, int nodeoffset,
*/
#define FDT_MAX_NCELLS 4
+int fdt_cells(const void *fdt, int nodeoffset, const char *name);
+
/**
* fdt_address_cells - retrieve address size for a bus represented in the tree
* @fdt: pointer to the device tree blob
--
2.26.0
More information about the U-Boot
mailing list