[PATCH v2 4/8] dm: Introduce xxx_get_dma_range()

Simon Glass sjg at chromium.org
Sat Dec 12 16:39:56 CET 2020


Hi Nicolas,

On Thu, 10 Dec 2020 at 04:39, Nicolas Saenz Julienne
<nsaenzjulienne at suse.de> wrote:
>
> Add the following functions to get a specific device's DMA ranges:
>  - dev_get_dma_range()
>  - ofnode_get_dma_range()
>  - of_get_dma_range()
>  - fdt_get_dma_range()
> They are specially useful in oder to be able validate a physical address
> space range into a bus's and to convert addresses from and to address
> spaces.
>
> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne at suse.de>
>
> ---
> Changes since v1:
>  - Fix wrong arguments in of_get_dma_range()'s call to of_translate_dma_address()
>  - Fix build in SPL/TPL and no LIBFDT supprt
>  - Add missing declaration in 'core/read.c'
>  - Address Matthias' comments

Please see my additional comments on v1

>
>  common/fdt_support.c   | 73 ++++++++++++++++++++++++++++++++++++++++++
>  drivers/core/of_addr.c | 71 ++++++++++++++++++++++++++++++++++++++++
>  drivers/core/ofnode.c  |  9 ++++++
>  drivers/core/read.c    |  9 ++++++
>  include/dm/of_addr.h   | 17 ++++++++++
>  include/dm/ofnode.h    | 16 +++++++++
>  include/dm/read.h      | 21 ++++++++++++
>  include/fdt_support.h  | 14 ++++++++
>  8 files changed, 230 insertions(+)
>

Regards,
Simon


More information about the U-Boot mailing list