1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-10-22 10:31:56 +02:00

core: Add {ofnode, dev}_translate_address functions

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mario Six <mario.six@gdsys.cc>
This commit is contained in:
Mario Six
2018-01-15 11:07:19 +01:00
committed by Simon Glass
parent 83a462a5e3
commit 147c607448
4 changed files with 43 additions and 0 deletions

View File

@@ -652,4 +652,17 @@ int ofnode_read_resource_byname(ofnode node, const char *name,
ofnode_valid(node); \
node = ofnode_next_subnode(node))
/**
* ofnode_translate_address() - Tranlate a device-tree address
*
* Translate an address from the device-tree into a CPU physical address. This
* function walks up the tree and applies the various bus mappings along the
* way.
*
* @ofnode: Device tree node giving the context in which to translate the
* address
* @in_addr: pointer to the address to translate
* @return the translated address; OF_BAD_ADDR on error
*/
u64 ofnode_translate_address(ofnode node, const fdt32_t *in_addr);
#endif