summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarek BehĂșn <[email protected]>2021-05-26 14:08:17 +0200
committerJagan Teki <[email protected]>2021-06-24 11:52:45 +0530
commit31a7b719d07ccb11950f423b5f1195375109b5fa (patch)
tree4ac1c52b0e70f2a28e41359887c1ebc280be8054 /include
parentb388af9af459b049645aaecc8874721119b479b0 (diff)
dm: core: add non-translating version of ofnode_get_addr_size_index()
Add functions ofnode_get_addr_size_index_notrans(), which is a non-translating version of ofnode_get_addr_size_index(). Some addresses are not meant to be translated, for example those of MTD fixed-partitions. Signed-off-by: Marek BehĂșn <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Miquel Raynal <[email protected]> Tested-by: Patrice Chotard <[email protected]> Reviewed-by: Jagan Teki <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/dm/ofnode.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/dm/ofnode.h b/include/dm/ofnode.h
index 8a69fd87da7..e3fccb506ea 100644
--- a/include/dm/ofnode.h
+++ b/include/dm/ofnode.h
@@ -490,6 +490,23 @@ phys_addr_t ofnode_get_addr_size_index(ofnode node, int index,
fdt_size_t *size);
/**
+ * ofnode_get_addr_size_index_notrans() - get an address/size from a node
+ * based on index, without address
+ * translation
+ *
+ * This reads the register address/size from a node based on index.
+ * The resulting address is not translated. Useful for example for on-disk
+ * addresses.
+ *
+ * @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_notrans(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