dm: core: Introduce xxx_translate_dma_address()
authorFabien Dessenne <fabien.dessenne@st.com>
Fri, 31 May 2019 13:11:30 +0000 (15:11 +0200)
committerPatrick Delaunay <patrick.delaunay@st.com>
Mon, 22 Jul 2019 07:21:28 +0000 (09:21 +0200)
commit641067fb0c64dec8b6da962eb1d9fc49a6c7b499
tree594af009ab9d03084047c09310018efe257cf926
parent0de815356474912ef5bef9a69f0327a5a93bb2c2
dm: core: Introduce xxx_translate_dma_address()

Add the following functions to translate DMA address to CPU address:
- dev_translate_dma_address()
- ofnode_translate_dma_address()
- of_translate_dma_address()
- fdt_translate_dma_address()
These functions work the same way as xxx_translate_address(), with the
difference that the translation relies on the "dma-ranges" property
instead of the "ranges" property.

Add related test. Test report:
=> ut dm fdt_translation
Test: dm_test_fdt_translation: test-fdt.c
Test: dm_test_fdt_translation: test-fdt.c (flat tree)
Failures: 0

Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>
arch/sandbox/dts/test.dts
common/fdt_support.c
drivers/core/of_addr.c
drivers/core/ofnode.c
drivers/core/read.c
include/dm/of_addr.h
include/dm/ofnode.h
include/dm/read.h
include/fdt_support.h
test/dm/test-fdt.c