[rtems-libbsd commit] linux/of.h: Add of_n_size_cells()

Sebastian Huber sebh at rtems.org
Tue Jan 23 13:57:32 UTC 2018


Module:    rtems-libbsd
Branch:    master
Commit:    26ce2ac4281362a84e1e77045946a1730c5128d8
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=26ce2ac4281362a84e1e77045946a1730c5128d8

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Wed Jan 17 14:13:53 2018 +0100

linux/of.h: Add of_n_size_cells()

Update #3277.

---

 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 001a0c8..5ab5431 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 1f9eb98..2ff85f4 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)
 {




More information about the vc mailing list