diff options
author | Johan Jonker | 2023-04-21 17:33:58 +0200 |
---|---|---|
committer | Kever Yang | 2023-05-06 17:28:18 +0800 |
commit | aa4f61a7763e81fee68c7816d4a0f28000128bbb (patch) | |
tree | f22b2c6188c81c9a8d22271caa5cb4d96060036d /include/dm | |
parent | 66a1d38c9891aa59fc896eacb4607cf5e953fe33 (diff) |
core: fdtaddr: add devfdt_get_addr_size_index_ptr function
Add devfdt_get_addr_size_index_ptr function with the same
functionality as devfdt_get_addr_size_index, but instead
a return pointer is given.
Suggested-by: Michael Nazzareno Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/dm')
-rw-r--r-- | include/dm/fdtaddr.h | 17 |
1 files changed, 16 insertions, 1 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 |