dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: Sagar Dharia <sdharia@codeaurora.org>,
	Vinod Koul <vinod.koul@intel.com>,
	Andy Gross <andy.gross@linaro.org>,
	dmaengine@vger.kernel.org
Cc: Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	David Brown <david.brown@linaro.org>,
	Dan Williams <dan.j.williams@intel.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org,
	yanhe@quicinc.com, ramkri@qti.qualcomm.com, sdharia@quicinc.com
Subject: [1/4] dmaengine: qcom: bam_dma: make bam clk optional
Date: Wed, 17 Jan 2018 09:46:31 +0000	[thread overview]
Message-ID: <cf201140-9a98-88f7-d49f-d1c1cc1ae4ec@linaro.org> (raw)

On 16/01/18 19:38, Sagar Dharia wrote:
> 
> On 1/16/2018 12:02 PM, srinivas.kandagatla@linaro.org wrote:
>> From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
>>
>> When BAM is remotely controlled it does not sound correct to control
>> its clk on Linux side. Make it optional, so that its not madatory
>> for remote controlled BAM instances.
>>
>> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
>> ---
>>   drivers/dma/qcom/bam_dma.c | 15 ++++++++-------
>>   1 file changed, 8 insertions(+), 7 deletions(-)
>>
>> diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c
>> index 03c4eb3fd314..78e488e8f96d 100644
>> --- a/drivers/dma/qcom/bam_dma.c
>> +++ b/drivers/dma/qcom/bam_dma.c
>> @@ -1180,13 +1180,14 @@ static int bam_dma_probe(struct 
>> platform_device *pdev)
>>                           "qcom,controlled-remotely");
>>       bdev->bamclk = devm_clk_get(bdev->dev, "bam_clk");
>> -    if (IS_ERR(bdev->bamclk))
>> -        return PTR_ERR(bdev->bamclk);
>> -
>> -    ret = clk_prepare_enable(bdev->bamclk);
>> -    if (ret) {
>> -        dev_err(bdev->dev, "failed to prepare/enable clock\n");
>> -        return ret;
>> +    if (IS_ERR(bdev->bamclk)) {
>> +        bdev->bamclk = NULL;
>> +    } else {
>> +        ret = clk_prepare_enable(bdev->bamclk);
>> +        if (ret) {
>> +            dev_err(bdev->dev, "failed to prepare/enable clock\n");
>> +            return ret;
>> +        }
> I believe you can also keep pm_runtime disabled if BAM is remotely 
> controlled.

Yes, that's another topic which should be fixed too. I will add that 
patch in next version.

thanks,
srini
> 
> Thanks
> Sagar
>>       }
>>       ret = bam_init(bdev);
>
---
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

             reply	other threads:[~2018-01-17  9:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-17  9:46 Srinivas Kandagatla [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-01-23  9:20 [1/4] dmaengine: qcom: bam_dma: make bam clk optional Srinivas Kandagatla
2018-01-23  9:19 Vinod Koul
2018-01-22  9:55 Srinivas Kandagatla
2018-01-19  5:52 Vinod Koul
2018-01-16 19:38 Sagar Dharia
2018-01-16 19:02 Srinivas Kandagatla

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=cf201140-9a98-88f7-d49f-d1c1cc1ae4ec@linaro.org \
    --to=srinivas.kandagatla@linaro.org \
    --cc=andy.gross@linaro.org \
    --cc=dan.j.williams@intel.com \
    --cc=david.brown@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-soc@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=ramkri@qti.qualcomm.com \
    --cc=robh+dt@kernel.org \
    --cc=sdharia@codeaurora.org \
    --cc=sdharia@quicinc.com \
    --cc=vinod.koul@intel.com \
    --cc=yanhe@quicinc.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;
as well as URLs for NNTP newsgroup(s).