From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Subject: [1/4] dmaengine: qcom: bam_dma: make bam clk optional From: Vinod Koul Message-Id: <20180123091905.GY18649@localhost> Date: Tue, 23 Jan 2018 14:49:05 +0530 To: Srinivas Kandagatla Cc: Andy Gross , dmaengine@vger.kernel.org, Rob Herring , Mark Rutland , David Brown , Dan Williams , 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 List-ID: T24gTW9uLCBKYW4gMjIsIDIwMTggYXQgMDk6NTU6MDFBTSArMDAwMCwgU3Jpbml2YXMgS2FuZGFn YXRsYSB3cm90ZToKCj4gPj5AQCAtMTE4MCwxMyArMTE4MCwxNCBAQCBzdGF0aWMgaW50IGJhbV9k bWFfcHJvYmUoc3RydWN0IHBsYXRmb3JtX2RldmljZSAqcGRldikKPiA+PiAgCQkJCQkJInFjb20s Y29udHJvbGxlZC1yZW1vdGVseSIpOwo+ID4+ICAJYmRldi0+YmFtY2xrID0gZGV2bV9jbGtfZ2V0 KGJkZXYtPmRldiwgImJhbV9jbGsiKTsKPiA+Cj4gPmJ1dCB5b3Ugc3RpbGwgZG8gY2xrX2dldCB1 bmNvbmRpdGlvbmFsbHk/Cj4gCj4gT25seSByZWFzb24gdG8gZG8gdGhpcyB3YXkgaXMgdG8gbm90 IGJyZWFrIGV4aXN0aW5nIHVzZXJzIGluIHRoZSBtYWlubGluZS4KPiAKPiByZW1vdGVseSBjb250 cm9sbGVkIEJBTSBpcyBhbHJlYWR5IHN1cHBvcnRlZCBpbiB1cHN0cmVhbSBkcml2ZXIsIHRoZXJl IGFyZQo+IHVzZXJzIG9mIHRoaXMgd2hvIHBhc3MgY2xrIGZyb20gZGV2aWNlIHRyZWUsIElmIEkg bWFrZSB0aGlzIGNvbmRpdGlvbmFsIHRoZW4KPiBzdWJzZXF1ZW50IHJlYWRzIHRvIHRoZSBCQU0g cmVnaXN0ZXJzIGZvciB0aG9zZSBpbnN0YW5jZXMgbWlnaHQgY3Jhc2ggdGhlCj4gc3lzdGVtLgoK QnV0IHRoZXNlIGluc3RhbmNlcyBhcmUgcmVtb3RlIGNvbnRyb2xsZWQsIHNvIGlmIHdlIHN0b3Ag cmVwcmVzZW50aW5nIHRoZW0KaW4gTGludXgsIHdoeSB3b3VsZCB3ZSByZWFkIHRoZW0/Cg== From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vinod Koul Subject: Re: [PATCH 1/4] dmaengine: qcom: bam_dma: make bam clk optional Date: Tue, 23 Jan 2018 14:49:05 +0530 Message-ID: <20180123091905.GY18649@localhost> References: <20180116190236.14558-1-srinivas.kandagatla@linaro.org> <20180116190236.14558-2-srinivas.kandagatla@linaro.org> <20180119055221.GV18649@localhost> <8dfa8ba1-6e98-a8e4-614c-592861cef571@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <8dfa8ba1-6e98-a8e4-614c-592861cef571-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Srinivas Kandagatla Cc: Andy Gross , dmaengine-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Rob Herring , Mark Rutland , David Brown , Dan Williams , devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, yanhe-jfJNa2p1gH1BDgjK7y7TUQ@public.gmane.org, ramkri-Rm6X0d1/PG5y9aJCnZT0Uw@public.gmane.org, sdharia-jfJNa2p1gH1BDgjK7y7TUQ@public.gmane.org List-Id: linux-arm-msm@vger.kernel.org On Mon, Jan 22, 2018 at 09:55:01AM +0000, Srinivas Kandagatla wrote: > >>@@ -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"); > > > >but you still do clk_get unconditionally? > > Only reason to do this way is to not break existing users in the mainline. > > remotely controlled BAM is already supported in upstream driver, there are > users of this who pass clk from device tree, If I make this conditional then > subsequent reads to the BAM registers for those instances might crash the > system. But these instances are remote controlled, so if we stop representing them in Linux, why would we read them? -- ~Vinod -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751255AbeAWJOp (ORCPT ); Tue, 23 Jan 2018 04:14:45 -0500 Received: from mga07.intel.com ([134.134.136.100]:45081 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751027AbeAWJOm (ORCPT ); Tue, 23 Jan 2018 04:14:42 -0500 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,400,1511856000"; d="scan'208";a="168395823" Date: Tue, 23 Jan 2018 14:49:05 +0530 From: Vinod Koul To: Srinivas Kandagatla Cc: Andy Gross , dmaengine@vger.kernel.org, Rob Herring , Mark Rutland , David Brown , Dan Williams , 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: Re: [PATCH 1/4] dmaengine: qcom: bam_dma: make bam clk optional Message-ID: <20180123091905.GY18649@localhost> References: <20180116190236.14558-1-srinivas.kandagatla@linaro.org> <20180116190236.14558-2-srinivas.kandagatla@linaro.org> <20180119055221.GV18649@localhost> <8dfa8ba1-6e98-a8e4-614c-592861cef571@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8dfa8ba1-6e98-a8e4-614c-592861cef571@linaro.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 22, 2018 at 09:55:01AM +0000, Srinivas Kandagatla wrote: > >>@@ -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"); > > > >but you still do clk_get unconditionally? > > Only reason to do this way is to not break existing users in the mainline. > > remotely controlled BAM is already supported in upstream driver, there are > users of this who pass clk from device tree, If I make this conditional then > subsequent reads to the BAM registers for those instances might crash the > system. But these instances are remote controlled, so if we stop representing them in Linux, why would we read them? -- ~Vinod