lkml.org 
[lkml]   [2020]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 07/18] dmaengine: ti: k3-udma-glue: Add function to get device pointer for DMA API
On 30-09-20, 12:14, Peter Ujfalusi wrote:
> Glue layer users should use the device of the DMA for DMA mapping and
> allocations as it is the DMA which accesses to descriptors and buffers,
> not the clients
>
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> ---
> drivers/dma/ti/k3-udma-glue.c | 14 ++++++++++++++
> drivers/dma/ti/k3-udma-private.c | 6 ++++++
> drivers/dma/ti/k3-udma.h | 1 +
> include/linux/dma/k3-udma-glue.h | 4 ++++
> 4 files changed, 25 insertions(+)
>
> diff --git a/drivers/dma/ti/k3-udma-glue.c b/drivers/dma/ti/k3-udma-glue.c
> index a367584f0d7b..a53bc4707ae8 100644
> --- a/drivers/dma/ti/k3-udma-glue.c
> +++ b/drivers/dma/ti/k3-udma-glue.c
> @@ -487,6 +487,13 @@ int k3_udma_glue_tx_get_irq(struct k3_udma_glue_tx_channel *tx_chn)
> }
> EXPORT_SYMBOL_GPL(k3_udma_glue_tx_get_irq);
>
> +struct device *
> + k3_udma_glue_tx_get_dma_device(struct k3_udma_glue_tx_channel *tx_chn)

How about..

struct device *
k3_udma_glue_tx_get_dma_device(struct k3_udma_glue_tx_channel *tx_chn)

> +{
> + return xudma_get_device(tx_chn->common.udmax);
> +}
> +EXPORT_SYMBOL_GPL(k3_udma_glue_tx_get_dma_device);

Hmm why would you need to export this device.. Can you please outline
all the devices involved here... why not use dmaI_dev->dev or chan->dev?

--
~Vinod

\
 
 \ /
  Last update: 2020-10-07 08:54    [W:0.152 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site