diff options
author | Thierry Reding <treding@nvidia.com> | 2023-01-20 20:42:48 +0300 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2023-01-25 13:48:27 +0300 |
commit | e251c21372c07694f547afe3c9828f7f6ef01267 (patch) | |
tree | 2796ba3a2d1109af85300a86c54b7065ad9fc000 /include | |
parent | bb649412d39f18eb2a8b7956209a068a08f4bc1e (diff) | |
download | linux-e251c21372c07694f547afe3c9828f7f6ef01267.tar.xz |
of: Introduce of_translate_dma_region()
This function is similar to of_translate_dma_address() but also reads a
length in addition to an address from a device tree property.
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20230120174251.4004100-2-thierry.reding@gmail.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/of_address.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/of_address.h b/include/linux/of_address.h index 265f26eeaf6b..376671594746 100644 --- a/include/linux/of_address.h +++ b/include/linux/of_address.h @@ -38,6 +38,8 @@ struct of_pci_range { /* Translate a DMA address from device space to CPU space */ extern u64 of_translate_dma_address(struct device_node *dev, const __be32 *in_addr); +extern const __be32 *of_translate_dma_region(struct device_node *dev, const __be32 *addr, + phys_addr_t *start, size_t *length); #ifdef CONFIG_OF_ADDRESS extern u64 of_translate_address(struct device_node *np, const __be32 *addr); |