From: Patrick DELAUNAY Date: Mon, 22 Jul 2019 12:27:47 +0000 Subject: [U-Boot] [PATCH v3 1/7] dm: core: Introduce xxx_translate_dma_address() In-Reply-To: <1559308296-17027-2-git-send-email-fabien.dessenne@st.com> References: <1559308296-17027-1-git-send-email-fabien.dessenne@st.com> <1559308296-17027-2-git-send-email-fabien.dessenne@st.com> Message-ID: <268742eefcb447d2bf316674861e74ca@SFHDAG6NODE3.st.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, > From: Fabien DESSENNE > Sent: vendredi 31 mai 2019 15:12 > > 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 > --- > arch/sandbox/dts/test.dts | 4 ++++ > common/fdt_support.c | 6 ++++++ > drivers/core/of_addr.c | 4 ++++ > drivers/core/ofnode.c | 8 ++++++++ > drivers/core/read.c | 5 +++++ > include/dm/of_addr.h | 18 ++++++++++++++++++ > include/dm/ofnode.h | 16 +++++++++++++++- > include/dm/read.h | 20 +++++++++++++++++++- > include/fdt_support.h | 24 ++++++++++++++++++++++++ > test/dm/test-fdt.c | 12 ++++++++++++ > 10 files changed, 115 insertions(+), 2 deletions(-) > Applied to u-boot-stm32/master, thanks! Patrick