[U-Boot] [RFC 3/4] dm: add DMA_SUPPORTS_DEV_TO_MEM type to DMA_UCLASS

Simon Glass
2016-10-13T00:03:31Z

Hi,

On 10 October 2016 at 09:52, Dinh Nguyen <dinguyen@kernel.org> wrote:
> From: Dinh Nguyen <dinguyen@opensource.altera.com>
>
> Add DMA_SUPPORTS_DEV_TO_MEM type to the DMA uclass.

Can you explain (in your commit message) the need for this?

>
> Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
> ---
> drivers/dma/dma-uclass.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/dma/dma-uclass.c b/drivers/dma/dma-uclass.c
> index ea21fd9..a021395 100644
> --- a/drivers/dma/dma-uclass.c
> +++ b/drivers/dma/dma-uclass.c
> @@ -49,7 +49,8 @@ int dma_memcpy(void *dst, void *src, size_t len)
> const struct dma_ops *ops;
> int ret;
>
> - ret = dma_get_device(DMA_SUPPORTS_MEM_TO_MEM, &dev);
> + ret = dma_get_device(DMA_SUPPORTS_MEM_TO_MEM |
> + DMA_SUPPORTS_DEV_TO_MEM, &dev);
> if (ret < 0)
> return ret;
>
> --
> 2.8.3
>

Regards,
Simon