diff options
author | Keerthy <j-keerthy@ti.com> | 2019-04-24 17:19:53 +0530 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2019-05-21 17:33:23 -0600 |
commit | e679d03b08fbde6145fdef150f4b240e6d14448e (patch) | |
tree | ddf7cfd6ca72591254ec9c651b22cad93db90a4d /include/dm | |
parent | 3a9a62a18e57b1ed3adbe3a3d00b9793ec55c08f (diff) | |
download | u-boot-e679d03b08fbde6145fdef150f4b240e6d14448e.tar.gz |
core: ofnode: Add ofnode_get_addr_size_index
Add ofnode_get_addr_size_index function to fetch the address
and size of the reg space based on index.
Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/dm')
-rw-r--r-- | include/dm/ofnode.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/dm/ofnode.h b/include/dm/ofnode.h index d206ee2caa..1be5ba4b45 100644 --- a/include/dm/ofnode.h +++ b/include/dm/ofnode.h @@ -355,6 +355,20 @@ ofnode ofnode_get_by_phandle(uint phandle); int ofnode_read_size(ofnode node, const char *propname); /** + * ofnode_get_addr_size_index() - get an address/size from a node + * based on index + * + * This reads the register address/size from a node based on index + * + * @node: node to read from + * @index: Index of address to read (0 for first) + * @size: Pointer to size of the address + * @return address, or FDT_ADDR_T_NONE if not present or invalid + */ +phys_addr_t ofnode_get_addr_size_index(ofnode node, int index, + fdt_size_t *size); + +/** * ofnode_get_addr_index() - get an address from a node * * This reads the register address from a node |