projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
mips: add a option to support not reserving malloc space on initial stack
[oweals/u-boot.git]
/
lib
/
fdtdec_common.c
diff --git
a/lib/fdtdec_common.c
b/lib/fdtdec_common.c
index 088e9e9063a92b378912fefdc46c74cc84ee892d..5775992ef3373f36b27bdf6b1d2e9c80044d6161 100644
(file)
--- a/
lib/fdtdec_common.c
+++ b/
lib/fdtdec_common.c
@@
-53,3
+53,14
@@
unsigned int fdtdec_get_uint(const void *blob, int node, const char *prop_name,
debug("(not found)\n");
return default_val;
}
+
+int fdtdec_get_child_count(const void *blob, int node)
+{
+ int subnode;
+ int num = 0;
+
+ fdt_for_each_subnode(subnode, blob, node)
+ num++;
+
+ return num;
+}