[PATCH 05/20] linux/of.h: Add of_n_size_cells()

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Jan 19 13:53:55 UTC 2018


---
 rtemsbsd/powerpc/include/linux/of.h | 2 ++
 rtemsbsd/sys/powerpc/compat.c       | 7 +++++++
 2 files changed, 9 insertions(+)

diff --git a/rtemsbsd/powerpc/include/linux/of.h b/rtemsbsd/powerpc/include/linux/of.h
index 001a0c80e..5ab543142 100644
--- a/rtemsbsd/powerpc/include/linux/of.h
+++ b/rtemsbsd/powerpc/include/linux/of.h
@@ -61,6 +61,8 @@ const void *of_get_property(const struct device_node *dn, const char *name,
 
 int of_n_addr_cells(struct device_node *dn);
 
+int of_n_size_cells(struct device_node *dn);
+
 /* FIXME: If we need the property, then more work is to do */
 #define	of_find_property(dn, name, len) of_get_property(dn, name, len)
 
diff --git a/rtemsbsd/sys/powerpc/compat.c b/rtemsbsd/sys/powerpc/compat.c
index 1f9eb9893..2ff85f450 100644
--- a/rtemsbsd/sys/powerpc/compat.c
+++ b/rtemsbsd/sys/powerpc/compat.c
@@ -212,6 +212,13 @@ of_n_addr_cells(struct device_node *dn)
 }
 
 int
+of_n_size_cells(struct device_node *dn)
+{
+
+	return (get_size_cells(bsp_fdt_get(), dn->offset));
+}
+
+int
 of_address_to_resource(struct device_node *dn, int index,
     struct resource *res)
 {
-- 
2.12.3




More information about the devel mailing list