Re: [PATCH v6 2/4] dmaengine: Forward slave device pointer to of_xlate callback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 24 January 2017 at 10:27, Marek Szyprowski <m.szyprowski@xxxxxxxxxxx> wrote:
> Add pointer to slave device to of_dma_xlate to let DMA engine driver
> to know which slave device is using given DMA channel. This will be
> later used to implement non-irq-safe runtime PM for DMA engine driver.
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
> Acked-by: Arnd Bergmann <arnd@xxxxxxxx>

[...]

> diff --git a/include/linux/of_dma.h b/include/linux/of_dma.h
> index b90d8ec57c1f..a0a6c8c17669 100644
> --- a/include/linux/of_dma.h
> +++ b/include/linux/of_dma.h
> @@ -22,7 +22,8 @@ struct of_dma {
>         struct list_head        of_dma_controllers;
>         struct device_node      *of_node;
>         struct dma_chan         *(*of_dma_xlate)
> -                               (struct of_phandle_args *, struct of_dma *);
> +                               (struct of_phandle_args *, struct of_dma *,
> +                                struct device *);
>         void                    *(*of_dma_route_allocate)
>                                 (struct of_phandle_args *, struct of_dma *);
>         struct dma_router       *dma_router;
> @@ -37,7 +38,7 @@ struct of_dma_filter_info {
>  #ifdef CONFIG_DMA_OF
>  extern int of_dma_controller_register(struct device_node *np,
>                 struct dma_chan *(*of_dma_xlate)
> -               (struct of_phandle_args *, struct of_dma *),
> +               (struct of_phandle_args *, struct of_dma *, struct device *),
>                 void *data);
>  extern void of_dma_controller_free(struct device_node *np);
>
> @@ -47,17 +48,17 @@ extern int of_dma_router_register(struct device_node *np,
>                 struct dma_router *dma_router);
>  #define of_dma_router_free of_dma_controller_free
>
> -extern struct dma_chan *of_dma_request_slave_channel(struct device_node *np,
> +extern struct dma_chan *of_dma_request_slave_channel(struct device *slave,
>                                                      const char *name);

I noticed that this API is being used from sound/soc/sh/rcar/dma.c, so
I assume this change triggers a compiler error. I guess you want to
fold in a change dealing with that as well.

[...]

Reviewed-by: Ulf Hansson <ulf.hansson@xxxxxxxxxx>

Kind regards
Uffe
--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux