summaryrefslogtreecommitdiff
path: root/include/dm/fdtaddr.h
diff options
context:
space:
mode:
authorÁlvaro Fernández Rojas <noltari@gmail.com>2018-04-29 21:56:54 +0200
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>2018-06-01 15:56:02 +0200
commit30a90f56c3a20da0456e09e6e665b648719b8935 (patch)
treecb89e7bcd28929b59dc90cb5cced979d9b19b090 /include/dm/fdtaddr.h
parentc3c863880479edeb5b08226e622d13c91326e4a7 (diff)
downloadu-boot-30a90f56c3a20da0456e09e6e665b648719b8935.tar.gz
u-boot-30a90f56c3a20da0456e09e6e665b648719b8935.tar.bz2
u-boot-30a90f56c3a20da0456e09e6e665b648719b8935.zip
dm: core: add functions to get memory-mapped I/O addresses
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/dm/fdtaddr.h')
-rw-r--r--include/dm/fdtaddr.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/dm/fdtaddr.h b/include/dm/fdtaddr.h
index db4c11e083..49a6ffd5f8 100644
--- a/include/dm/fdtaddr.h
+++ b/include/dm/fdtaddr.h
@@ -34,6 +34,28 @@ fdt_addr_t devfdt_get_addr(struct udevice *dev);
void *devfdt_get_addr_ptr(struct udevice *dev);
/**
+ * devfdt_remap_addr() - Return pointer to the memory-mapped I/O address
+ * of the reg property of a device
+ *
+ * @dev: Pointer to a device
+ *
+ * @return Pointer to addr, or NULL if there is no such property
+ */
+void *devfdt_remap_addr(struct udevice *dev);
+
+/**
+ * devfdt_remap_addr_index() - Return indexed pointer to the memory-mapped
+ * I/O address of the reg property of a device
+ * @index: the 'reg' property can hold a list of <addr, size> pairs
+ * and @index is used to select which one is required
+ *
+ * @dev: Pointer to a device
+ *
+ * @return Pointer to addr, or NULL if there is no such property
+ */
+void *devfdt_remap_addr_index(struct udevice *dev, int index);
+
+/**
* devfdt_map_physmem() - Read device address from reg property of the
* device node and map the address into CPU address
* space.