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

Ulf Hansson ulf.hansson at linaro.org
Tue Jan 24 07:09:15 PST 2017


On 24 January 2017 at 10:27, Marek Szyprowski <m.szyprowski at samsung.com> 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 at samsung.com>
> Acked-by: Arnd Bergmann <arnd at arndb.de>

[...]

> 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 at linaro.org>

Kind regards
Uffe



More information about the linux-arm-kernel mailing list