linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: krzk@kernel.org (Krzysztof Kozlowski)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 3/4] dmaengine: pl330: Store pointer to slave device
Date: Tue, 17 Jan 2017 19:29:42 +0200	[thread overview]
Message-ID: <20170117172445.3itztktiay22as26@kozik-lap> (raw)
In-Reply-To: <1484657338-26338-4-git-send-email-m.szyprowski@samsung.com>

On Tue, Jan 17, 2017 at 01:48:57PM +0100, Marek Szyprowski wrote:
> Store the pointer to slave device, which requested our channel. It will be
> later used to implement runtime PM of PL330 DMA controller. Although
> DMA channels might be requested many times, each DMA peripheral channel is
> physically dedicated only for specific hardware, so there should be only
> one slave device for each channel.
> 
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Acked-by: Arnd Bergmann <arnd@arndb.de>

Any particular reason for removing my Reviewed-by? Any changes here?

Best regards,
Krzysztof

> ---
>  drivers/dma/pl330.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
> index b6b2cc912380..c77a3494659c 100644
> --- a/drivers/dma/pl330.c
> +++ b/drivers/dma/pl330.c
> @@ -450,6 +450,7 @@ struct dma_pl330_chan {
>  
>  	/* for runtime pm tracking */
>  	bool active;
> +	struct device *slave;
>  };
>  
>  struct pl330_dmac {
> @@ -2093,6 +2094,14 @@ static struct dma_chan *of_dma_pl330_xlate(struct of_phandle_args *dma_spec,
>  	if (chan_id >= pl330->num_peripherals)
>  		return NULL;
>  
> +	if (!pl330->peripherals[chan_id].slave) {
> +		pl330->peripherals[chan_id].slave = slave;
> +	} else if (pl330->peripherals[chan_id].slave != slave) {
> +		dev_err(pl330->ddma.dev,
> +			"Can't use same channel with multiple slave devices!\n");
> +		return NULL;
> +	}
> +
>  	return dma_get_slave_channel(&pl330->peripherals[chan_id].chan);
>  }
>  
> -- 
> 1.9.1
> 

  reply	other threads:[~2017-01-17 17:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20170117124921eucas1p1e9f95143d125f9362a23772a5f02f588@eucas1p1.samsung.com>
2017-01-17 12:48 ` [PATCH v5 0/4] DMA Engine: switch PL330 driver to non-irq-safe runtime PM Marek Szyprowski
     [not found]   ` <CGME20170117124921eucas1p2d2f83bf350f9d461d08cf0cb1ad44b88@eucas1p2.samsung.com>
2017-01-17 12:48     ` [PATCH v5 1/4] dmaengine: pl330: remove pdata based initialization Marek Szyprowski
     [not found]   ` <CGME20170117124922eucas1p143913fd91ab74031be17ad8a12d8e595@eucas1p1.samsung.com>
2017-01-17 12:48     ` [PATCH v5 2/4] dmaengine: Forward slave device pointer to of_xlate callback Marek Szyprowski
     [not found]   ` <CGME20170117124922eucas1p1d4037d80229e55007169cf85c19e5eec@eucas1p1.samsung.com>
2017-01-17 12:48     ` [PATCH v5 3/4] dmaengine: pl330: Store pointer to slave device Marek Szyprowski
2017-01-17 17:29       ` Krzysztof Kozlowski [this message]
2017-01-18  7:07         ` Marek Szyprowski
2017-01-18 14:13           ` Krzysztof Kozlowski
     [not found]   ` <CGME20170117124923eucas1p2866da62c7769937ddee48811ee058f55@eucas1p2.samsung.com>
2017-01-17 12:48     ` [PATCH v5 4/4] dmaengine: pl330: Don't require irq-safe runtime PM Marek Szyprowski
2017-01-17 17:32       ` Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170117172445.3itztktiay22as26@kozik-lap \
    --to=krzk@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).