summaryrefslogtreecommitdiff
path: root/include/dm
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2023-05-09 12:45:49 -0400
committerTom Rini <[email protected]>2023-05-09 12:45:49 -0400
commit0a9a4384c1483a88776bca38e28f09be51161034 (patch)
treec39e9bac9413c5c90f8da424865d67a7efdca315 /include/dm
parentf1d33a44ca04fdca241c1d89fd79e2e56c930c7e (diff)
parent716ed2a8c0bba085372df0eb7edb580b11e8d94c (diff)
Merge tag 'u-boot-rockchip-20230509' of https://source.denx.de/u-boot/custodians/u-boot-rockchip
- Rockchip NFC driver update and dev addr pointer api update; - use standard dr_mode for usb driver; - rock pi boards dts update; - Add rk3566 Anbernic boards; - Misc fixes for drivers;
Diffstat (limited to 'include/dm')
-rw-r--r--include/dm/fdtaddr.h17
-rw-r--r--include/dm/ofnode.h16
2 files changed, 24 insertions, 9 deletions
diff --git a/include/dm/fdtaddr.h b/include/dm/fdtaddr.h
index c9d2b27ba6e..dcdc19137cc 100644
--- a/include/dm/fdtaddr.h
+++ b/include/dm/fdtaddr.h
@@ -111,7 +111,7 @@ void *devfdt_get_addr_index_ptr(const struct udevice *dev, int index);
* @dev: Pointer to a device
* @index: the 'reg' property can hold a list of <addr, size> pairs
* and @index is used to select which one is required
- * @size: Pointer to size varible - this function returns the size
+ * @size: Pointer to size variable - this function returns the size
* specified in the 'reg' property here
*
* Return: addr
@@ -120,6 +120,21 @@ fdt_addr_t devfdt_get_addr_size_index(const struct udevice *dev, int index,
fdt_size_t *size);
/**
+ * devfdt_get_addr_size_index_ptr() - Return indexed pointer to the address of the
+ * reg property of a device
+ *
+ * @dev: Pointer to a device
+ * @index: the 'reg' property can hold a list of <addr, size> pairs
+ * and @index is used to select which one is required
+ * @size: Pointer to size variable - this function returns the size
+ * specified in the 'reg' property here
+ *
+ * Return: Pointer to addr, or NULL if there is no such property
+ */
+void *devfdt_get_addr_size_index_ptr(const struct udevice *dev, int index,
+ fdt_size_t *size);
+
+/**
* devfdt_get_addr_name() - Get the reg property of a device, indexed by name
*
* @dev: Pointer to a device
diff --git a/include/dm/ofnode.h b/include/dm/ofnode.h
index c00677275ee..443db6252dd 100644
--- a/include/dm/ofnode.h
+++ b/include/dm/ofnode.h
@@ -678,8 +678,8 @@ int ofnode_read_size(ofnode node, const char *propname);
* @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);
+fdt_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
@@ -695,8 +695,8 @@ phys_addr_t ofnode_get_addr_size_index(ofnode node, int index,
* @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);
+fdt_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
@@ -707,7 +707,7 @@ phys_addr_t ofnode_get_addr_size_index_notrans(ofnode node, int index,
* @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);
+fdt_addr_t ofnode_get_addr_index(ofnode node, int index);
/**
* ofnode_get_addr() - get an address from a node
@@ -717,7 +717,7 @@ phys_addr_t ofnode_get_addr_index(ofnode node, int index);
* @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);
+fdt_addr_t ofnode_get_addr(ofnode node);
/**
* ofnode_get_size() - get size from a node
@@ -1067,8 +1067,8 @@ const void *ofprop_get_property(const struct ofprop *prop,
* @sizep: place to put size value (on success)
* Return: address value, or FDT_ADDR_T_NONE on error
*/
-phys_addr_t ofnode_get_addr_size(ofnode node, const char *propname,
- phys_size_t *sizep);
+fdt_addr_t ofnode_get_addr_size(ofnode node, const char *propname,
+ fdt_size_t *sizep);
/**
* ofnode_read_u8_array_ptr() - find an 8-bit array