diff options
author | Marek BehĂșn <marek.behun@nic.cz> | 2021-05-26 14:08:17 +0200 |
---|---|---|
committer | Jagan Teki <jagan@amarulasolutions.com> | 2021-06-24 11:52:45 +0530 |
commit | 31a7b719d07ccb11950f423b5f1195375109b5fa (patch) | |
tree | 4ac1c52b0e70f2a28e41359887c1ebc280be8054 /include | |
parent | b388af9af459b049645aaecc8874721119b479b0 (diff) | |
download | u-boot-31a7b719d07ccb11950f423b5f1195375109b5fa.tar.gz |
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 <marek.behun@nic.cz>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Tested-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/dm/ofnode.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/dm/ofnode.h b/include/dm/ofnode.h index 8a69fd87da..e3fccb506e 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 |