From 69b41388ba45b853b3538f5b8cac8ab2154d36d8 Mon Sep 17 00:00:00 2001 From: Mugunthan V N Date: Wed, 23 Dec 2015 20:39:36 +0530 Subject: 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 Acked-by: Jagan Teki [Rebased on master] Signed-off-by: Jagan Teki --- include/dm/device.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include') diff --git a/include/dm/device.h b/include/dm/device.h index d9fc7fb953..1cf81501ed 100644 --- a/include/dm/device.h +++ b/include/dm/device.h @@ -453,6 +453,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 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 * -- cgit v1.2.1