diff options
Diffstat (limited to 'include/dm/of_addr.h')
-rw-r--r-- | include/dm/of_addr.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/dm/of_addr.h b/include/dm/of_addr.h index 12b1a99a80..3fa1ffce81 100644 --- a/include/dm/of_addr.h +++ b/include/dm/of_addr.h @@ -27,6 +27,24 @@ u64 of_translate_address(const struct device_node *no, const __be32 *in_addr); /** + * of_translate_dma_address() - translate a device-tree DMA address to a CPU + * address + * + * Translate a DMA address from the device-tree into a CPU physical address, + * this walks up the tree and applies the various bus mappings on the way. + * + * Note: We consider that crossing any level with #size-cells == 0 to mean + * that translation is impossible (that is we are not dealing with a value + * that can be mapped to a cpu physical address). This is not really specified + * that way, but this is traditionally the way IBM at least do things + * + * @np: node to check + * @in_addr: pointer to input DMA address + * @return translated DMA address or OF_BAD_ADDR on error + */ +u64 of_translate_dma_address(const struct device_node *no, const __be32 *in_addr); + +/** * of_get_address() - obtain an address from a node * * Extract an address from a node, returns the region size and the address |