public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Marek Szyprowski <m.szyprowski@samsung.com>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: linux-samsung-soc@vger.kernel.org, dmaengine@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Vinod Koul <vinod.koul@intel.com>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Inki Dae <inki.dae@samsung.com>
Subject: Re: [PATCH v5 3/4] dmaengine: pl330: Store pointer to slave device
Date: Wed, 18 Jan 2017 08:07:22 +0100	[thread overview]
Message-ID: <539bd321-66f5-9d06-923e-88dcb12787b8@samsung.com> (raw)
In-Reply-To: <20170117172445.3itztktiay22as26@kozik-lap>

Hi Krzysztof,

On 2017-01-17 18:29, Krzysztof Kozlowski wrote:
> 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?

No changes here. I'm sorry, the tag got lost during rebase.

> 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
>>
>
>

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland


  reply	other threads:[~2017-01-18  7:07 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
2017-01-17 12:48   ` [PATCH v5 1/4] dmaengine: pl330: remove pdata based initialization Marek Szyprowski
2017-01-17 12:48   ` [PATCH v5 2/4] dmaengine: Forward slave device pointer to of_xlate callback Marek Szyprowski
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
2017-01-18  7:07       ` Marek Szyprowski [this message]
2017-01-18 14:13         ` Krzysztof Kozlowski
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=539bd321-66f5-9d06-923e-88dcb12787b8@samsung.com \
    --to=m.szyprowski@samsung.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=inki.dae@samsung.com \
    --cc=krzk@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=ulf.hansson@linaro.org \
    --cc=vinod.koul@intel.com \
    /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