summaryrefslogtreecommitdiff
path: root/include/dm
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2016-04-06 12:49:19 -0600
committerSimon Glass <sjg@chromium.org>2016-04-15 08:14:37 -0600
commit43c4d44e3330fd21679c0790fa2176075d0e69bf (patch)
tree11028f81b83c1e7128ef8a1465e3ecf0bfadd5fa /include/dm
parent690d8a92c1f74115f954202023443d6869bac738 (diff)
downloadu-boot-imx-43c4d44e3330fd21679c0790fa2176075d0e69bf.zip
u-boot-imx-43c4d44e3330fd21679c0790fa2176075d0e69bf.tar.gz
u-boot-imx-43c4d44e3330fd21679c0790fa2176075d0e69bf.tar.bz2
fdt: implement dev_get_addr_name()
This function parses the reg property based on an index found in the reg-names property. This is required for bindings that are written using reg-names rather than hard-coding indices in reg. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/dm')
-rw-r--r--include/dm/device.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/dm/device.h b/include/dm/device.h
index 1cf8150..dad7591 100644
--- a/include/dm/device.h
+++ b/include/dm/device.h
@@ -465,6 +465,18 @@ fdt_addr_t dev_get_addr(struct udevice *dev);
fdt_addr_t dev_get_addr_index(struct udevice *dev, int index);
/**
+ * dev_get_addr_name() - Get the reg property of a device, indexed by name
+ *
+ * @dev: Pointer to a device
+ * @name: the 'reg' property can hold a list of <addr, size> pairs, with the
+ * 'reg-names' property providing named-based identification. @index
+ * indicates the value to search for in 'reg-names'.
+ *
+ * @return addr
+ */
+fdt_addr_t dev_get_addr_name(struct udevice *dev, const char *name);
+
+/**
* device_has_children() - check if a device has any children
*
* @dev: Device to check