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>
This commit is contained in:
@@ -489,6 +489,23 @@ int ofnode_read_size(ofnode node, const char *propname);
|
||||
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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user