aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/xen/device_tree.h
diff options
context:
space:
mode:
authorChen Baozi <baozich@gmail.com>2013-08-13 19:14:23 +0800
committerIan Campbell <ian.campbell@citrix.com>2013-08-22 13:17:29 +0100
commit282a1c2aba06d1860ed91e4df8dd4c42f1a822e6 (patch)
tree5be57581ea7420965162b04b13b2abcad17b5f81 /xen/include/xen/device_tree.h
parente7ac471d5ceb955c050c9330afd56d1cdb0da52f (diff)
downloadxen-282a1c2aba06d1860ed91e4df8dd4c42f1a822e6.tar.gz
xen-282a1c2aba06d1860ed91e4df8dd4c42f1a822e6.tar.bz2
xen-282a1c2aba06d1860ed91e4df8dd4c42f1a822e6.zip
xen: Introduce a helper to read a u32 property in device tree.
Signed-off-by: Chen Baozi <baozich@gmail.com> Acked-by: Julien Grall <julien.grall@linaro.org>
Diffstat (limited to 'xen/include/xen/device_tree.h')
-rw-r--r--xen/include/xen/device_tree.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/xen/include/xen/device_tree.h b/xen/include/xen/device_tree.h
index 5a2a5c6971..faf727f10b 100644
--- a/xen/include/xen/device_tree.h
+++ b/xen/include/xen/device_tree.h
@@ -300,6 +300,17 @@ const void *dt_get_property(const struct dt_device_node *np,
const char *name, u32 *lenp);
/**
+ * dt_property_read_u32 - Helper to read a u32 property.
+ * @np: node to get the value
+ * @name: name of the property
+ * @out_value: pointer to return value
+ *
+ * Return true if get the desired value.
+ */
+bool_t dt_property_read_u32(const struct dt_device_node *np,
+ const char *name, u32 *out_value);
+
+/**
* Checks if the given "compat" string matches one of the strings in
* the device's "compatible" property
*/