summaryrefslogtreecommitdiff
path: root/include/dm
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-05-19 02:09:01 (GMT)
committerSimon Glass <sjg@chromium.org>2017-06-01 13:03:07 (GMT)
commitbed774969c0ba2ac6999b82953c0a0a708f3ad43 (patch)
treee9afe3fa2de5531daf25f020046c8131cb88a44e /include/dm
parentec002119cf30a7e7ef721071d890a0d8248232da (diff)
downloadu-boot-bed774969c0ba2ac6999b82953c0a0a708f3ad43.tar.xz
dm: core: Add address operations on device tree references
Add functions to add addresses in the device tree using ofnode references. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/dm')
-rw-r--r--include/dm/ofnode.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/include/dm/ofnode.h b/include/dm/ofnode.h
index e8b33c1..149622a 100644
--- a/include/dm/ofnode.h
+++ b/include/dm/ofnode.h
@@ -245,7 +245,7 @@ int ofnode_read_s32_default(ofnode node, const char *propname, s32 def);
const char *ofnode_read_string(ofnode node, const char *propname);
/**
- * ofnode_read_u32_array - Find and read an array of 32 bit integers
+ * ofnode_read_u32_array() - Find and read an array of 32 bit integers
*
* @node: valid node reference to read property from
* @propname: name of the property to read
@@ -317,6 +317,27 @@ const char *ofnode_get_name(ofnode node);
int ofnode_read_size(ofnode node, const char *propname);
/**
+ * ofnode_get_addr_index() - get an address from a node
+ *
+ * This reads the register address from a node
+ *
+ * @node: node to read from
+ * @index: Index of address to read (0 for first)
+ * @return address, or FDT_ADDR_T_NONE if not present or invalid
+ */
+phys_addr_t ofnode_get_addr_index(ofnode node, int index);
+
+/**
+ * ofnode_get_addr() - get an address from a node
+ *
+ * This reads the register address from a node
+ *
+ * @node: node to read from
+ * @return address, or FDT_ADDR_T_NONE if not present or invalid
+ */
+phys_addr_t ofnode_get_addr(ofnode node);
+
+/**
* ofnode_stringlist_search() - find a string in a string list and return index
*
* Note that it is possible for this function to succeed on property values