summaryrefslogtreecommitdiff
path: root/include/dm/device.h
diff options
context:
space:
mode:
authorMugunthan V N <mugunthanvnm@ti.com>2015-12-23 20:39:36 +0530
committerJagan Teki <jteki@openedev.com>2016-01-13 18:54:22 +0530
commit69b41388ba45b853b3538f5b8cac8ab2154d36d8 (patch)
tree7a62a20c9c4a2a5e6e4f70762b2518360239961e /include/dm/device.h
parent425846ed8f395ca2371bb17226725c062451186d (diff)
downloadu-boot-imx-69b41388ba45b853b3538f5b8cac8ab2154d36d8.zip
u-boot-imx-69b41388ba45b853b3538f5b8cac8ab2154d36d8.tar.gz
u-boot-imx-69b41388ba45b853b3538f5b8cac8ab2154d36d8.tar.bz2
dm: core: Add a new api to get indexed device address
Add new api to get device address based on index. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Acked-by: Jagan Teki <jteki@openedev.com> [Rebased on master] Signed-off-by: Jagan Teki <jteki@openedev.com>
Diffstat (limited to 'include/dm/device.h')
-rw-r--r--include/dm/device.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/dm/device.h b/include/dm/device.h
index d9fc7fb..1cf8150 100644
--- a/include/dm/device.h
+++ b/include/dm/device.h
@@ -454,6 +454,17 @@ int device_find_next_child(struct udevice **devp);
fdt_addr_t dev_get_addr(struct udevice *dev);
/**
+ * dev_get_addr_index() - Get the indexed reg property of a device
+ *
+ * @dev: Pointer to a device
+ * @index: the 'reg' property can hold a list of <addr, size> pairs
+ * and @index is used to select which one is required
+ *
+ * @return addr
+ */
+fdt_addr_t dev_get_addr_index(struct udevice *dev, int index);
+
+/**
* device_has_children() - check if a device has any children
*
* @dev: Device to check